LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parrallel or Serial Port vi?

Does anyone know of a labview vi that can set the individual pins on a parrallel
or serial high or low?
0 Kudos
Message 1 of 4
(1,594 Views)
Pblue wrote:

> Does anyone know of a labview vi that can set the individual pins on a parrallel
> or serial high or low?

Not sure what you mean by individual pins, but here is some info.

If you are using the parallel port you can use the Inport and Outport VIs
to send data values to the port. You MUST however send ALL 8 bits.

The easiest way to do this is save the last value sent, manipulate it
to change only the bits you want to change and send the new value.

As far as the serial port goes, it is a bit more complex since
RS-232 will send 8bits of data in the serial stream usually
with one or more start / stop bits and parity (if set to other than NONE).

Changing the control lines can be done using VISA on the serial
port and maybe the parallel port as well. Th
ese can also be set
using the Inport / Outport, though the address is different.

Kevin Kent
0 Kudos
Message 2 of 4
(1,594 Views)
I threw this together in the matter of about 5 minutes (so it is not very
pretty - but it works). Feel free to modify it for your application.
The hex address is for the printer port lpt1 on my machine - check in
windows device manager (go to control panel-> system-> device manager) under
the properties of the lpt port to get the hex address for your printer port.

hope it helps

regards
John


Pblue wrote in message
news:395be033@newsgroups.ni.com...
>
> Does anyone know of a labview vi that can set the individual pins on a
parrallel
> or serial high or low?



[Attachment printer port write.vi, see below]
0 Kudos
Message 3 of 4
(1,594 Views)
I guess i should add that the attachment sets the eight data lines on the
printer port high or low. I think you can use visa calls to control the
control lines (not sure though)

cheers
john

Pblue wrote in message
news:395be033@newsgroups.ni.com...
>
> Does anyone know of a labview vi that can set the individual pins on a
parrallel
> or serial high or low?
0 Kudos
Message 4 of 4
(1,594 Views)