SYSTem Subsystem LOCK Commands
This subsystem locks and releases instrument I/O interfaces, as shown in the following example:
Initial State = unlocked, Count = 0
(FROM USB) SYST:LOCK:REQ? returns "1" (request successful)
State = locked, Count = 1
(FROM GPIB) 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
For each successful lock request, a lock release is required. Two requests require two releases.
Command Summary
SYSTem:LOCK:NAME?
SYSTem:LOCK:OWNer?
SYSTem:LOCK:RELease
SYSTem:LOCK:REQuest?
SYSTem:LOCK:NAME?
Returns the I/O interface in use by the querying computer.
- After determining the interface that you are using, use SYSTem:LOCK:OWNer? to determine which interface, if any, has the lock.
- Returns "USB", "VXI11", "GPIB", "LAN<IP Address>", or “WEB<IP Address>” indicating the I/O interface being used by the querying computer.
SYSTem:LOCK:OWNer?
Returns the I/O interface that currently has a lock.
- When a lock is active, Bit 10 in the Standard Operation Register will be set (STATus:OPERation:CONDition?). When the lock is released on all I/O interfaces, this bit will be cleared.
- Returns "USB", "VXI11", "GPIB", "LAN<IP Address>", or “WEB<IP Address>” indicating the I/O interface that currently has a lock. If no interface has a lock, "NONE" is returned.
SYSTem:LOCK:RELease
Decrements the lock count by 1 and may release the I/O interface from which the command is executed.
- When a lock is active, Bit 10 in the Standard Operation Register will be set (STATus:OPERation:CONDition?). When the lock is released on all I/O interfaces, this bit will be cleared.
SYSTem:LOCK:REQuest?
Requests a lock of the current I/O interface. This allows you to lock the instrument's configuration or cooperatively share the instrument with other computers.
- Lock requests can be nested; each request increases lock count by 1. For every request, you need a release (SYSTem:LOCK:RELease) from the same I/O interface.
- Locks are handled at the I/O interface level (USB, LAN, etc.) and you are responsible for all coordination between threads and/or programs on that interface.
- When a request is granted, only I/O sessions from the present interface can change the instrument state. You can only query the instrument state from other I/O interfaces.
- LAN sessions locks are automatically released when a LAN disconnect is detected.
- Granting a lock sets Bit 10 in the Standard Operation Register (STATus:OPERation:CONDition?). In addition, the entire instrument front panel, including the Local key, is locked out while a lock is in place ("Front panel locked." is displayed).