- From: Gergely Imreh <imrehg_at_gmail.com>
- Date: Fri, 17 Aug 2007 15:58:30 +0100
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 <mail-for-me_at_lycos.com> 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 ports 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]
Received on 2007-08-17Z13:58:30