Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
STACKED.MAC | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
A stacked pseudomotor is a combination of a real motor and piezoelectric actuator that drive the same axis. The motor and piezo are used as coarse and fine adjustments of the position of the axis. The whole axis is described by a pseudomotor `combined', while two other motors `coarse' and `fine' represent the two independent adjustments. Three different modes of operation (OFF, ON and AUTO) are provided by this macro set. The modes ON and AUTO require a high resolution encoder that provides the position of the combined axis. The particularities of modes of operation are the following: EXAMPLE SETUP | ||||||
Macros:
Usage: stackedshow stackedmode Usage: stackedmode [AUTO | ON | OFF [axis]] Lets the user change the operation mode of the stacked axis. In the mode `ON' the position of the axis is determined from the encoder. In the mode `OFF' it is calculated from the voltage applied to the piezo. The names `ON' and `OFF' for the operation modes are not very convenient and should be changed in the future to something meaningful. The value `BAD' is not an operation mode, it indicates that an error was detected during the configuration of the respective axis. onstacked Usage: onstacked [axis_number] offstacked Usage: offstacked [axis_number] autostacked Usage: autostacked [axis_number] stackedoffset Usage: stackedoffset [axis_number] stackedsetup Usage: stackedsetup coarse fine combined mode threshold piezo_dev calibP [encoder_dev calibE] Configures a stacked axis. `coarse', `fine' and `combined' are the mnemonics of the motor that constitute the axis. `mode' is the default operation mode for this axis. Valid operation modes are 0, 1 or 2 (OFF, ON and AUTO). `mode' is a default value, if the axis was already defined the current value is used and `mode' is ignored. `threshold' is a parameter from 0 to 1 that indicates the range that ... `piezo_dev' and `encoder_dev' are the names of the devices associated to the DAC that drives the piezo and the channel of the encoder respectively. The values `calibP' and `calibE' are the multiplicative factors that convert from piezo and encoder units to motor units. stackeddebug Usage: stackeddebug <dummy parameter> | ||||||
Internal Macros: | ||||||
Usage: stackedput axis coarse fine combined mode threshold piezodev calibP [encoderdev calibE] Loads configuration parameters in the main global variable. stackedmodeget Usage: stackedmodeget axis mode_variable stackedmodeput Usage: stackedmodeput axis newmode stackedget Usage: stackedget axis _stackedmode Usage: _stackedmode stackedunsetup Usage: stackedunsetup coarse stackedconfig Usage: stackedconfig [dummy_parameter] Configures all the stacked axis. If an error is found in the configuration of an axis, the mode is st to `BAD' (-1) and a message is printed. If the macro is invoked whit a parameter messages are supressed. stackedcheckall Usage: stackedcheckall Checks the movements of the stacked axes. Calculates the final position of the `coarse' and `fine' motors. When a `fine' stage has to be adjusted, this macro sets a flag in STCKSTAT and calculates the goal value. The goal value is stored in STCKVAL and is the desired piezo voltage or encoder position (according to the operation mode). stackedfinished Usage: stackedfinished This macro is executed when all the normal motors have completed their movements, including the `coarse' motors of the stacked axes. The fine stages are ramped to their goal positions by adjusting the voltages in the piezos. The amplitud of the maximum voltage step is STCKVSTEP. stackedgetangles Usage: stackedgetangles Calculates the position of the `fine' and `combined' motors in the stacked axes (`coarse' is always obtained from the motor controller). In mode ON the position of `combined' is read from the encoder and `fine' is calculated as the difference respect `coarse'. In mode OFF `fine' is calculated from the voltage in the piezo and `combined' is obtained as the sum of the other two. In mode ON it may be an offsset between the zeros of the `coarse' motor and the encoder, in mode OFF that is not the case. | ||||||
|