Motor Controls & Drive Ferdi Franceschini 2008-11-08 12:48 Drive commands Many objects in SICS are drivable . This means they can run to a new value. Obvious examples are motors. Less obvious examples include composite adjustments such as setting a wavelength or an energy. Such devices are also called virtual motors. This class of objects can be operated by the drive, run, Success family of commands. These commands cater for blocking and non-blocking modes of operation. Commands run mot1 pos1 mot2 pos2 ... runs mot1 to pos1, mot2 to pos2, ... success waits and blocks the command connection until all pending operations have finished (or an interrupt occured). drive mot1 pos1 mot2 pos2 ... is the same as run but it blocks the client that requested the drive from issuing commands until the motion has finished. Can be called with one to n pairs of object new value pairs. This command will set the variables in motion and wait until the driving has finished. A drive can be seen as a sequence of a run command as stated above immediatly followed by a Success command setpos mot newPosition Sets the current position value of mot to newPosition setpos mot oldPosition newPosition Sets the position value of oldPosition to newPosition mot OR mot position prints the current position of the motor. All zero point and sign corrections are applied mot hardposition prints the current position of the motor. No corrections are applied. Should read the same as the controller box mot list prints the configuration parameters for a motor, eg counts and steps per mm/degree etc. mot slist prints the Galil address, port number, and axis label for a motor. mot data prints the number of steps and counts per mm or degrees, and steps per count mot send sends a Galil command directly to the controller, this only works if you login as manager. e.g. m1 send MG _XQ m1 send RUNF = 0 m1 send TPE NOTE: You can use the following shortcut for TP and TD so you don’t need to know the axis name. m1 send TP` m1 send TD` mot reset resets the motor parameters to default values. This is software zero to 0.0 and software limits are reset to hardware limits mot interest initiates automatic printing of any position change of the motor. This command is mainly interesting for implementors of status display clients. mot uninterest disables interest mot homerun homerun with no arguments reports the current status, a value of "1" means that the motors have been homed. homerun 1 will run the homing routine. Used on motors with relative encoders e.g. slit motors. list mot Returns the motor's type. Appears to be broken. Configurable virtual motors do not have a list subcommand. Parameters mot absenc Privilege = User Get the absolute encoder reading.  (Only implemented by motors that have absolute encoders.) mot accel val Privilege = User Get/Set the acceleration along/about the axis controlled by this motor in physical units per square second, ie mm/s^2, deg/s^2 mot accesscode val (persists) Default = i.e. user Privilege = Manager Controls which type of user is allowed to control the motor Allowed val Internal. Motor is reserved for internal use by SICS Manager. Only users who logon as managers are allowed to move the motor. Usually just instrument scientists User Spy. Anyone is allowed to move the motor mot blockage_check_interval val Privilege = Manager Units = seconds Get/Set the interval at which the motor driver checks the axis for significant changes in position mot decel val Privilege = User Get/Set the deceleration along/about the axis controlled by this motor in physical units per second, ie mm/s2, deg/s2. mot failafter val Privilege = Manager This is the number of consecutive failures of positioning operations this motor allows before it thinks that something is really broken and aborts the experiment mot fixed val (persists) Default = 1.0 Privilege = User Set to 1.0 to prevent the motor from being moved, set to -1.0 to allow movement. NOTE: The instrument manager can set the accesscode to prevent users from moving a motor. mot home val subject to change. This may be changed to a configuration only parameter Privilege = Manager Get/Set the home position for the axis which the motor controls, (ie phi, chi, two-theta, x, y).  So it is the physical home position in the units given by the units parameter below, (ie mm, degrees, ...) mot ignorefault val (persists) Position faults will be ignored if this is greater than zero mot interruptmode val (persists) Default = 0 (continue) Privilege = Manager Controls what effect a motor failure has on operations Allowed val one of: Continue. A motor failure will not affect other operations AbortOperation. Stop current hardware operation but no scans or batchfiles AbortScan. Stop current scan or operation but continue processing of batch files with next command AbortBatch. Stop all processing, even batch files mot maxretry val Default = Privilege = Manager The number of times that SICS will retry a move if a motor has not reached the target position to within the required precision mot movecount val (persists) Default= Privilege = Manager Controls frequency with which position changes are reported if a user subscribes interest to a motor.  A larger value reduces the frequency mot precision val (persists) Privilege = Manager Controls precision of movements.  If a motor has not completed a move to the required precision then the move command will be resent.  The number of retries is controlled by the maxretry parameter. mot sign val (persists) Default = Privilege = Manager Controls direction of motion, set to -1 to reverse. mot softlowerlim val (persists) Privilege = User Get/set lower software limit.  This is automatically adjusted when you set the softzero or use the setpos command. mot softupperlim val (persists) Privilege = User Get/set upper software limit.  This is automatically adjusted when you set the softzero or use the setpos command. mot softzero val (persists) Default = 0 Privilege = User Sets the zero position to val. You probably want to use setpos described below, it's easier to understand.  mot speed val Privilege = User Get/Set the speed of motion along/about the axis controlled by this motor in physical units per second, ie mm/s, deg/s. mot units val Privilege = User Get/Set the physical units Preferred val: <command>list </command>output mot list shows the values of the parameters listed below, in the order listed below. Position Reports the current positon TargetPosition Shows target position hardlowerlim Hardware lower limit for motor set in SICS configuration file hardupperlim Hardware upper limit for motor set in SICS configuration file softlowerlim Lower software limit.  This is automatically adjusted when you set the softzero or use the setpos command. softupperlim Upper software limit.  This is automatically adjusted when you set the softzero or use the setpos command. softzero The zero position. fixed prevents movement allows movement. NOTE: The instrument manager can set the accesscode to prevent users from moving a motor. interruptmode Controls what effect a motor failure has on operations Values: Continue. A motor failure will not affect other operations AbortOperation. Stop current hardware operation but no scans or batchfiles AbortScan. Stop current scan or operation but continue processing of batch files with next command AbortBatch. Stop all processing, even batch files precision Controls precision of movements.  If a motor has not completed a move to the required precision then the move command will be resent.  The number of retries is controlled by the maxretry parameter. accesscode Controls which type of user is allowed to control the motor Allowed values: Internal. Motor is reserved for internal use by SICS Manager. Only users who logon as managers are allowed to move the motor. Usually just instrument scientists User Spy. Anyone is allowed to move the motor sign Default = 1 Privilege = Manager Controls direction of motion, set to -1 to reverse. failafter This is the number of consecutive failures of positioning operations this motor allows before it thinks that something is really broken and aborts the experiment maxretry The number of times that SICS will retry a move if a motor has not reached the target position to within the required precision ignorefault Position faults will be ignored if this is greater than zero movecount Default=10 Controls frequency with which position changes are reported if a user subscribes interest to a motor.  A larger value reduces the frequency home home position for the axis which the motor controls, (ie phi, chi, two-theta, x, y).  So it is the physical home position in the units given by the units parameter below, (ie mm, degrees, ...) speed The speed of motion along/about the axis controlled by this motor in physical units per second, ie mm/s, deg/s. maxSpeed Speed in units/s accel Acceleration along/about the axis controlled by this motor. Configurable maxAccel Maximum allowed acceleration in units/s2 decel Deceleration along/about the axis controlled by this motor. Configurable maxDecel Maximum allowed deceleration in units/s2 motOffDelay Number of msec to wait before switching off a motor after a move Default = Debug Settle Blockage_Check_Interval Blockage_Thresh Blockage_Ratio Blockage_Fail Backlash_offset Protocol absEncoder Allowed values: no absolute encoder absolute encoder enabled absEncHome The calibrated "home" position in encoder counts Required if absEncoder = 1 cntsPerX Number of absolute encoder counts per unit of movement along/about the axis of motion Creep_Offset Creep_Precision posit_count posit_1 posit_2 posit_3 stepsPerX Number of motor steps per unit of movement along/about the axis of motion Instrument specific drive commands Many objects in SICS are drivable . This means they can run to a new value. Obvious examples are motors. Sometimes you might want to do something special with a motor, like run it in an oscillation mode, such as an oscillating collimator or attenuator. The commands in this section relate to these instrument specific cases. These commands are generally non-blocking mode. These commands do not apply to all instruments radcol start n Applicable to Pelican Runs the rco motor for n cycles.