Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Base address of I/O port from VISA resource name control?

I want to use the Parallel port as an Output port. I cannot use the VISA Write VI because does not latch the output more than a millisecond. Almost 1ms after the write (with data 0xFF) is finished the output bits go back to a low level. Another way is to use the Outport VI (which works fine). Is there a way to get the Port Base address (run time) using the Visa Resource Control?
0 Kudos
Message 1 of 4
(3,889 Views)
Hi,

I don't think there's a way to determine the base address of the parallel port using VISA.

You can look through the VISA properties. Wire the VISA reference to the property node and then browse through the properties.

You'll find a few properties named base address. This properties apply to PXI devices. Not the serial or parallel ports.

DiegoF
National Instruments.
0 Kudos
Message 2 of 4
(3,889 Views)
I have to re-word my question to get the answer which will help me:

The problem is that I want to get the Parallel Port Base Address while my VI is running. I am using "Out Port.vi" in my VI. The port address is required because the "Out Port.vi" only takes I/O port address.

Note, If you place a "VISA Resource Name.vi" and set it as a Control, you can select the Parallel port (e.g. LPT1) from the drop down list of this control. Obviously, this contol knows all the Base Addresses and names of the ports on a machine.

Isn't there a way I can get the port address by utilising the "VISA Resource Name.vi"? Maybe some additional C programming?
0 Kudos
Message 3 of 4
(3,889 Views)
Hi,

There's no way to get the base address of the parallel port using VISA, you might have to look for some Windows API function and use a "Call library function node" to call these functions.

I don't think that VISA would use the base address to access the parallel port. That's too low level and platform dependend. The OS provides and interface to access these ports. In windows you use the open file function using COM1 or LPT1 to access the ports.

Hope this helps.

DiegoF
0 Kudos
Message 4 of 4
(3,889 Views)