- From: Heinrich du Toit <heinrichdt_at_tlabs.ac.za>
- Date: Mon, 17 Sep 2007 07:47:39 +0200
Hi I'm unsure what the limitations of the Comedi drivers are. But I've used NI cards unders the NI DAQmxBase drivers from NI. There where many different limitations. I was able to do analog read/write at the same time with an NI-6229 card. So I had a waveform output on 2 channels and read them back in 2 other channels :) Not sure if your card supports this. But there is no way to sync the 2 processes. NI has some fairly weird limitations inside. Some hardware some software. So I'm unsure of Comedi. Do you have the windows measurement studio software? Maybe first check if that can do what you want? Maybe your card doesn't support it. Further I suggest first testing ao waveform and then ai waveform seperately. btw. You will need to seperate cmd's in your comedi program if this is 2 work. On Sun, 2007-09-16 at 16:20 +0200, JUSTIN ABRAHAM wrote: > 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 > > > > > > > _______________________________________________ > comedi mailing list > comedi_at_comedi.org > https://mail.comedi.org/cgi-bin/mailman/listinfo/comedi
Received on 2007-09-17Z04:47:39