# SICS motor handling

In SICS each motor is an object with a name. Motors may take commands which basically come in the form motorname command . Most of these commands deal with the plethora of parameters which are associated with each motor. The syntax for manipulating variables is, again, simple. Motorname parametername will print the current value of the variable. Motorname parametername newval will set the parameter to the new value specified. A list of all parameters and their meanings is given below. The general principle behind this is that the actual (hardware) motor is kept as stupid as possible and all the intracacies of motor control are dealt with in software. Besides the parameter commands any motor understands these basic commands:

- Motorname list gives a listing of all motor parameters.
- Motorname reset resets the motor parameters to default values. This is software zero to 0.0 and software limits are reset to hardware limits.
- Motorname position prints the current position of the motor. All zero point and sign corrections are applied.
- Motorname hardposition prints the current position of the motor. No corrections are applied. Should read the same as the controller box.
- Motorname interest initiates automatic printing of any position change of the motor. This command is mainly interesting for implementors of status display clients.

Please note that the actual driving of the motor is done via the drive command.

## The motor parameters

- HardLowerLim is the hardware lower limit. This is read from the motor controller and is identical to the limit switch welded to the instrument. Can usually not be changed.
- HardUpperLim is the hardware upper limit. This is read from the motor controller and is identical to the limit switch welded to the instrument. Can usually not be changed.
- SoftLowerLim is the software lower limit. This can be defined by the user in order to restrict instrument movement in special cases.
- SoftUpperLim is the software upper limit. This can be defined by the user in order to restrict instrument movement in special cases.
- SoftZero defines a software zero point for the motor. All further movements will be in respect to this zeropoint.
- Fixed can be greater then 0 for the motor being fixed and less then or equal to zero for the motor being movable.
- InterruptMode defines the interrupt to issue when the motor fails. Some motors are so critical for the operation of the instrument that all operations are to be stopped when there is a problem. Other are less critical. This criticallity is expressed in terms of interrupts, denoted by integers in the range 0 - 4 translating into the interrupts: continue, AbortOperation, AbortScan, AbortBatch and Halt. This parameter can usually only be set by managers.
- Precision denotes the precision to expect from the motor in positioning. Can usually only be set by managers.
- AccessCode specifies the level of user privilege necessary to operate the motor. Some motors are for adjustment only and can be harmful to move once the adjustment has been done. Others must be moved for the experiment. Values are 0 - 3 for internal, manager, user and spy. This parameter can only be changed by managers.
- Sign reverses the operating sense of the motor. For cases where electricians and not physicists have defined the operating sense of the motor. Usually a parameter not to be changed by ordinary users.