From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make a session back to local?

Hello

How can I bring my equipment opened with a session back to local mode?

For devices I opened with ibdev, I can use
int ibloc (int Device);

But for equipments opened with viOpen () or rsfsq_init (,,, &session)  ?

Thanks

Matthias

0 Kudos
Message 1 of 8
(4,048 Views)

Hi,

Try:

viGpibControlREN("Instrument Handle", VI_GPIB_REN_DEASSERT);

-Regards

John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 2 of 8
(4,005 Views)

Hi Again,

There is also a function to send GPIB commands when in a VISA session.

viGpibCommand("instr handle", Buffer var, count var, ret_count var);

Where Buffer var contains the GPIB command string such as ibloc or Ibconf.

Regards-

OC

John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 3 of 8
(4,006 Views)
I do not think you can send ibloc or ibconf as command strings to the device.
These are functions from a library.
The viGpibCommand function is probably used like this: viGpibCommand (handle, "*RST", 4, &count)
S. Eren BALCI
IMESTEK
0 Kudos
Message 4 of 8
(3,982 Views)
Hello

I tried viGpibControlREN("Instrument Handle", VI_GPIB_REN_DEASSERT);

Surprisingly it was setting all equipment to local, not only the addressed one. Also using a next GPIB command left the equipment in local mode.
I guess that is not normal behavior. Right?

0 Kudos
Message 5 of 8
(3,919 Views)

Matthias,

When you used the command "viGpibControlREN("Instrument Handle", VI_GPIB_REN_DEASSERT);", is your Handle assigned to the GPIB address of a particular instrument or or to the gpib card itself like 'GPIB0' or 'DEV0'?

John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 6 of 8
(3,905 Views)
Matthias,
 
To Clarify, what is your instrument descriptor when you do the viOpen() for the instrument that you are trying to toggle from remote to local?
John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 7 of 8
(3,900 Views)

Just for anyone else that comes across this;  the parameter VI_GPIB_REN_DEASSERT, de-asserts remote-enable on all instruments on the GPIB.  For a specific instrument, use VI_GPIB_REN_ADDRESS_GTL.  This is integer number 6.

0 Kudos
Message 8 of 8
(3,118 Views)