Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
UDIFF_MM.MAC | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
The macro set offers the possibility to set-up the microdiff TANGO attributes as macro motors. Only read/write TANGO attributes can be used as a macro motor. The macro motor controller defined in spec config is called udiff_mot and has as the ADDR the device server device (e.g. id29/microdiff/1) For each motor the root_attr additional parameter shoud be configured (e.g.MOTPAR:root_attr = Phi). If the end of the attribute is not Position, another additional parameter add_attr shoud beconfigured. Thus the name of the attribute sent to the device server is the combination of root_attr and add_attr. To move the minikappa motors simultaneously when calibrating the minicapppa with STAC, the move_sync parameter specifies the motor name as in the minikappasetup. DEPENDENCIES microdiff.mac | ||||||
Macros:
| ||||||
Internal Macros: | ||||||
Usage: udiff_mot_config (motn, type, unit, module, chan) Called after reading the config file. If return the string ".error.", spec will consider the channel unusable. We only use motn and type parameters. udiff_mot_cmd Usage: udiff_mot_cmd (motn, key, p1, p2) Execute the command key for the motor motn, with parameters p1 and p2 if needed. The keys used are as follows: "position" - must return the current motor position in dial units. Parameters:none. "get_status" - get the move and limit status of individual motors. Must return bit mask - bits set to 0x02 - moving, 0x04 - low limit active, 0x08 - high limit is active, 0x10 - "emergency stop" and 0x20 - motor fault, 0 otherwise. Use the MotorStates tango attribute decoded for each motor. Parameters:none. "prestart_one" - sent for each motor that needs to be moved - we need to test the microdiff state. If different that 7 (STANDBY), the move is canceled. Parameters:none. "start_one" and "set_position" -start a move for one motor. Parameters: p1 - target position in dial units. "abort_one" - sent when motors are halted, either by a ^C from the keyboard or by a stop() command - only general reset of the microdiff available. Parameters:none. Return the string ".error.", spec will consider the channel unusable. udiff_getprops Usage: udiff_getprops (motn) Get the motor properties "tango_dev", "root_attr", "add_attr". udiff_getpropsc Usage: udiff_getpropsc (mot) Get the counter properties get_state Usage: get_state (_stat, motn) Return the state of the motor motn extracted from the string(MD2) or array(MD3) _stat | ||||||
|