Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VI_ERROR_RSRC_BUSY on serial port (ASRLx::INSTR)

Solved!
Go to solution

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

IO Trace

0 Kudos
Message 1 of 3
(3,791 Views)

Hello Michael,

 

has your problem already been solved?

 

Regards,

 

Philipp Kost

AE | NIG

0 Kudos
Message 2 of 3
(3,743 Views)
Solution
Accepted by topic author Michael Heimann

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

0 Kudos
Message 3 of 3
(3,739 Views)