EPICS Motor Module motor-R6-8-RC1_1-4
Typedefs
Routines that initiate and stop motion

Typedefs

typedef int(* motorAxisMoveFunc )(AXIS_HDL pAxis, double position, int relative, double min_velocity, double max_velocity, double acceleraton)
typedef int(* motorAxisHomeFunc )(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration, int forwards)
typedef int(* motorAxisVelocityMoveFunc )(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration)
typedef int(* motorAxisProfileMoveFunc )(AXIS_HDL pAxis, int npoints, double positions[], double times[], int relative, int trigger)
typedef int(* motorAxisTriggerProfileFunc )(AXIS_HDL pAxis)
typedef int(* motorAxisStopFunc )(AXIS_HDL pAxis, double acceleration)
typedef int(* motorAxisMoveFunc )(AXIS_HDL pAxis, double position, int relative, double min_velocity, double max_velocity, double acceleraton)
typedef int(* motorAxisHomeFunc )(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration, int forwards)
typedef int(* motorAxisVelocityMoveFunc )(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration)
typedef int(* motorAxisProfileMoveFunc )(AXIS_HDL pAxis, int npoints, double positions[], double times[], int relative, int trigger)
typedef int(* motorAxisTriggerProfileFunc )(AXIS_HDL pAxis)
typedef int(* motorAxisStopFunc )(AXIS_HDL pAxis, double acceleration)

Detailed Description

Gets an integer parameter in the controller.

The function parameter is described in the description of the #motorAxisParam_t enumeration.

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
function[in] One of the #motorAxisParam_t values indicating which parameter to set.
value[in] Value of the parameter.
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure or not supported.

Typedef Documentation

typedef int(* motorAxisHomeFunc)(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration, int forwards)

Moves the axis to a given demand position and then stops.

This is a normal move command. Moves consist of an acceleration phase, a coast phase and a deceleration phase. If min_velocity is greater than zero and the controller supports this function, the system will not demand a non-zero velocity between + and - min_velocity. Move-on-move (i.e. a move command being issue before another is completed should not generate an error - the motor should immediately start moving to the latest demanded position. The function should return immediately the move has been started successfully. If any of the velocity or acceleration parameters are zero, they should default to the controller default (which may be the last time they we specified as non-zero).

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
position[in] Position to move to in motor units.
relative[in] If zero position is an absolute position, otherwise it is relative to the current position.
min_velocity[in] Minimum startup velocity in motor units/second. If negative, it will be ignored.
max_velocity[in] Maximum velocity during move in motor units/second. If zero, it should be default to something reasonable.
acceleration[in] Maximum acceleration (or decelleration) during velocity ramp in motor units/second squared. Should be positive. If zero, it should be default to something reasonable.
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure.
typedef int(* motorAxisHomeFunc)(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration, int forwards)

Moves the axis to a given demand position and then stops.

This is a normal move command. Moves consist of an acceleration phase, a coast phase and a deceleration phase. If min_velocity is greater than zero and the controller supports this function, the system will not demand a non-zero velocity between + and - min_velocity. Move-on-move (i.e. a move command being issue before another is completed should not generate an error - the motor should immediately start moving to the latest demanded position. The function should return immediately the move has been started successfully. If any of the velocity or acceleration parameters are zero, they should default to the controller default (which may be the last time they we specified as non-zero).

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
position[in] Position to move to in motor units.
relative[in] If zero position is an absolute position, otherwise it is relative to the current position.
min_velocity[in] Minimum startup velocity in motor units/second. If negative, it will be ignored.
max_velocity[in] Maximum velocity during move in motor units/second. If zero, it should be default to something reasonable.
acceleration[in] Maximum acceleration (or decelleration) during velocity ramp in motor units/second squared. Should be positive. If zero, it should be default to something reasonable.
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure.
typedef int(* motorAxisProfileMoveFunc)(AXIS_HDL pAxis, int npoints, double positions[], double times[], int relative, int trigger)

Starts the axis moving at a constant velocity

This initiates a constant velocity move (JOG in OMS parlance). The axis is moved at the velocity supplied after ramping up at the rate specified by the acceleration parameter. The motion will only stop if a limit is hit or a motorAxisStop command is issued.

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
min_velocity[in] Minimum startup velocity in motor units/second. If negative, it will be ignored.
max_velocity[in] Maximum velocity during move in motor units/second. If zero, it should be default to something reasonable.
acceleration[in] Maximum acceleration (or decelleration) during velocity ramp in motor units/second squared. Should be positive. If zero, it should be default to something reasonable.
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure.
typedef int(* motorAxisProfileMoveFunc)(AXIS_HDL pAxis, int npoints, double positions[], double times[], int relative, int trigger)

Starts the axis moving at a constant velocity

This initiates a constant velocity move (JOG in OMS parlance). The axis is moved at the velocity supplied after ramping up at the rate specified by the acceleration parameter. The motion will only stop if a limit is hit or a motorAxisStop command is issued.

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
min_velocity[in] Minimum startup velocity in motor units/second. If negative, it will be ignored.
max_velocity[in] Maximum velocity during move in motor units/second. If zero, it should be default to something reasonable.
acceleration[in] Maximum acceleration (or decelleration) during velocity ramp in motor units/second squared. Should be positive. If zero, it should be default to something reasonable.
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure.
typedef int(* motorAxisStopFunc)(AXIS_HDL pAxis, double acceleration)

Triggers a previously loaded profile motion.

This starts a motion previously initialised with motorAxisProfileMove.

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure.
typedef int(* motorAxisStopFunc)(AXIS_HDL pAxis, double acceleration)

Triggers a previously loaded profile motion.

This starts a motion previously initialised with motorAxisProfileMove.

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure.
typedef int(* motorAxisTriggerProfileFunc)(AXIS_HDL pAxis)

Starts the axis moving along a tabulated position profile

This optional command initiates a profiled motion following a table of position, time pairs. The times are expressed as differences in seconds from the first time. Hence, the times should form a monotonically increasing sequence with the first element being zero. If the first element is non-zero, then it is assumed that the velocity array is only one element long and it contains a fixed time increment between all the steps in the position array.

The exact behaviour of the motion between the points is not precisely defined, but it is assumed that it will be a reasonably smooth motion within the performance of the underlying system. Either linear or spline interpolation would be acceptable, but stopping at every point with accelerations and decelerations would probably not be - unless that was all that the underlying system was capable of. In this case, the velocity acceleration parameters should be adjusted so that the acceleration and stationary phases are minimised. It can be assumed that the motion table is reasonable (i.e. the underlying system can follow it) and, if not, the controller should just make a best efforts attempt or return an on return from this routine.

The motion along the profile will not start until triggered. If the relative parameter is zero (i.e. the positions indicated are absolute), then the controller should immediately move to the first position and stop awaiting the trigger.

The trigger parameter defines when to initiate the motion along the profile. A number of special values are defined.

  • 0 - Start immediately (i.e. no trigger).
  • 1 - Start immediately a motorAxisTriggerProfile is called using any AXIS_HDL for this axis.
  • 2 - Start immediately a motorAxisTriggerProfile is called using any AXIS_HDL for this controller.

Any other value is controller dependent, and will probably be used for using hardware signals special to the controller.

The motion continues to the end of the profile where it should stop. It can be interrupted by any other motion command, including motorAxisStop.

Controllers may have limitations about how many profiled motions can be available, or different trigger types. They should indicate this by returning an error if the demands are unacceptable.

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
npoints[in] Number of points in the position array and time array if the first time element is zero.
positions[in] Double precision array of positions on the profile (motor units).
times[in] Double precision array of times (seconds)
relative[in] Integer which is non-zero for relative positions and zero for absolute
trigger[in] Integer indication which trigger to use to initiate motion.
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure.
typedef int(* motorAxisTriggerProfileFunc)(AXIS_HDL pAxis)

Starts the axis moving along a tabulated position profile

This optional command initiates a profiled motion following a table of position, time pairs. The times are expressed as differences in seconds from the first time. Hence, the times should form a monotonically increasing sequence with the first element being zero. If the first element is non-zero, then it is assumed that the velocity array is only one element long and it contains a fixed time increment between all the steps in the position array.

The exact behaviour of the motion between the points is not precisely defined, but it is assumed that it will be a reasonably smooth motion within the performance of the underlying system. Either linear or spline interpolation would be acceptable, but stopping at every point with accelerations and decelerations would probably not be - unless that was all that the underlying system was capable of. In this case, the velocity acceleration parameters should be adjusted so that the acceleration and stationary phases are minimised. It can be assumed that the motion table is reasonable (i.e. the underlying system can follow it) and, if not, the controller should just make a best efforts attempt or return an on return from this routine.

The motion along the profile will not start until triggered. If the relative parameter is zero (i.e. the positions indicated are absolute), then the controller should immediately move to the first position and stop awaiting the trigger.

The trigger parameter defines when to initiate the motion along the profile. A number of special values are defined.

  • 0 - Start immediately (i.e. no trigger).
  • 1 - Start immediately a motorAxisTriggerProfile is called using any AXIS_HDL for this axis.
  • 2 - Start immediately a motorAxisTriggerProfile is called using any AXIS_HDL for this controller.

Any other value is controller dependent, and will probably be used for using hardware signals special to the controller.

The motion continues to the end of the profile where it should stop. It can be interrupted by any other motion command, including motorAxisStop.

Controllers may have limitations about how many profiled motions can be available, or different trigger types. They should indicate this by returning an error if the demands are unacceptable.

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
npoints[in] Number of points in the position array and time array if the first time element is zero.
positions[in] Double precision array of positions on the profile (motor units).
times[in] Double precision array of times (seconds)
relative[in] Integer which is non-zero for relative positions and zero for absolute
trigger[in] Integer indication which trigger to use to initiate motion.
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure.
typedef int(* motorAxisVelocityMoveFunc)(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration)

Homes the axis, starting in a particular direction.

This initiates a homing operation. If the controller supports it the home procedure can be initially in either a forward or a reverse direction. min_velocity and max_velocity are the same as for the motorAxisMove function. The routine returns as soon as the home has started successfully. If any of the velocity or acceleration parameters are zero, they should default to the controller default (which may be the last time they we specified as non-zero).

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
min_velocity[in] Minimum startup velocity in motor units/second. If negative, it will be ignored.
max_velocity[in] Maximum velocity during move in motor units/second. If zero, it should be default to something reasonable.
acceleration[in] Maximum acceleration (or decelleration) during velocity ramp in motor units/second squared. Should be positive. If zero, it should be default to something reasonable.
forwards[in] If zero, initial move is in negative direction, otherwise it is positive (possibly ignored).
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure.
typedef int(* motorAxisVelocityMoveFunc)(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration)

Homes the axis, starting in a particular direction.

This initiates a homing operation. If the controller supports it the home procedure can be initially in either a forward or a reverse direction. min_velocity and max_velocity are the same as for the motorAxisMove function. The routine returns as soon as the home has started successfully. If any of the velocity or acceleration parameters are zero, they should default to the controller default (which may be the last time they we specified as non-zero).

Parameters:
pAxis[in] Pointer to axis handle returned by motorAxisOpen.
min_velocity[in] Minimum startup velocity in motor units/second. If negative, it will be ignored.
max_velocity[in] Maximum velocity during move in motor units/second. If zero, it should be default to something reasonable.
acceleration[in] Maximum acceleration (or decelleration) during velocity ramp in motor units/second squared. Should be positive. If zero, it should be default to something reasonable.
forwards[in] If zero, initial move is in negative direction, otherwise it is positive (possibly ignored).
Returns:
Integer indicating 0 (MOTOR_AXIS_OK) for success or non-zero for failure.
 All Classes Functions Variables