From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot close serial port.

I'm writing a VI to access a serial port server.  The server concentrates 4 rs232 signals on to the lan, and a virtual com port redirector that came with it presents the ports as virtual com ports to windows.  It works well in Hyperterminal.

 

My VI, however, opens one instance, then hangs.  If I restart it, it opens a second session, then hangs.

 

I've tried creating a new VI (just a visa close and a serial reference control) to close the port, but labview hangs as soon as I click the control - it won't even populate the list of ports.

 

If I try hyperterminal after running my first vi, I get "the port is in use, and can't be opened" - yet I can't close it the way I opened it.

 

device is advantech eki-1524.

0 Kudos
Message 1 of 2
(3,154 Views)

Hey ve3wtj,

 

How does this advantech eki-1524 redirector work? When is it supposed to switch? How transparent is it to the system?

Also, Can you open a COM port and communicate with your instrument without this device?

Can you communicate with the device through Hyperterminal before you run the program?

 

The driver for this device might be opening a resource before the program. Then when the program tries to access the same port, it hangs.

Also, do you receive any error messages or does LabVIEW just hang?

 

Thank you,

Ryan

National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(3,131 Views)