SYSTem:LOCK:REQuest?
SYSTem:LOCK:REQuest?
This functionality is available on the 34972A only.Syntax
SYSTem:LOCK:REQuest?
Description
This command issues a request to lock the instrument's configuration to a single I/O interface. This allows you to lock the instrument or share the instrument with other computers.
Remarks
- When a request is granted, only I/O sessions from the interface which was granted the lock will be allowed to change the state of the instrument. From the other I/O interfaces, you can query the state of the instrument but no instrument configuration changes or measurements are allowed.
- Lock requests can be nested and each request will increase the lock count by 1. For every request, you will need a release from the same I/O interface (see SYSTem:LOCK:RELease command).
- Instrument locks are handled at the I/O interface level (USB or sockets) and you are responsible for all coordination between threads and/or programs on that interface.
- Locks from socket sessions will be automatically released when a socket disconnect is detected.
- When a lock is granted, Bit 10 in the Standard Operation Register will be set (see STATus:OPERation:CONDition? command).
Return Format
The command immediately returns +1 if the lock request is granted or +0 if denied.
Examples
The following command requests a lock of the current I/O interface.
SYST:LOCK:REQ?
Typical Response: +1
The following series of commands illustrates usage.
Initial State = unlocked, Count = 0
<FROM USB> SYST:LOCK:REQ? returns +1 (request successful)
State = locked, Count = 1
<FROM LAN> SYST:LOCK:REQ? returns +0 because USB has lock
State = locked, Count = 1
<FROM USB> SYST:LOCK:REQ? returns +1 (request successful)
State = locked, Count = 2
<FROM USB> SYST:LOCK:REL
State = locked, Count = 1
<FROM USB> SYST:LOCK:REL
State = unlocked, Count = 0
Note that for each successful lock request, a lock release is required. Two requests require two releases.