Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

digital out put using usb

i want to control arelay with (0 or 1) only one digital output using the usb port of my computer 
if any body can help please

0 Kudos
Message 1 of 3
(5,444 Views)

you have asked this before...

 

try using the parallel port....

 

Method 1 Using the parallel port for digital output is really rather trivial if working with the Windows API. The main trick is to tie pins 11(Busy) and 12 (Paper Error) to ground. Otherwise, the hardware driver will think the printer it is talking to is busy or experiencing an error and will not output any data. The port will maintain the last value written to it until another value is written or until the computer is powered down. Remember that in LabVIEW all serial communication needs to be sent as a string. Generally we will want to send 8-bit numbers to the port. This will require flattening the data to string so that the binary representation of the data does not change. We can use the Type Cast VI for the purpose; see Figure 2 below.

0 Kudos
Message 2 of 3
(5,436 Views)

thank you 
but iwant to use usb port not parrallel port 

0 Kudos
Message 3 of 3
(5,420 Views)