Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel port VIs apparently not opening the port

I'm trying to control a shutter with a parallel port connection, using TTL.

When I run PortMon and open LPT1 in MAX, I can see activity i.e. the port is opened, closed etc.  However, when I run one of the parallel port example VIs (e.g. the Read and Write Loop one) there's no apparent activity on the port.  This seems to explain why I haven't been able to trigger the shutter programmatically so far.

The register address is correct (378) and the port is not in ECP or EPP mode in the BIOS.

Is there anything else I can check, to find out why parallel port communication in LabView itself (version 8.2.1) doesn't seem to be working?

Thanks,
Adam
0 Kudos
Message 1 of 16
(5,504 Views)

Hi there,

Those VI's are using direct DLL calls.  It might be worth trying to VISA serial vi's to communicate with your LPT1 port.

The VISA calls are what MAX uses to talk over the Parallal port so you might have more luck.

They are under >> Functions>>Data Communication>>Protocols>Serial.

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 2 of 16
(5,483 Views)
Yes, I ended up trying the VISA method yesterday, and that does seem to work.  At least, it does then open LPT1.  Unfortunately, the application still isn't triggering the shutter but at least I've eliminated one part of the problem now.

Adam
0 Kudos
Message 3 of 16
(5,479 Views)
Hello Adam,

I am doing similar work with a parallel port. Using the "Parallel Port Read and Write Loop.vi" example included with LabVIEW, I noticed no activity on PortMon. When I used VISA write, I saw activity but it was extremely slow (about 1 second per write). I was wondering if you got your code to work yet? Have you also grounded pins on the parallel port? This is one thing I have not tried yet.

Michael Froehlich
0 Kudos
Message 4 of 16
(5,399 Views)
Michael,

Yes, the output with VISA does seem slow.  No, I haven't grounded those pins yet, though I'm aware that should be required.
The annoying thing is that the old cable I'm using does work for this purpose with some older hardware, albeit not with LabView.

Adam
0 Kudos
Message 5 of 16
(5,261 Views)

Hi,

At this moment I am using the parallel port for interfacing to a board to set parameters inside a IC.

I am using the write port function to write directly to the parallel port registers.

Is this an option ?

0 Kudos
Message 6 of 16
(5,249 Views)
Hi KC,
 
Yes, parallel port communication has been supported since VISA 1.1. Refer to think link for a simple example:
 
Regards,
Way S.
0 Kudos
Message 7 of 16
(5,225 Views)
Hi,
 
I was not referring to VISA.
If you want to use the parallel port in a normal way (printer port) I would suggest that you use VISA.
 
But if you need a parallel I/O port on your PC then it is easier (and faster) to use direct port access.
With the direct port access you have full control over all the data and, more important, the control bits.
0 Kudos
Message 8 of 16
(5,201 Views)
KC,

The problem I've seen is that non-VISA access to the parallel port doesn't seem to be working.

Adam
0 Kudos
Message 9 of 16
(5,178 Views)

Hi Adam,

Like I said I use the write port function to write data to a chip without any problem. 

can you tell me how you tested this ?

0 Kudos
Message 10 of 16
(5,174 Views)