08-05-2010 11:52 AM - edited 08-05-2010 11:53 AM
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
08-05-2010 01:01 PM
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.