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 ; example: D2HR list.

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:

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


The motor parameters

This list of parameters may be enhanced buy driver specific parameters. motor list will show all parameters.

Motor Error Handling Concepts

As mechanical components motors are prone to errors. SICS knows about two different classes of motor errors:

HWFault
This is when there is a problem communicating with the motor, a limit is violated etc. SICS assumes that such errors are so grave that no fix is possible. If such a HWFault is detected a configurable interrupt (see parameter InterruptMode) is set which can be used by upper level code to act upon the problem.
HWPosFault
This is a positioning failure, i.e. The motor did not reach the desired position. Such a positioning problem can come from two sources:
In any case lots of warnings and infos are printed.

If SICS tries to drive an axis which is broken hardware damage may occur (and HAS occurred!). Now, SICS has no means to detect if the mispositioning of a motor is due to a concrete block in the path of the instrument or any other reason. What SICS can do though is to count how often a motor mispositions in sequence. This means SICS increments a mispositioning counter if it cannot drive a motor, if the motor is driven succesfully, the mispositioning counter is cleared. If the count of mispositionings becomes higher then the parameter failafter, SICS thinks that there is something really, really wrong and aborts the measurement and prints an error message containing the string: MOTOR ALARM.

There are some common pitfalls with this scheme:

You want upper level code to be signalled when your critical motor fails.
Solution: set the parameter interruptmode to something useful and check for the interrupt in upper level code.
SICS falsly reports mispositionings.
Solution: increase the precision parameter.
You know that a motor is broken, you cannot fix it, but you want to measure anyway.
Solution: increase the precision parameter, if SICS finds the positioning problem, increase maxretries, increase the failafter parameter. In the worst case set the ignorefault parameter to greater 0, this will prevent all motor alarms.