Parameter

check_motor_registers( [flag]), cmr()
If this function returns 1, the motor registers and the device list contain the identical step positions. This may be because the hardware and software contained the same values when the function was called or because the differences had been fixed.

If cmr() is called from exp_ini.exp, the user is not prompted for directives. Instead cmr() decides what to do according to the following table:

The preceding Online session did not terminate by a crash (no /online_dir/online.lock):

The preceding Online session did terminate by a crash ( found /online_dir/online.lock):

Examples:

Experts may edit /online_dir/exp_ini.exp to comment load/nocon and call cmr() from the command line.

Cmr() writes a record to online.log which describes what has been done.

SPECTRA creates a log file on /online_dir when it resets the registers. The file name is check_motor_registers.log. Mind that the files /online_dir/motor_positions*.bck may be used for a post mortem analysis of the motor positions.
e.g.:
say " check motor registers returns "cmr()

convert_to_relative_steps(motor_id, unit), cvtrs()
Converts units to steps, unit is a relative quantity. The result may be negative.

get_min_move_time( motor_id), gmmt()
set_min_move_time( motor_id) = float_expr, smmt()
VME feature. Returns/sets the minimum time for a motor movement (not valid for backlashes).

get_motor_acceleration( motor_id), gma()
set_motor_acceleration( motor_id) = int_expr, sma()
Returns/sets the acceleration of the specified motor.

e.g.:
* = get_motor_acceleration( mot1)

get_motor_base( motor_id), gmb()
set_motor_base( motor_id) = int_expr, smb()
Returns/sets the base rate of the specified motor, i.e. the speed that is used when a motor is started (steps/second).
e.g.:
* = get_motor_base( mot1)

get_motor_conversion( motor_id), gmc()
set_motor_conversion( motor_id) = int_expr, smc()
Returns/sets the conversion factor of the specified motor, i.e. the number of steps that add up to one unit.
e.g.:
* = get_motor_conversion( mot1)

get_motor_flag_cutormap( motor_id), gmfcom()
set_motor_flag_cutormap( motor_id) = int_expr, smfcom()
Returns/sets the flag that specifies the meaning of the cutormap parameter: 0 - ignore, 1 - cut, 2 - mapping point.
e.g.:
* = get_motor_flag_cutormap( mot1)

get_motor_cutormap( motor_id), gmcom()
set_motor_cutormap( motor_id) = float_expr, smcom()
Returns/sets the cutormap parameter, see the explanations in 13.16.3.
e.g.:
* = get_motor_cutormap( mot1)

get_motor_d( motor_id), gmd()
set_motor_d( motor_id) = float_expr, smd()
Returns/sets the P parameter for servo motors, e.g.:
* = get_motor_d( mot1)

get_motor_i( motor_id), gmi()
set_motor_i( motor_id) = float_expr, smi()
Returns/sets the I parameter for servo motors, e.g.:
* = get_motor_i( mot1)

get_motor_p( motor_id)
set_motor_p( motor_id) = float_expr, smp()
Returns/sets the P parameter for servo motors, e.g.:
* = get_motor_p( mot1)

get_motor_limits_status( motor_id), gmt()
Returns the limits status: 0 no limits, 1 cw limit, 2 ccw limit, 3 both. The CW limit is at the maximum step position, at the max. unit position, if the conversion factor is greater than 0. e.g.:
* = get_motor_limits_status( mot1)

get_move_time( motor_id, float_expr delta[, flag]), gmt()
Returns the time [sec] that ot takes to move motor_id by a distance of delta. If flag is supplied, debugging information is displayed.
e.g.:
* = gmt( mot1, 12)

get_motor_protection( motor_id)
set_motor_protection( motor_id) = 1
set_motor_protection( motor_id) = 0
Returns/sets the protection status of a motor. the protection status can be changed, if the priviledge bit is set: “priv on”.
e.g.:
* = get_motor_protection( mot1)

get_motor_ramp_steps( device_id), gmrs()
get_motor_ramp_units( device_id), gmru()
Returns the number of steps/units that the motor needs until it reaches the full speed (slew rate).
e.g.:
* = gmru( mot1)

get_motor_settle_time( motor_id), gmst()
set_motor_settle_time( motor_id) = float_expr, smst()
Returns/sets the settle time of the specified motor. This time is used to sleep after every movement.
e.g.:
* = get_motor_settle_time( mot1)

get_motor_slew( motor_id), gms()
set_motor_slew( motor_id) = int_expr, sms()
Returns/sets the slew rate of the specified motor, i.e. the number of steps per second ( VPAP: [20,14925], OMS: [20,1044000]).
e.g.:
* = get_motor_slew( mot1)

get_motor_slew_max( motor_id), gmsa()
set_motor_slew_max( motor_id) = int_expr, smsa()
Returns/sets the upper limit of the slew rate of the specified motor.
e.g.:
* = get_motor_slew_max( mot1)

get_motor_slew_min( motor_id), gmsi()
set_motor_slew_min( motor_id) = int_expr, smsi()
Returns/sets the lower limit of the slew rate of the specified motor.
e.g.:
* = get_motor_slew_min( mot1)

get_motor_step_backlash( motor_id), gmsb()
get_motor_unit_backlash( motor_id), gmub()
set_motor_step_backlash( motor_id), smsb()
set_motor_unit_backlash( motor_id), smub()
Returns/sets the backlash, int steps or units. If the unit backlash is positive, the correction is done going from high to low.
e.g.:
* = get_motor_step_backlash( mot1)

get_motor_unit_calibration( motor_id), gmuc()
set_motor_unit_calibration( motor_id), smuc()
Tango feature: Returns/sets the units of the calibration point.

get_motor_accu_limit_min( motor_id), gmali()
get_motor_accu_limit_max( motor_id), gmala()
These functions return the motor limits in steps. The values reflect the size of the registers. For the OMS VME58 the limits are -33500000 and 33500000, for the MAXV -64000000 and 64000000,
e.g.:
* = get_motor_accu_limit_min( mot1)

get_motor_step_limit_min( motor_id), gmsli()
get_motor_step_limit_max( motor_id), gmsla()
get_motor_unit_limit_min( motor_id), gmuli()
get_motor_unit_limit_max( motor_id), gmula()
set_motor_step_limit_min( motor_id) = int_expr, smsli()
set_motor_step_limit_max( motor_id) = int_expr, smsla()
set_motor_unit_limit_min( motor_id) = float_expr, smuli()
set_motor_unit_limit_max( motor_id) = float_expr, smula()
Returns/sets the software motor limits, in steps or units.
e.g.:
* = get_motor_step_limit_min( mot1)

get_motor_unit_position( device_id), gmup()
Returns the position of a motor. Before the function gives a meaningful result, the conversion factor has to be defined and the motor must have been calibrated.
e.g.:
* = get_motor_unit_position( mot1)

get_motor_step_register_controller( device_id), gmsrc()
Returns register contents of the controller. The controller occupies a slot in a CAMAC or VME crate. The controller contents and the internal values that are stored in the device list ( get_motor_step_register_internal()) always have to be identical. See the explanations of page [*], if that is not the case.
e.g.:
* = get_motor_step_register_controller( mot1)

get_motor_step_register_internal( device_id), gmsri()
Returns the internal step position of a motor. The value has to be identical to the controller contents, which is checked by get_motor_step_register_internal(). See the explanations of page [*], if that is not the case.
e.g.:
* = get_motor_step_register_internal( mot1)

reset_motor_step_position( device_id) = int_expr, rmsp()
Sets the internal and controller register to some value. This value is used for the calculation of the motor position. That means this command is am implicit calibration.

This function is useful, if the controller and the internal register do not have the same values. Maybe because the crate wasn't powered for some time. This function allows you to decide who is right. See page [*] for more details.

e.g.:
rmsp(mot1) = gmsri(mot1)
The position is calculated from the internal value.

reset_motor_step_register( device_id) = int_expr, rmsr()
set_motor_step_register_controller( device_id) = int_expr, smsrc()
set_motor_step_register_internal( device_id) = int_expr, smsri()
Sets the internal and controller register to some value. The current position is not changed. The functions are equivalent.
e.g.:
rmsr(mot1) = 0



Subsections