Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
SAFSHUT.MAC | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
These macros give access from spec to the safety beam shutters that are controlled by Taco or Tango device servers through the beamline PLC's. An arbitrary name is given to each shutter in the safshutsetup macro. A particular shutter can be identified by means of its name or its number. The number of a shutter corresponds to the relative position, starting from 0, where it appears in the safshutsetup line. Whenever a shutter action (shopen, shclose or shosh) is invoked whithout especifying a name or a number, the action affects the active shutter. The active shutter is the one that was most recently accessed or selected with shsel. EXAMPLE SETUP The safshutsetup macro has to be executed with the proper parameters. DEPENDENCIES This macro set relies on the proper installation and configuration of the device servers that control the safety shutters. ATTENTION These macros only affect the safety beam shutters, and have nothing to do with the control of auxiliary shutters implemented in `shut.mac'. | ||||||
Macros:
Usage: safshutsetup [<shutter-name> <shutter-device>]+ Defines the shutters to be accessed. Each shutter is described by an arbitrary single-word name <shutter-name> and by the name of the device <shutter-device> that the corresponding device server uses to identify this particular shutter. This macro doesnt check if the device names are valid or if they correspond to properly configured devices. If safshutsetup is called without parameters, the control of safety shutters from spec is disabled. ??? ex : safshutsetup eh1 id22/bsh/1 eh2 id22/bsh/2 ex : safshutsetup eh1 id22/v-bsh/1 eh2 id22/v-bsh/2 shopen Usage: shopen [<shutter-name> | <shutter-number>] Opens a safety shutter. Without parameters : opens the active shutter. shclose Usage: shclose [<shutter-name> | <shutter-number>] Closes a safety shutter. Without parameters : closes the active shutter. shosh Usage: shosh [<shutter-name> | <shutter-number> | all] Shows the state of a safety shutter. Without parameters shows the current state of the active shutter. With the literal string `all' as parameter, this macro shows the state of all the shutters defined with safshutsetup. shsel Usage: shsel [shutter-name | shutter-number] Lets the user select the active shutter. This macro is also internally called from shopen, shclose and shosh. If the macro is called without parameter or the parameter doesnt correpond to a valid shutter, shsel lists the currently defined shutters and prompts the user for a selection. | ||||||
Internal Macros: | ||||||
Usage: safshutunsetup Undoes the setup shset Usage: shset [ <state> ] [<shutter-name> | <shutter-number>] Changes the state of a safety shutter. If <state> is "OPEN", "open" or 1, the shutter is open, otherwise it is closed. If no shutter is specified it affects the active shutter. Without parameters : it closes the active shutter. _shset Usage: _shset (val,shut) Changes the state of a safety shutter. If val is 1, the shutter shut is open, otherwise it is closed. Returns the state of the shutter, -1 if shutter not defined. _shsel Usage: _shsel (shut) Set shut as active shutter. Return the device name or -1, if the shutter is not defined. shstate Usage: shstate (state) If not in simulation mode, returns the state of the shutter. If in simulation mode, returns the state value. shstatus Usage: shstatus (state) If not in simulation mode, returns the state of the shutter as a string. If in simulation mode, returns the state value. _bshstate Usage: _bshstate (device) Reads and returns the state (number) of the shutter <device>. tango_shstate_to_str Usage: tango_shstate_to_str(_ss) _bshstatus Usage: _bshstatus (_ss) Return the string value corresponding to the <_ss> state value. _bshopen Usage: _bshopen (<device>) Opens the <device> shutter. _bshclose Usage: _bshclose (device) Close the device shutter. | ||||||
|