Re: E-series bidirectional digital I/O

hi jason-
you can easily set DIO line direction in labview and comedi, provided
your card is capable of being configured for  different line directions
within a single
port. the fix is very simple, all though the text below seems lengty.
you'll need to slightly modify the code called by the CIN in the
write-dio-line.vi (or whatever it's called).
find the line in the .c file " comedi_dio_config(...)".  it should have an
argument for line
direction, which is (probably) set to COMEDI_OUTPUT.  change this argument
to
COMEDI_INPUT, if you wnat this line to be an input.  (see
http://www.comedi.org/doc/r4617.html for more help on
the comedi_dio_config function).
you'll then need to recompile the code you just modified.  there should
already be a makefile in either the same directory as the
write-dio-line.vi, or in the "/lowlevelCIN" directory.  after
recompiling, you'll need to
right click on the CIN and choose "reload source code..." and choose the
proper .lsb file (probably called write-dio-line.lsb).  when you execute
the VI in labview, the desired line should
then be set to input.
of course, you can play this game with whatever channels/lines you want
probably easier just to make a variable in labview vi "line direction" and
have this be an input argument to the CIN.  otherwise you'll have to
recompile
everytime you wnat to change a line.
 good luck!
jon
 On Tue, 18 Nov 2003, Jason Dunham wrote:

>
> Can I allocate different line directions in a single 8-bit port using
> comedi and LabVIEW?  I'm using the VIs from the NI web site, but there
> is no setting for the line direction map which the NI-DAQ driver uses.
>
> I don't need to switch the directionality while running, but I need to
> make sure that I don't drive a voltage to an input line and damage the
> card.
>
> Thanks,
> Jason Dunham
> jdunham_at_sfis.com
>
>
> -----Original Message-----
> From: David [mailto:damachon_at_eresmas.net]
> Sent: Tuesday, November 18, 2003 1:44 AM
> To: comedi_at_comedi.org
> Subject: RE: Re: Problems compiliing latest CVS version
>
> Next time the error messages will be in en_US.
>
> David Schleef told me about i am no using latest version of CVS but when
> i wrote the message I have just download the CVS version using:
>
> cvs -d :pserver:anonymous_at_cvs.comedi.org:/var/cvs login
> cvs -d :pserver:anonymous_at_cvs.comedi.org:/var/cvs co comedi
>
> so If that was a problem tha David fixed  weeks ago and i use before
> compiling CVS that commands ¿why i still have problems ?
>
> Thank againg
> -- Daniel Machón [damachon_at_eresmas.net] --
>
>
>
> _______________________________________________
> comedi mailing list
> comedi_at_comedi.org
> https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi
>
> _______________________________________________
> comedi mailing list
> comedi_at_comedi.org
> https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi
>
>

Received on 2003-11-21Z20:29:33