Motor
Abstract class for stepper motors
A stepper motor is generally used to control the position of an axe. It has a certain number of standard tuning parameters such as acceleration, velocity, first step rate. It's position can be controlled. Usually the velocity has a trapezoidal shape. the motor starts at a "fist_step"rate, then accelerate until a cruise speed, then decelerate until the destination position.
The present abstract class implements all these parameters as memorized attributes. i.e. the set value is automatically re-applied when starting the server. The position in step or in natural unit are also implemented as attributes. To move the motor in natural unit, you have just to write a new
value to the Position attribute or to the Step attribute depending on
the unit you chose.
A standard ATK java panel is available to provide a comfortable interface to any device deriving from this abstract class.
Version 1-1
Commands
The following commands must be implemented :
- On - switch ON the power on the motor controller (state = ON)
- Off -switch OFF the power on the motor controller (state = OFF)
- Stop - stop immediately the current movment (state = OFF)
- GoHome - Move the the home switch position.
- StepUp - Perform a relative movment in the forward direction of StepSize physical units. StepSize being defined as an attribute.
- StepDown - Perform a relative movment in the backward direction of StepSize physical units. StepSize being defined as an attribute.
Attributes
The following attributes must be implemented :
| Attribute | Type | Access | Description | |
|---|---|---|---|---|
| Steps_per_unit | DOUBLE | RW | memorized | number of steps per natural unit.(mm, degree etc...) |
| Steps | LONG | RW | memorized | number of step in the step counter. A Write on this attribute starts the movment to the desired number of steps |
| Position | DOUBLE | RW | position expressed in natural unit (mm, degree etc..) it is proportional to the Steps attribute. A Write on this attribute starts the movment to the desired position | |
| FirstStepVelocity | LONG | RW | memorized | starting speed in steps/s |
| Acceleration | LONG | RW | memorized | number of step/s2 in the acceleration phase |
| Velocity | LONG | RW | memorized | cruise velocity in steps/s |
| Backlash | DOUBLE | RW | memorized | number of natural unit for correcting the mechanical backlash. It can be positive or negative. |
| Home_position | DOUBLE | RW | memorized | Position of the home switch expressed in natural unit |
| Home_side | BOOLEAN | RO | True when the axis is above the home switch position, False if below. | |
| Limitlow | BOOLEAN | RO | True when the low limit switched is pressed | |
| Limitup | BOOLEAN | RO | True when the upper limit switch is pressed | |
| PresetPosition | DOUBLE | RW | used to load the step counter with a preset value after conversion. It is expressed in natural unit. | |
| StepSize | DOUBLE | RW | memorized | size of the step performed by the StepUp and StepDown commands |
States
The following states must be implemented :
- ON - the motor is powered
- OFF - the motor is not powered
- FAULT - the motor controller indicates a fault.
- ALARM - a limit switch is pressed or the motor controller indicates an alarm
- MOVING - the motor is moving
Properties
Calibrated: Boolean property used to lock/unlock a certain number of parameters when the axis has been calibrated and all the parameters have been tuned depending on the masses, inertia, backlash etc...When this property is different from 0, the motor is considered as calibrated and a certain number of attributes cannot be changed anymore.( e.g. step_per_unit, acceleration, backlash...) The goal is to avoid undesired change when the calibration process has been performed.
Implementations
The following device servers implement the motor abstract class :
- Vpapmotor - for VPAP VME 8 axis stepper motor controller
- MultipleAxes - group of several Vpapmotor axes. each motor position is represented as an attribute of a single device.
Clients
The following client programs depend on the Motor interface :
- papmotorframe panel in atk
- jmaxe atk GUI application
Contact
Please contact Jean-Michel Chaize (chaize at esrf dot fr) if you want to make proposals to change this interface or have questions about it.