- From: Ian Abbott <abbotti_at_mev.co.uk>
- Date: Tue, 03 May 2005 11:00:56 +0100
Eric, On 30/04/2005 15:42, you wrote: > I’m currently using comedi to read from subdevice 4 channel 0 on my > PCI-DAS6034 board. I now need to be able to write (send high) to > subdevice 4 channel 2 to activate a relay. How do I do this? If I am not > mistaken you can only configure the subdevice for either reading or > writing but not both. Correct? Any help will be greatly appreciated. You should be okay using comedi_dio_config to set the direction of each channel, then comedi_dio_read to read a channel, comedi_dio_write to write a channel or comedi_dio_bitfield to read/write several channels at once. Some hardware groups DIO channels together so that setting the direction of one channel affects a whole group of channels, but it looks like your DAS6034 board allows channel directions to be set for individual channels. The stuff you mentioned about configuring the subdevice for reading or writing applies to streaming acquisition commands, not to simple acquisition instructions. -- -=( Ian Abbott _at_ MEV Ltd. E-mail: <abbotti_at_mev.co.uk> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
Received on 2005-05-03Z09:00:56