1. I have installed all Linux (Ubuntu 18.04) drivers for libiio correctly.
2. I have been able to connect with the ADALM2000 with info_iio command and receive a listing of ADALM2k services.
3. I have installed Scopy software and been able to run the delightful software.
4. However, as seen in the gnuradio flowgraph below, I dont seen to be connecting to ADALM2k via the IIO Attribute Source block, even when I am using the correct URI, USB:2.3.5 that I used for connecting to ADALM2k via iio_info.
My aim is to capture a square-wave waveform being fed to the ADALM2k from a function generator and to delay the waveform by say 300, 350 and 400 microseconds. The flowgraph below is a simulation that ran successfully.
The flowgraph here is the one I have a problem with:
Thanks in advance...
How do you specify the channels in the IIO Device Source?
Try to use: ["voltage0", "voltage1"]
then connect the unused channel to a "Null Sink"
If you want only a channel, set the parameter to: ["voltage0"] or ["voltage1"].
The channel must be between square brackets.
You did not set the channel right. For one channel set the parameter like this:
You got 8 channels because you forgot to use square brackets, and the string "voltage0" has 8 characters, so the device…
If you want to capture a signal in GRC using gr-iio, you should use 'IIO Device Source' block, setting the device to "m2k-adc" and the channels to ["voltage0", "voltage1"]. This block streams short items, so you wil have to convert them. Also you will have to set some attributes, such as clk_powerdown and powerdown, sampling frequency and so on.Here is an example:
Thank you very much, TeoPeri!
I tried your suggested flowgraph and get an error output. I think there seems to be an error in the 'channels' attribute of the IIO Device Source, from the error dump.
My goal is to display the input waveform at the adc, delay it by say 300 usecs and display both the original and delayed waveforms on the 'scope' display, as well as output the delayed waveform from one of the I/Os.
I am new to GRC, so thank you for your time and patience...
I tried "voltage0" for channels in the IIO Device Source and received an error saying "voltage0" cannot be processed. When I use an integer, that is accepted. I have tried using 0, 1 and 2 for channels[ ] but get an error during execution...
Enter exactly as it shown in bold
I set the 'channels [ ] to "voltage0" instead of [voltage0] and this is what I get - 8 channels of the ADC.
You got 8 channels because you forgot to use square brackets, and the string "voltage0" has 8 characters, so the device source considers you have 8 channels.
Wooo yes, I got the display. My inputs are floating right now, so the display is a mess...
Thank you, TeoPeri and mhennerich! Much obliged for getting me out of this hole...
I will trouble you more later...