Re: comedi dio read/write help

Yes...the subdevice 0 is the digital input, and subdevice 1 is the digital output. But, even though when i specify it correctly in the code, 
                            comedi_dio_write ( it,  1,  chan, 1);
 itz reading 0 always. Any other suggestions.
Thanks





---------[ Received Mail Content ]----------

Subject : Re: comedi dio read/write help

Date : Fri, 17 Aug 2007 15:58:30 +0100

From : "Gergely Imreh" <imrehg_at_gmail.com>

To : "Comedi Mailing List" <! ;comedi_at_comedi.org>



Hi,



Just judging by the output of the comedi_config, the subdevice 0 is

the digital input, and subdevice 1 is the digital output. Because of

this, your program has to configure the two different subdevices

differently, and read/write them separately.



I don't have the same type of card around to try this, but I think

with these modifications it should be possible to read and write to

the digital channels.



Cheers,

Greg







On 14/08/07, Sayoji Siv wrote:

>

> Thanks of ur reply. I added comedi_dio_config

>

> comedi_dio_config ( it, subdev, chan,COMEDI_INPUT );
> comedi_dio_config ( it, subdev, chan,COMEDI_OUTPUT );

>

> but still i am getting the output as

> data = 0

> data1 = 0

>

> ! Normally we will used to do I/O operation by ports. In comedi the port s are specified as subdevice. May I know in details about channels or lines.

>

> Eg

> PORT1 - Digital input (8 channels / lines for this port)

> .

> .

> PORT 4 - Digital Output (8 channels /line)

>

> How this ports and channel specifications are accesed when using comedi drivers

>

> The output of the comedi_test code is given below. How it is related to abov! e specified example port configuration ?

>

> I: subdevice 0

> I: testing info...

> rev 1

> I: subdevice type: 3 (digital input)

> number of channels: 32

> max data value: 1

> ranges:

> all chans: [0,5]

> I:

> I: subdevice 1

> I: testing info...

> rev 1

> I: subdevice type: 4 (digital output)

> number of channels: 32

> max data! value: 1

> ranges:

> all chans: [0,5]



_______________________________________________

comedi mailing list

comedi_at_comedi.org

https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi




Looking for the Hottest New Ringtones?
Find them at Lycos Mobile. Get 10 Bonus Tones today!

Received on 2007-08-18Z10:56:20