- From: JUSTIN ABRAHAM <abrjus002_at_uct.ac.za>
- Date: Sun, 16 Sep 2007 16:20:16 +0200
i've tried merging 'ao_waveform.c' (outputs sine wave) and 'cmd.c' (reads analog in) with no luck. maybe i'm not doing it right? my c/c++ is not very strong, not exactly sure how to do it.
the 'ao_waveform.c' file has an infinite loop in it so it'll be outputting continuously so how will i be able to read at the same time?
>>> Bernd Porr <BerndPorr_at_f2s.com> 09/16/07 1:47 PM >>>
Hi!
Just merge these two programs into one. Bascially only one comedi open
and one comedi close.
/Bernd
www: http://www.berndporr.me.uk/
http://www.linux-usb-daq.co.uk/
Mobile: +44 (0)7840 340069
Work: +44 (0)141 330 5237
University of Glasgow
Department of Electronics & Electrical Engineering
Room 519, Rankine Building, Oakfield Avenue,
Glasgow, G12 8LT
JUSTIN ABRAHAM wrote:
> i can read multiple channels by changing 'n_chan' variable, in the cmd.c example, to the specified number. it just cycles through the channels, one after the other, and scans them. i can also output a 50KHz sine wave using the ao_waveform.c example. what i need is to output and read simultaneously.
>
> whilest i'm outputting the wave i should be able to record it in via one of the AI channels, is there a script to do this... or how would i go about doing this??
>
>>>> Bernd Porr <BerndPorr_at_f2s.com> 09/16/07 12:57 AM >>>
> You can just use cmd.c and ao_waveform. Just set n_chan to 4, for
> example and extend the channel list to 4 channels and it'll work with 4
> channels.
>
> /Bernd
>
> www: http://www.berndporr.me.uk/
> http://www.linux-usb-daq.co.uk/
> Mobile: +44 (0)7840 340069
> Work: +44 (0)141 330 5237
> University of Glasgow
> Department of Electronics & Electrical Engineering
> Room 519, Rankine Building, Oakfield Avenue,
> Glasgow, G12 8LT
>
>
> JUSTIN ABRAHAM wrote:
>> hi all,
>>
>> i'm using the NI PCI-MIO-16E-1 DAQ card as part of my final year project at varsity.
>>
>> i am trying to read and write simultaneously in to multiple analog channels at a sample rate of about 1MS/s(1.25MS/s is the card limit).
>>
>> i'm running a SIDUX (debian) distro of linux and have downloaded and successfully installed comedi/comedilib etc. i managed to output a sinewave of 50MHz, onto one AO channel, using the 'ao_waveform.c' example that is provided with the comedilib package. i also read in a single AI channel at 1MS/s using the 'cmd.c' example. i'm not a pro at c/c++ but i've read the comedi documentation and figured a bit out about how these examples work and about the command struct and its various parameters etc.
>>
>> basically i want to know how to read and write to multiple channels simultaneously.... any commented code or examples would be greatly appreciated.
>>
>> thank you
>> justin
>>
>> _______________________________________________
>> comedi mailing list
>> comedi_at_comedi.org
>> https://mail.comedi.org/cgi-bin/mailman/listinfo/comedi
>>
>
> _______________________________________________
> comedi mailing list
> comedi_at_comedi.org
> https://mail.comedi.org/cgi-bin/mailman/listinfo/comedi
>
>
Received on 2007-09-16Z13:20:16