- From: Eric Hudson <ehudson_at_midlandhome.net>
- Date: Wed, 19 Oct 2005 16:06:08 -0500
Hello all,
I have a PCI-DAS6034 card and I'm currently using it along with comedi to
read from 1 adc and dio chan. I now need to write to another dio chan and my
question is how to do this. If I'm not mistaken I thought you could only
configure subdevices as read or write but not both. Below is the code I'm
using:
For DIO read:
comedi_data_read(device,5,0,0,AREF_GROUND,&data2);
For ADC read:
maxdata = comedi_get_maxdata(device, ADCSUBDEV, ADCCHAN);
cr = comedi_get_range(device, ADCSUBDEV, ADCCHAN, ADCRANGE);
comedi_data_read(device, ADCSUBDEV, ADCCHAN, ADCRANGE, ADC_AREF,
&data);
To write out to dio chan would I simply do:
comedi_data_write(device,5,2,0,AREF_GROUND,&data2); every time I wanted to
write out to dio chan?
Thanks,
Eric
Received on 2005-10-19Z20:06:08