doctommy Posted June 25, 2007 Report Share Posted June 25, 2007 Hello All, I have a problem using the parallel port on WIN XP and LV 8.2. I connected 2 PCs using the parallel port, ands tried to write and read in LV with VISA read/ VISA write on LPT1. But there is always a timeout on both computers. Even in MAX there is no way to test the connection. Do I have to change some settings in the bios, or in WIN? NEED HELP Thanks Thomas Quote Link to comment
Karissap Posted June 25, 2007 Report Share Posted June 25, 2007 Hi, I use the parallel port in one of my projects and have had much more success using the "In Port.vi" and "Out Port.vi" to communicate using the parallel port. Using the VISA method to use the parallel port was even more difficult after compiling the executable. Look at the example "Parallel Port Read and Write Loop.vi" in the NI Example Finder, I found it really helpful. Also check that you have grounded pins 11 and 12 (busy and out of paper) and not left them floating. Quote Link to comment
ryanlai Posted October 2, 2007 Report Share Posted October 2, 2007 QUOTE(Karissap @ Jun 25 2007, 06:23 AM) Hi, I use the parallel port in one of my projects and have had much more success using the "In Port.vi" and "Out Port.vi" to communicate using the parallel port. Using the VISA method to use the parallel port was even more difficult after compiling the executable. Look at the example "Parallel Port Read and Write Loop.vi" in the NI Example Finder, I found it really helpful. Also check that you have grounded pins 11 and 12 (busy and out of paper) and not left them floating. Hi "In port.vi" and "Out port.vi" is good. However, we're using these 2 VIs to control a circuit via PATA (IDE) port. We could write or read 1 value. But if writing an array with a for loop and the "Out port.vi", the value would be wrong. We tried to add some delay in the for loop, but nothing change. Has anyone successfully written an array into a parallel ATA port or just a simple parallel port? Thanks you Ryan Quote Link to comment
robijn Posted October 2, 2007 Report Share Posted October 2, 2007 I think the VISA parallel port functionality is only meant for parallel printers. Printer output works something like this: 1 wait until not busy and not error 2 place next byte on D lines 3 toggle the strobe line 4 if more bytes goto 1 You have much more freedom with the port IO functions, but I think they are limited to low port addresses. Have a look on http://beyondlogic.org, the parallel port section. Anyway the LPT port is an ancient piece of hardware, and you're lucky if you still have one to play with I would limit the use to playing only. Joris Quote Link to comment
Rolf Kalbermatter Posted October 3, 2007 Report Share Posted October 3, 2007 QUOTE(ryanlai @ Oct 1 2007, 03:01 AM) Hi"In port.vi" and "Out port.vi" is good. However, we're using these 2 VIs to control a circuit via PATA (IDE) port. We could write or read 1 value. But if writing an array with a for loop and the "Out port.vi", the value would be wrong. We tried to add some delay in the for loop, but nothing change. Has anyone successfully written an array into a parallel ATA port or just a simple parallel port? Thanks you Ryan Traditionally the parallel port was an output only digital port. In order to make it get bidirectional various people came up with various solutions. 1) use one of the strobe lines as input and clock in data over that. Makes it really just a slow 1bit serial port!!!!! 2) Some hardware manufacturers made the hardware so that 4 of the 8 bits could be set as input. Better than 1 but not possible with every parallel port (the ones that only can drive the 8 digital data lines). 3) Some other manufacturers decided to go for the full bidirectional functionality of the entire port. 2) and 3) require extra register bits to setup the port in the desired manner and are of course exclusive of each other at any given time. Because of this variety and the many bugs in the actual hardware implementations VISA does not try to do anything on its own with the parallel port. Windows can be configured to operate the parallel port in one of these three modes provided the hardware chip supports that mode. But even when set that way none of above solutions will work with a 1 to 1 cable to transfer data between computers. You need to wire the handshake lines accordingly to the mode you have set the computers (and both are better set the same) to make this work at all. You can get some more detailed explanation for instance here http://www.thaiio.com/parallelportinfo.html So if VISA Read and Write will do the right thing on a parallel port depends on the actual wiring, the mode the parallel port is set in Windows and if the hardware supports that properly, which nowadays integrated chip-sets usually should. Who after this discurs still thinks connecting computers through a parallel port is a good idea, does this for a hobby and knows what side of a solder iron gets hot or can't be helped IMHO. Getting a serial port wired up correctly is in comparison almost trivial. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.