09-27-2011 05:55 AM
Hello All,
I am programming NI VISA on Windows (XP 32Bit: VISA 4.6 and Win7 64Bit. VISA 5.1 behave the same) with C++ to control an R&S NRT-Z power sensor with serial adapter (NRT-Z3).
The task is to break communication on the ASRL session in Application1 (complex, controls also other instruments via VISA-LAN-VX11), establish a session from Application2 (simple, only NRT-Z) and re-establish the serial session in App1 after App2 has been closed.
As it is not possible to share open serial ports between applications under windows, I tried viClose on the ASRL session in App1, but that seems not to release the serial port for any other App. A viClose on the RM session however releases the port. Is this by design or am I doing anything wrong (see I/O trace below)?
Problem ist that I can not close the other session handles to the other instruments in App1.
Any solution is very much appreciated!
Regards
Michael Heimann
Solved! Go to Solution.
12-05-2011 09:51 AM
Hello Michael,
has your problem already been solved?
Regards,
Philipp Kost
AE | NIG
12-05-2011 10:04 AM - edited 12-05-2011 10:07 AM
Hello P,
a workaround has been found with the help of NI Germany. It is was not sufficient to close only the instrument session handle for the COM instrument. Closing also the Resource Manager Session handle also closes the underlying windows COM port. This is a little disturbing and should be mentioned in the VISA documentation.
Regards