LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

linux parallel port

Dear All,

is it posible to read and write registers in the io address space under linux. I want to use  the  parallel port to  turn on/off some LEDs and check the state of several switches. I have done this with windows 2000, but i cannot find any solution for linux.

cheers,

Frank
0 Kudos
Message 1 of 3
(2,706 Views)

The In Port.vi and Out Port.vi are not available under Linux. Maybe it's possible to write a Shared Library in C that provides this functionality and use a call library node to call it but I think it would be much simpler to use a cheap digital I/O device like the USB-6501 for your task.

Best regards,

Jochen Klier
National Instruments Germany

 
0 Kudos
Message 2 of 3
(2,679 Views)

There are several solutions for your problem. The most simple is to create a shell script that control the state of the parallel port and call "execute" from LabVIEW. 

 

Using http://parashell.sourceforge.net/ is simple: (http://parashell.sourceforge.net/docs/parallel.txt)

 

----- How to use the program -----
parashell is a very easy to use program. The program takes two parameters, the Parallel port to send the data to and
the data value to send. That value must be integer in decimal format (for example 255). Hexadecimal
numbers can also be used, but they must be preceded by 0x (for example 0xFF). The program uses very little error
checking to keep it simple. 

Example how to use parashell.
parashell 0x378 0
Set all datapins to low level.

parashell 0x378 255
Set all datapins to high level.

parashell 0x378 1
Set datapin D0 to high level and all other datapins to low level.
0 Kudos
Message 3 of 3
(2,370 Views)