Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
LOCK.MAC | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
These macros allow the user to lock a motor and prevent it for moving. The checking is done before every movement and it is done at the macro level... this means that motors are locked for one user but perhaps not for another one. If you want to prevent a motor to be moved by ANY user... you should check the restrictions flag in the config file for that motor to "CANT MOVE" This macros are NOT HACK-PROOF. The idea is just to make life easier by avoiding consequences of forgetting a motor should not be moved... then spec will remind it to you. I am sure you will still be able to move if you really want to. Should we define only authorised users for locking? The answer is no. If you really want by all means to avoid a motor be moved by the user use config and protections in UNIX file system. OVERVIEW Basic commands are: EXAMPLE SETUP The macro locksetup must be executed once when SPEC is started fresh before any of the other macros in this macro set. | ||||||
Macros:
Usage: locksetup Do all the necessary setup and variable definition. TAKE CARE : lock does not work if locksetup has not been executed... lockunsetup Usage: lockunsetup Clean all lock stuff locksave Usage: locksave [filename] Saves the lock state into a file. Can be restored later with lockrestore !! take care : if saving in an existing file, the file is not flushed... lockrestore Usage: lockrestore [filename] Restores saved by a previous locksave. lockclear Usage: lockclear Clears all the locks in the system. lock Usage: lock motor [comment] [user] Locks a motor for moving. Comment (like reason of the locking) and a name identifying the user should be given in the command line or the macro will prompt for them. unlock Usage: unlock motor Clear the lock for a motor. lockshow Usage: lockshow Shows a list of all the locks in the system. | ||||||
Internal Macros: | ||||||
Usage: _lockmess (motor_number) Prints a short message on the screen informing that the motor is locked. _lockcheck Usage: _lockcheck _lockgetangles Usage: _lockgetangles | ||||||
|