Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

VIclose() doesn't work

hello everybody !

 

i'm working on visual studio 2010 with the VISA library and my aim is to take the control of an attenuator.

I can easily pass it on remote mode with the ViOpen() function in  this few line:

 

ViSession defaultRM, instr;// Declares type ViSession variables

ViStatus status; // Declares a type ViStatus variable

 

status = viOpenDefaultRM(&defaultRM);// Initializes the system
// Open communication with Serial Port 2
status = viOpen(defaultRM, "ASRL2::INSTR", VI_NULL, VI_NULL, &instr);

 

but i can't stop the remote mode with the ViClose() function, it doesn't work...

 

status = viClose(instr); // Close down the system
status = viClose(defaultRM);

 

help me please !!

0 Kudos
Message 1 of 2
(4,820 Views)
It's not supposed to work. You have to explicitly issue a GTL command to the instrument.
0 Kudos
Message 2 of 2
(4,811 Views)