LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel port programming in linux

I am currently trying to program a Direct Digital Synthesis evaluation board through a parallel port on the PC in linux.  I need to be able to program each of the 27(hex) adresses on the chip, the outport sounded like the exact function that I need but is sadly not supported on linux.  Is there any way to program this board under linux?
0 Kudos
Message 1 of 4
(3,279 Views)
Hello,

You are correct that LabVIEW does not support parallel port I/O on Linux (see LabVIEW Does Not Show the Parallel Port as a Resource in Macintosh and UNIX). So if your evaluation board comes with shared objects (.so) you can call them in LabVIEW using the Call Library Function Node to communicate with the board.

Alternatively, you could use NI-VISA for this. Please refer to the following article for more information: Accessing Parallel Ports with VISA.

Good luck with your application!
Shakhina P.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,264 Views)
I have noticed there are funcions which look very similar to the outport, such as outport 8. These claim to be able to write on the register level of a given address space.  However when I try to tell it to write to the parallel ports address space (378) it sends an error message saying "VISA:  (Hex 0xBFFF0067) The given session or object reference does not support this operation."

I need to be able to write to most of the registers in the parallel port which is not possible through normal VISA means, also the evaluation software that  comes with the board is written in visual basic, not sure if the library node works for that.

Is this a pointless excersise in frustration?
0 Kudos
Message 3 of 4
(3,241 Views)
For a parallel port NI-VISA only lets you read or write a byte at a time, using the VISA Read, and VISA Write VIs.  The register level VIs like VISA Out 8 and VISA In 8 won't work.  If you don't want to send a string you can always right click on the string contol and choose HEX Display so that you can enter the values in HEX.

If NI-VISA doesn't provide the functionality that you need you will probalby need to write kernel mode driver.  Chapter 9 of Linux Device Drivers 3 explains the basics of a parallel port driver, and also provides an example driver which may provide the functionality that you need.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 4 of 4
(3,226 Views)