LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication port in use

 

Hi all.
We're developing an application that controls several devices via USB ports. Communication with the devices and port management are carried out by C++ dll functions which LabView executes via Call Library Function nodes.
These dll functions sometimes leave the ports open even when we stop the main program execution, so that LabView generates the error message "The communication port is in use" if we try to continue working with this particular device. The only solution seems to be to close the LabView application and enter again.
So, is there any way we can open or close these ports through LabView code and then make the communication via external code?
Regards,
Francisco

 

Hi all.


We're developing an application that controls several devices via USB ports. Communication with the devices and port management are carried out by C++ dll functions which LabView executes via Call Library Function nodes.


These dll functions sometimes leave the ports open even when we stop the main program execution, so that LabView generates the error message "The communication port is in use" if we try to continue working with this particular device. The only solution seems to be to close the LabView application and enter again.


So, do you know any way we can open or close these ports through LabView code and then make the communication via external code?


Regards,

Francisco

0 Kudos
Message 1 of 2
(2,487 Views)

It's not clear what is leaving the ports open.  Is it your LabVIEW code? or you C++/dll code?

 

If you are using LabVIEW and VISA functions to work with your devices, there is a VISA close function.

 

If your C++ / dll code is working with the devices, then you should get that code to close the ports.

0 Kudos
Message 2 of 2
(2,470 Views)