Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change to local mode of IviDmm with GPIB connection?

Hallo,

I want to change to local mode of my hardware(HP34401A). I am using IVI for Comunication. There is a function in VISA but how can I get the VISA handle from the IVI handle?

thanks

Babak
0 Kudos
Message 1 of 5
(3,368 Views)
Hi Babak,

viGpibControlREN
Purpose:
Controls the state of the GPIB Remote Enable (REN) interface line, and optionally the remote/local state of the device.

C Syntax:
ViStatus viGpibControlREN(ViSession vi, ViUInt16 mode)

Parameters:
vi
IN
Unique logical identifier to a session.

mode
IN
Specifies the state of the REN line and optionally the device remote/local state. See the Description section for actual values.


For more information see the NI VISA help file
Br,Sergei
"Only a life lived in the service to others is worth living..." - Albert Einstein
0 Kudos
Message 2 of 5
(3,367 Views)
hi again,

Sorry, i've forgotten something
how to get the VISA handle from the IVI handle
viCheckError(IviDmm_GetSpecificDriverCHandle (io, &vi));
"Only a life lived in the service to others is worth living..." - Albert Einstein
0 Kudos
Message 3 of 5
(3,364 Views)
Actually, calling Ivi_GetSpecificDriverCHandle will return the handle to the specific driver from the class driver - but that's not the Visa session handle. That would be help by the specific driver in an attribute. You can access it by calling GetAttribute on the specific driver and retrieving the IVI_ATTR_IO_SESSION attribute with _GetAttributeViSession. Note that you should use the specific driver's GetAttribute function to do that on the specific driver session, and not the class driver's GetAttribute function.

Glenn Burnside
Message 4 of 5
(3,351 Views)
Thanks

Babak


0 Kudos
Message 5 of 5
(3,332 Views)