The IAxisSupervisor interface is defined within the Axis Module in order to allow Axis modules to be deployed in standalone Axis operation under manual control. For autonomous control, the axis is expected to have an Axis Group module managing it and providing it trajectory-based setpoints. The reason this interpolator functionality was not just assimilated as part of the Axis Group was that it was not considered practical to expect vendors of Axis modules to include a complete realization of Axis Group module interfaces in deployment of "One-Axis" Axis Group - even if these interfaces were "stubbed" out. It was felt that if an Axis and Supervisor were bundled together, it would be a more practical commercial packaging. Axis bundled as part of a larger control system could assume that his functionality has been subsumed as part of the Axis Group module responsibility. (This is the current thinking.)
Realizations of Axis Supervisor handle single-axis trajectory responsibilities by managing a collection of interpolation "plugs", including homing, continuous jogging, incremental positioning and absolute positioning. Interpolation is achieved by coordinating the servoing activity of an Axis via an IAxis reference. The IAxisSupervisor interface defines a container mechanism to provide a means of storing interpolated-motion component references and then providing access to the interpolated-motion component references.
An IAxisSupervisor realization uses a FSM to coordinate among the different interpolated-motion control strategies, and then manages a selected interpolation strategy to achieve axis motion based on the FSM. Each control strategy has an associated "pluggable" Axis motion control component that implements the control strategy. See also the associated interpolated-motion control component interfaces:
IAxisSupervisor coordinates between the different servoing motion control strategies by means of a FSM. Based on the selected motion control strategy, a different plug is used to control the motion. (See the OmacModule for details on component realization and how the AxisSupervisor and each plug are connected.) These interpolated-motion plugs could provide their own interpolation service or could be share an underlying profile generator as illustrated in the following Figure Axis .
An IAxisSupervisor component manages a set of interpolated-motion control components that implement basic single-axis motion trajectory strategies. Trajectory motion consists of a sequence of desired positions, velocities, and accelerations of an axis over time. An Axis Supervisor generates a time sequence of intermediate desired configurations for an axis that matches the given rates to attain the desired position, velocity or acceleration goal. For example, to achieve continuous jogging, the IAxisJogging component would place the axis in followingAbsPosition seroving and then update new positions for the axis to follow based on attaining the jogging velocity. All interpolated-motion control components must comply with underlying Axis state. Thus, for example, moving an axis to an absolute position could not be done until the Axis positioning has been calibrated by a homing sequence.
IAxisSupervisor coordinates between the different servoing motion control strategies by means of a FSM, including events, states, and state transitions, defined by the following diagram:
Switching between interpolated motion control strategies is achieved by sending events to the Axis FSM. The FSM itself is hidden, but the Axis interface provides methods for event propagation and state query. The event propagating methods that cause FSM state transitions, which may result in changing control strategies, are: disableAxis, enableAxis, estopAxis, home, jog, resetAxis, and stopAxis. The relationship between state, events, next state and action associated with the state transition in the FSM is given in the following table, where XXX is a member of {AbsPositioning, Homing, Jogging, Incrementing}.
First State = Disabled
Beginning State | Event | Ending State | Action |
Disabled | enable() | Enabling | IAxisEnabling::enablingAction |
Disabled | hardStop() | HardStopping | IAxisDisabling::hardStoppingAction |
Enabled | hardStop() | HardStopped | IAxisErrorAndEnable::hardStopAction |
HardStopped | reset() | Disabled | IAxisResetting::resetHardStopAction |
Enabling | completed | Enabled | IAxisEnabling::enabledAction |
Enabled | startXXX() | XXX | IAxisXXX::startXXXAction |
XXX | stop() | XXXStopping | IAxisXXX::stopXXXAction |
XXX | hardStop() | XXXHardStopping | IAxisXXX::hardStoppingXXXAction |
XXX | completed | Enabled | IAxisXXX::finishedXXXAction except Jogging which can only be stopped |
XXXStopping | completed | Enabled | n/a |
XXXHardStopping | completed | HardStopped | n/a |
XXX | (state update) | XXX | IAxisXXX::updateXXXAction |
XXXStopping | (state update) | XXXStopping | IAxisXXX::updateXXXStoppingAction |
XXXAbnormalStopping | (state update) | XXXAbnormalStopping | IAxisXXX::updateXXXAbnormalStoppingAction |
XXXHardStopping | (state update) | XXXHardStopping | IAxisXXX::updateXXXHardStoppingAction |
The State Definitions and Query Table supplements the behavior model described above by the state table. This table provides a detailed description of each state and identifies the query mechanism for determining if the Axis Interpolation component is in that state. The Axis Interpolation FSM states, state description, and query methods is described in the following table where XXX is a member of {AbsPositioning, Homing, Jogging, Incrementing}.
State | Definition | Query for State |
AbsolutePositioning | Module is moving to an absolute position. | isAbsolutePositioning() |
Disabled | Module is Disabled. Connections and IO points are not enabled. | isDisabled() |
Enabled | Module is enabled. Power on to amplifiers. | isEnabled() |
HardStopped | Module is HardStopped. Power to equipment is off. | isHardStopped() |
Homing | Module is Homing. | isHoming() |
IncrementingPosition | Module is incrementally Jogging. | isIncrementing() |
Jogging | Module is under Jogging control. | isJogging() |
Ready | Module is ready. Part of outer OMAC API state definition. | isReady() |
Resetting | Module is resetting hard or abnormal stop or resolving fault. | isResetting() |
StoppingXXX | Module is stopping XXX. | isStoppingXXX() |
AbnormalStoppingXXX | Module is abnormal stopping XXX. | isAbnormalStoppingXXX() |
HardStoppingXXX | Module is hard stopping XXX. | isHardStoppingXXX() |
The Axis interpolator plugs provide a packaging mechanism for encapsulating the FSM functionality for a specific service: homing, jogging, incremental jogging, or absolute positioning. These plugs derive from IOmac so that they are connectable and could provide event service if necessary. To simplify develop and integration these plugs are simple. Each plug provides event and activity methods for transitioning and updating the varying states motion control in a generic FSM: start, stop, update, hardstop, abnormalstop, fail and completion. The Axis Supervisor controls the life of the plug by invoking the appropriate method given the current state of the FSM. For example, to start a homing sequence, the method startHomingAction is invoked on the AxisHoming plug. Subsequently, for each cycle the AxisSupervisor is in the Jogging state, the method updateAxisHomingAction is invoked until the isCompleted method returns true. Several modes of stopping are defined for each plug to accommodate different circumstances for velocity servoing to zero. The stopping modes that have been defined are:
Appropriate states, events and actions are associated with each state. The event stopping methods are: hardStopXXXAction, abnormalXXXStopAction, or stopXXX where XXX indicates the functionality provided by the plug. The stopping states are: hardStopping, hardStopped abornmalStopping, abornmalStopped, normalStopping and normalStopped. The stopping state queries are: isHardStopping, isHardStopped, isAbornmalStopping, isAbornmalStopped, isNormalStopping and isNormalStopped. as well as isStopping and isStopped to detect any stopping state. The updating actions are: updateHardStopping, updateAbornmalStopping, and updateStopping .
Estop is not a separate stopping mode, instead it is Resident Task that maps an Estop event into several events that can be tailored to accommodate domain-specific safety codes. For example, estop could be mapped into "stop as fast on each limit using the software limits as configured by OEM, put brakes on, cut power", or "cut power after certain time limit" depending on pertinent safety codes. To allow for the different domain-specific forms of estop, this functionality has been abstracted into a Resident Task and would use either a hard or abnormal stop to a achieve safe emergency stop as predicated by the domain-specific safety code.
As a final note, it is not encumbant on the system integrator or end-user to develop the Axis interpolator plugs. It would be expected that preconfigured Axis interpolator plugs would be provided by the axis vendor so that default functionality is available. End-users would only be expected to develop a new plug in response to satisfying some special need.
Methods in interface IAxisSupervisor |
, enableAxis (), estopAxis (), getAbsolutePos (IAxisAbsolutePos ** ppIAxisObject), getDisabling (IAxisDisabling ** ppIAxisObject), getEnabling (IAxisEnabling ** ppIAxisObject), getHoming (IAxisHoming ** ppIAxisObject), getIncrementPosition (IAxisIncrementPos ** ppIAxisObject), getJogging (IAxisJogging ** ppIAxisObject), getResetting (IAxisResetting ** ppIAxisObject), getServoAxis (IAxis ** ppIAxisObject), home (double velocity), isAbnormalStopped (boolean * b), isAbnormalStopping (boolean * b), isCompleted (boolean * b), isDisabled (boolean * b), isEnabled (boolean * b), isFaulted (boolean * b), isFinished (boolean * b), isHardStopped (boolean * b), isHardStopping (boolean * b), isHoming (boolean * b), isIncrementingPosition (boolean * b), isJogging (boolean * b), isMovingto (boolean * b), isNormalStopped (boolean * b), isNormalStopping (boolean * b), isReady (boolean * b), isResetting (boolean * b), isStopped (boolean * b), isStopping (boolean * b), jog (double velocity), resetAxis (), runInterpolator (), setAbsolutePos (IAxisAbsolutePos * val), setDisabling (IAxisDisabling * val), setEnabling (IAxisEnabling * val), setHoming (IAxisHoming * val), setIncrementPosition (IAxisIncrementPos * val), setJogging (IAxisJogging * val), setResetting (IAxisResetting * val), setServoAxis (IAxis * val), stopAxis ()
|
Methods inherited from interface IOmac |
configToString(BSTR *), configure(BSTR,BSTR), doneConnecting(), donePublishing(), getIIDs(IEnumGUID **), getName(BSTR *), getOmacIID(_GUID *), init(), isConfigured(BSTR *), isFullyConfigured(boolean *), isNamed(BSTR,boolean *), prepare(), quit(), restore(), save(), setName(BSTR), shutdown(), start(), startConnecting(), startPublishing(), toString(BSTR *), update()
|
Methods inherited from interface IUnknown |
AddRef(), QueryInterface(REFIID,void **), Release()
|
Method Detail |
HRESULT disableAxis()
S_OK -
sucessful event delivery. Generally, assume no real error checking since events can be queued,
regardless of current state or event preceding this event in queue.
ERROR_BUFFER_OVERFLOW -
assuming queuing of events, couldn't queue event.
E_INVALIDARG -
invalid event based upon current or
anticipated state when event is expected to be handled. (Should it be queued anyway?)
HRESULT enableAxis()
S_OK -
sucessful event delivery. Generally, assume no real error checking since events can be queued,
regardless of current state or event preceding this event in queue.
FIXME.
ERROR_BUFFER_OVERFLOW -
assuming queuing of events, couldn't queue event.
E_INVALIDARG -
invalid event based upon current or
anticipated state when event is expected to be handled. (Should it be queued anyway?)
HRESULT estopAxis()
S_OK -
sucessful event delivery. Generally, assume no real error checking since estop event Upon handling, event will be
placed at the front of the queue to be handled immediately.
ERROR_BUFFER_OVERFLOW -
assuming queuing of events, couldn't queue event.
E_INVALIDARG -
invalid event based upon current or
anticipated state when event is expected to be handled. (Should it be queued anyway?)
HRESULT getAbsolutePos(/*[out,retval]*/ IAxisAbsolutePos ** ppIAxisObject)
ppIAxisObject
- is the address of the pointer variable that
receives the absolute positioning interface pointer
requested. Upon successful return, ppIAxisObject contains the
requested interface pointer to the object. If the Axis Supervisor
does not have a reference to this object, ppIAxisObject is set
to NULL, and an error code is returned.
S_OK -
if successful.
E_FAIL -
if implemented but not defined.
E_NOTIMP -
if not implemented.
HRESULT getDisabling(/*[out,retval]*/ IAxisDisabling ** ppIAxisObject)
ppIAxisObject
- is the address of the pointer variable that
receives the disabling interface pointer
requested. Upon successful return, ppIAxisObject contains the
requested interface pointer to the object. If the Axis Supervisor
does not have a reference to this object, ppIAxisObject is set
to NULL, and an error code is returned.
S_OK -
if successful.
E_FAIL -
if implemented but not defined.
E_NOTIMP -
if not implemented.
HRESULT getEnabling(/*[out,retval]*/ IAxisEnabling ** ppIAxisObject)
ppIAxisObject
- is the address of the pointer variable that
receives the error and enabling interface pointer
requested. Upon successful return, ppIAxisObject contains the
requested interface pointer to the object. If the Axis Supervisor
does not have a reference to this object, ppIAxisObject is set
to NULL, and an error code is returned.
S_OK -
if successful.
E_FAIL -
if implemented but not defined.
E_NOTIMP -
if not implemented.
HRESULT getHoming(/*[out,retval]*/ IAxisHoming ** ppIAxisObject)
ppIAxisObject
- is the address of the pointer variable that
receives the homing interface pointer
requested. Upon successful return, ppIAxisObject contains the
requested interface pointer to the object. If the Axis Supervisor
does not have a reference to this object, ppIAxisObject is set
to NULL, and an error code is returned.
S_OK -
if successful.
E_FAIL -
if implemented but not defined.
E_NOTIMP -
if not implemented.
HRESULT getIncrementPosition(/*[out,retval]*/ IAxisIncrementPos ** ppIAxisObject)
ppIAxisObject
- is the address of the pointer variable that
receives the incrementing position interface pointer
requested. Upon successful return, ppIAxisObject contains the
requested interface pointer to the object. If the Axis Supervisor
does not have a reference to this object, ppIAxisObject is set
to NULL, and an error code is returned.
S_OK -
if successful.
E_FAIL -
if implemented but not defined.
E_NOTIMP -
if not implemented.
HRESULT getJogging(/*[out,retval]*/ IAxisJogging ** ppIAxisObject)
ppIAxisObject
- is the address of the pointer variable that
receives the axis interface pointer
requested. Upon successful return, ppIAxisObject contains the
requested interface pointer to the object. If the Axis Supervisor
does not have a reference to this object, ppIAxisObject is set
to NULL, and an error code is returned.
S_OK -
if successful.
E_FAIL -
if implemented but not defined.
E_NOTIMP -
if not implemented.
HRESULT getResetting(/*[out,retval]*/ IAxisResetting ** ppIAxisObject)
ppIAxisObject
- is the address of the pointer variable that
receives the resetting interface pointer
requested. Upon successful return, ppIAxisObject contains the
requested interface pointer to the object. If the Axis Supervisor
does not have a reference to this object, ppIAxisObject is set
to NULL, and an error code is returned.
S_OK -
if successful.
E_FAIL -
if implemented but not defined.
E_NOTIMP -
if not implemented.
HRESULT getServoAxis(/*[out,retval]*/ IAxis ** ppIAxisObject)
ppIAxisObject
- is the address of the pointer variable that
receives the IAxis interface pointer
requested. Upon successful return, ppIAxisObject contains the
requested interface pointer to the object. If the Axis Supervisor
does not have a reference to this object, ppIAxisObject is set
to NULL, and an error code is returned.
S_OK -
if successful.
E_FAIL -
if implemented but not defined.
E_NOTIMP -
if not implemented.
HRESULT home(/*[in]*/ double velocity)
S_OK -
sucessful event delivery. Generally, assume no real error checking since events can be queued,
regardless of current state or event preceding this event in queue.
ERROR_BUFFER_OVERFLOW -
assuming queuing of events, couldn't queue event.
E_INVALIDARG -
invalid event based upon current or
anticipated state when event is expected to be handled. (Should it be queued anyway?)
HRESULT isAbnormalStopped(/*[out,retval]*/ boolean * b)
b
- return true if in state, false if not in state.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT isAbnormalStopping(/*[out,retval]*/ boolean * b)
b
- return true if in state, false if not in state.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT isCompleted(/*[out,retval]*/ boolean * b)
b
- return true if done, false if not done.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT isDisabled(/*[out,retval]*/ boolean * b)
b
- boolean [out] flag, with true indicating in state, false not in state.
S_OK -
successful state determination.
E_FAIL -
unsuccessful state determination. Unspecified reason.
HRESULT isEnabled(/*[out,retval]*/ boolean * b)
b
- boolean [out] flag, with true indicating in state, false not in state.
S_OK -
successful state determination.
E_FAIL -
unsuccessful state determination. Unspecified reason.
HRESULT isFaulted(/*[out, retval]*/ boolean * b)
b
- return true if error has occurred, false if not.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT isFinished(/*[out,retval]*/ boolean * b)
b
- return true if done, false if not done.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT isHardStopped(/*[out,retval]*/ boolean * b)
b
- return true if in state, false if not in state.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT isHardStopping(/*[out,retval]*/ boolean * b)
b
- return true if in state, false if not in state.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT isHoming(/*[out,retval]*/ boolean * b)
b
- boolean [out] flag, with true indicating in state, false not in state.
S_OK -
successful state determination.
E_FAIL -
unsuccessful state determination. Unspecified reason.
HRESULT isIncrementingPosition(/*[out,retval]*/ boolean * b)
b
- boolean [out] flag, with true indicating in state, false not in state.
S_OK -
successful state determination.
E_FAIL -
unsuccessful state determination. Unspecified reason.
HRESULT isJogging(/*[out,retval]*/ boolean * b)
b
- boolean [out] flag, with true indicating in state, false not in state.
S_OK -
successful state determination.
E_FAIL -
unsuccessful state determination. Unspecified reason.
HRESULT isMovingto(/*[out,retval]*/ boolean * b)
b
- boolean [out] flag, with true indicating in state, false not in state.
S_OK -
successful state determination.
E_FAIL -
unsuccessful state determination. Unspecified reason.
HRESULT isNormalStopped(/*[out,retval]*/ boolean * b)
b
- return true if stopped normally, false if not.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT isNormalStopping(/*[out,retval]*/ boolean * b)
b
- return true if stopping normally, false if not.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT isReady(/*[out,retval]*/ boolean * b)
b
- boolean [out] flag, with true indicating in state, false not in state.
S_OK -
successful state determination.
E_FAIL -
unsuccessful state determination. Unspecified reason.
HRESULT isResetting(/*[out,retval]*/ boolean * b)
b
- boolean [out] flag, with true indicating in state, false not in state.
S_OK -
successful state determination.
E_FAIL -
unsuccessful state determination. Unspecified reason.
HRESULT isStopped(/*[out,retval]*/ boolean * b)
b
- return true if stopped, false if not.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT isStopping(/*[out,retval]*/ boolean * b)
b
- return true if stopping, false if not.
S_OK -
if successful.
E_FAIL -
if unsucessful.
HRESULT jog(/*[in]*/ double velocity)
S_OK -
sucessful event delivery. Generally, assume no real error checking since events can be queued,
regardless of current state or event preceding this event in queue.
ERROR_BUFFER_OVERFLOW -
assuming queuing of events, couldn't queue event.
E_INVALIDARG -
invalid event based upon current or
anticipated state when event is expected to be handled. (Should it be queued anyway?)
HRESULT resetAxis()
S_OK -
sucessful event delivery. Generally, assume no real error checking since events can be queued,
regardless of current state or event preceding this event in queue.
ERROR_BUFFER_OVERFLOW -
assuming queuing of events, couldn't queue event.
E_INVALIDARG -
invalid event based upon current or
anticipated state when event is expected to be handled. (Should it be queued anyway?)
HRESULT runInterpolator()
S_OK -
if successful.
E_FAIL -
if servo loop failed.
HRESULT setAbsolutePos(/*[in]*/ IAxisAbsolutePos * val)
val
- contains a reference to a COM object to replace the currently assigned object
to handle absolute position-based axis.
S_OK -
if successful.
E_INVALIDARG -
if type mismatch. Method not required to do
type checking based on IAxisAbsolutePos REFID interface of the supplied object.
E_NOTIMP -
if not implemented.
HRESULT setDisabling(/*[in]*/ IAxisDisabling * val)
val
- contains a reference to a OMAC object to replace the currently assigned object
to handle enable states.
S_OK -
if successful.
E_INVALIDARG -
if type mismatch. Method not required to do
type checking based on IAxisEnabling REFID interface of the supplied object.
E_NOTIMP -
if not implemented.
HRESULT setEnabling(/*[in]*/ IAxisEnabling * val)
val
- contains a reference to a OMAC object to replace the currently assigned object
to handle enable states.
S_OK -
if successful.
E_INVALIDARG -
if type mismatch. Method not required to do
type checking based on IAxisEnabling REFID interface of the supplied object.
E_NOTIMP -
if not implemented.
HRESULT setHoming(/*[in]*/ IAxisHoming * val)
val
- contains a reference to a COM object to replace the currently assigned object
to handle homing.
S_OK -
if successful.
E_INVALIDARG -
if type mismatch. Method not required to do
type checking based on IAxisHoming REFID interface of the supplied object.
E_NOTIMP -
if not implemented.
HRESULT setIncrementPosition(/*[in]*/ IAxisIncrementPos * val)
val
- contains a reference to a COM object to replace the currently assigned object
to handle incremental axis/positioning.
S_OK -
if successful.
E_INVALIDARG -
if type mismatch. Method not required to do
type checking based on IAxisIncrementPos REFID interface of the supplied object.
E_NOTIMP -
if not implemented.
HRESULT setJogging(/*[in]*/ IAxisJogging * val)
val
- contains a reference to a COM object to replace the currently assigned object
to handle axis.
S_OK -
if successful.
E_INVALIDARG -
if type mismatch. Method not required to do
type checking based on IAxisJogging REFID interface of the supplied object.
E_NOTIMP -
if not implemented. .
HRESULT setResetting(/*[in]*/ IAxisResetting * val)
val
- contains a reference to a OMAC object to replace the currently assigned object
to handle resetting states.
S_OK -
if successful.
E_INVALIDARG -
if type mismatch. Method not required to do
type checking based on IAxisEnabling REFID interface of the supplied object.
E_NOTIMP -
if not implemented.
HRESULT setServoAxis(/*[in]*/ IAxis * val)
val
- contains a reference to a COM object to replace the currently assigned object
axis servoing object.
S_OK -
if successful.
E_INVALIDARG -
if type mismatch. Method not required to do
type checking based on IAxis REFID interface of the supplied object.
HRESULT stopAxis()
S_OK -
sucessful event delivery. Generally, assume no real error checking since events can be queued,
regardless of current state or event preceding this event in queue.
ERROR_BUFFER_OVERFLOW -
assuming queuing of events, couldn't queue event.
E_INVALIDARG -
invalid event based upon current or
anticipated state when event is expected to be handled. (Should it be queued anyway?)