Motor Controls & Drive Ferdi Franceschini2008-11-08 12:48Drive commandsMany 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.Commandsrun mot1 pos1 mot2 pos2 ...runs mot1 to pos1,
mot2 to pos2,
...successwaits 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 commandsetpos mot newPositionSets the current position value of mot to
newPositionsetpos mot oldPosition newPositionSets the position value of oldPosition to
newPositionmot OR motpositionprints the current position of the motor. All zero point and sign
corrections are appliedmothardpositionprints the current position of the motor. No corrections are applied.
Should read the same as the controller boxmotlistprints the configuration parameters for a motor, eg counts and steps per
mm/degree etc.motslistprints the Galil address, port number, and axis label for a motor.motdataprints the number of steps and counts per mm or degrees, and steps per
countmotsendsends 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` motresetresets the motor parameters to default values. This is software zero to
0.0 and software limits are reset to hardware limitsmotinterestinitiates automatic printing of any position change of the motor. This
command is mainly interesting for implementors of status display
clients.motuninterestdisables interestmothomerun 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 motReturns the motor's type.Appears to be broken. Configurable virtual motors do not have a list subcommand.ParametersmotabsencPrivilege = UserGet the absolute encoder reading. (Only implemented by motors that have
absolute encoders.)motaccelvalPrivilege = UserGet/Set the acceleration along/about the axis controlled by this motor in
physical units per square second, ie mm/s^2, deg/s^2motaccesscodeval(persists)Default = i.e. userPrivilege = ManagerControls which type of user is allowed to control the motorAllowed 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 motormotblockage_check_intervalvalPrivilege = ManagerUnits = secondsGet/Set the interval at which the motor driver checks the axis for
significant changes in positionmotdecelvalPrivilege = UserGet/Set the deceleration along/about the axis controlled by this motor in
physical units per second, ie mm/s2,
deg/s2.motfailaftervalPrivilege = ManagerThis is the number of consecutive failures of positioning operations this
motor allows before it thinks that something is really broken and aborts the
experimentmotfixedval(persists)Default = 1.0Privilege = UserSet 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.mothomevalsubject to change. This may be changed to a configuration only
parameterPrivilege = ManagerGet/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, ...)motignorefaultval(persists)Position faults will be ignored if this is greater than zeromotinterruptmodeval(persists)Default = 0 (continue)Privilege = ManagerControls what effect a motor failure has on operationsAllowed 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
filesmotmaxretryvalDefault = Privilege = ManagerThe number of times that SICS will retry a move
if a motor has not reached the target position to within the required
precisionmotmovecountval(persists)Default=Privilege = ManagerControls frequency with which position changes are reported if a user
subscribes interest to a motor. A larger value reduces the frequencymotprecisionval(persists)Privilege = ManagerControls 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.motsignval(persists)Default = Privilege = ManagerControls direction of motion, set to -1 to reverse.motsoftlowerlimval(persists)Privilege = UserGet/set lower software limit. This is automatically adjusted when you set
the softzero or use the setpos command.motsoftupperlimval(persists)Privilege = UserGet/set upper software limit. This is automatically adjusted when you set
the softzero or use the setpos command.motsoftzeroval(persists)Default = 0Privilege = UserSets the zero position to val. You probably
want to use setpos described below, it's easier to
understand. motspeedval Privilege = UserGet/Set the speed of motion along/about the axis controlled by this motor
in physical units per second, ie mm/s, deg/s.motunitsval Privilege = UserGet/Set the physical unitsPreferred val:list output mot list shows the values of the
parameters listed below, in the order listed below.PositionReports the current positonTargetPositionShows target positionhardlowerlim Hardware lower limit for motor set in SICS configuration filehardupperlim Hardware upper limit for motor set in SICS configuration filesoftlowerlimLower software limit. This is automatically adjusted when you set the
softzero or use the setpos command.softupperlimUpper software limit. This is automatically adjusted when you set the
softzero or use the setpos command.softzeroThe zero position. fixed prevents movement allows movement.NOTE: The instrument manager can set the accesscode to prevent users from
moving a motor.interruptmodeControls what effect a motor failure has on operationsValues: 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
filesprecisionControls 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.accesscodeControls which type of user is allowed to control the motorAllowed 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 motorsignDefault = 1Privilege = ManagerControls direction of motion, set to -1 to reverse.failafterThis is the number of consecutive failures of positioning operations this
motor allows before it thinks that something is really broken and aborts the
experimentmaxretryThe number of times that SICS will retry a move
if a motor has not reached the target position to within the required
precisionignorefaultPosition faults will be ignored if this is greater than zeromovecountDefault=10Controls frequency with which position changes are reported if a user
subscribes interest to a motor. A larger value reduces the frequencyhomehome 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,
...)speedThe 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/saccelAcceleration along/about the axis controlled by this motor. ConfigurablemaxAccel Maximum allowed acceleration in
units/s2decelDeceleration along/about the axis controlled by this motor. ConfigurablemaxDecel Maximum allowed deceleration in
units/s2motOffDelay Number of msec to wait before switching off a motor after a moveDefault = Debug Settle Blockage_Check_Interval Blockage_Thresh Blockage_Ratio Blockage_Fail Backlash_offset Protocol absEncoder Allowed values: no absolute encoder absolute encoder enabledabsEncHome The calibrated "home" position in encoder countsRequired if absEncoder = 1cntsPerX Number of absolute encoder counts per unit of movement
along/about the axis of motionCreep_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 motionInstrument specific drive commandsMany 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 instrumentsradcol start nApplicable to PelicanRuns the rco motor for n cycles.