:SYSTem:LOCK:REQuest
Description
This command attempts to attain the lock for all clients and returns 1 if successful and 0 if it fails. The request fails if for example BAS is already locking the device.
Granting a lock sets Bit 10 in the Standard Operation Register STATus:OPERation:CONDition.
The locking proccess can take a longer time, when the internal calibration needs to be
performed first, therefore also Bit 9 is set during attempting to grant the lock.
If no lock is requested by :SYSTem:LOCK:REQuest the lock will be requested automatically by the calling command or query.
Some commands do NOT require a locked device and therfore NOT requesting a lock when being executed:
| Commands not requiring lock | Comment |
|---|---|
*ESE |
Command and query |
*IDN? |
Query |
*OPC |
Command and query |
*SRE |
Command and query |
*STB? |
Query |
*WAI |
Command |
:FORMat:DATA |
Command and query |
:MMEMory:CATalog:CORRection? |
Query |
:MMEMory:DELete:CORRection |
Command |
:STATus:OPERation:CONDition? |
Query |
:SYSTem:ERRor? |
Query |
:SYSTem:ERRor:COUNt? |
Query |
:SYSTem:LOCK:OWNer? |
Query |
:SYSTem:LOCK:RELease |
Command |
:SYSTem:LOCK:REQuest? |
Query |
Caution
It is higly recommended to start your measuring procedure by calling :SYSTem:LOCK:REQuest otherwise you may get some unexpected side effects.
All commands requiring a lock (not part of the table above) will request a lock automatically but mostly fail with a Execution error (nr. -100 Device not ready)
at the beginning until the device enters the Locking device state signalled in the Standard Operation Register.
Important
If no client has a conection to the SCPI server locking is released automatically.
Important
If locking is not possible a Not allowed error (nr. 514) is raised.
| Syntax | Response |
|---|---|
:SYSTem:LOCK:REQuest? |
{ 1 | 0 } |
| Response value | description |
|---|---|
{ 1 | 0 } |
Returning 1 when the lock is granted. The lock is denied otherwise. |