LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Free the com port when the program is not executing

Hi!!

I am using RS-232 communication in my LV application, and I would like to "free" the com port when the application is not running. 

I am closing all VISA connection after use.  In the main front panel I pick which com port to use and com1 is set as default. A global VISA resource variable is set, since serial communication is used in several tasks in the application.

Is there a way to add "none" to the list of 'VISA resource name' ? Or is it an other way to disable the RS-232 connection when the program is not executing ?

Today when opning  a hyperterminal to check the target for the serial communication, one has to close down the LV application.

I will be very grateful for suggetions.

Anita.

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

Hi Anita,

      VISA close can free the port so Hyperterminal will be able to access it without closing LabVIEW.  You can prove it by building a simple program to open the port wait for a button then close the port.  Beware though, a VISA Read or Write will "open" the port again, even if you close it! Smiley Surprised  Make sure the port isn't accessed again if you want it to stay closed! Smiley Wink

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 2 of 3
(2,698 Views)
You are just brilliant!!!! Thank you!
0 Kudos
Message 3 of 3
(2,692 Views)