4 System
4.2 I/O Config
4.2.10 Lock Remote I/O Session (Remote Command only)
An instrument can support multiple remote I/O sessions at the same time. However,
you cannot simultaneously send remote commands from multiple sessions to the
same instrument. The results in such a case are undefined.
Ensure that only one session actively controls the instrument at a time. Other
sessions must wait until the active session finishes the instrument control.
To help achieve this cooperative instrument sharing, the following remote
commands are provided:
–
"Lock Remote I/O Request (Remote Query only)" on page 1764
–
"Unlock Remote I/O Session (Remote Command only)" on page 1765
–
"Remote I/O Session Lock Name (Remote Query only)" on page 1766
–
"Remote I/O Session Lock Owner (Remote Query only)" on page 1766
Example Procedure for Lock Usage
Step Action
1 Each session tries to obtain a lock by sending :SYSTem:LOCK:REQuest?
This query can be sent simultaneously from multiple sessions
2 Only one session will be granted. The granted session receives 1 in response to its query
3 The granted session actively controls the instrument
Meanwhile, other sessions must wait, and must periodically send
:SYSTem:LOCK:REQuest?, requesting the lock
4 When the active session finishes its task, it releases the lock by sending
:SYSTem:LOCK:RELease
5 Now the lock has become available, so when one of the waiting sessions sends
:SYSTem:LOCK:REQuest?, it receives 1 in response, granting the lock to that
session
By repeating steps 3, 4, and 5 above, multiple sessions can share the same
instrument in a cooperative fashion.
NOTE
A session can query its own unique session name by sending
:SYSTem:LOCK:NAME?. This session name is determined by the instrument.
A session also can query the name of the currently granted session by sending
:SYSTem:LOCK:OWNer?.
1763 Short Range Comms & IoT Mode User's &Programmer's Reference