Function Calls Affected by Interrupts
Interrupts (cyclic handlers) are executed cyclically to communicate with the servo network. Multi-Cycle refers to operation in which there are multiple interrupts communicating with multiple servo networks.
Interrupts routines are executed cyclically to read the feedback from and send the command to the servo network. Up to maxInterrupts interrupts may be defined to control multiple servo networks from the same master controller.
To use multiple interrupts, the NumOfMaster and NumOfInterrupt parameters in the Module.ini file must be configured appropriately. See Module.ini for additional information.
Interrupt of an Axis
Every axis is assigned to one interrupt. The command and feedback of an axis is updated during the interrupt routine.
Interrupt of a Device
Every device (created by the CreateDevice function) is also associated with an interrupt. However, only a small subset of functions are affected by the interrupt associated with the device. Apart from these functions, the interrupt associated with the device has no effect on the operation of the device. For example, most motion commands may be executed from any device, even if the device and commanded axes are associated with different interrupts. The SetInterruptId function is used to change the interrupt associated with a device.
The following sections summarize the functions of each module that are affected by the interrupt associated with the commanded axis or the calling device.
AdvMotion
Functions Affected by the Interrupt of the Axis
The following sync and interpolation functions return the InterruptMismatch error if not all specified axes belong to the same interrupt.
StartCoordinatedPos(unsigned int numCommands, CoordinatedPosCommand *pPosCommand) (*Two axes may belong to different interrupts as long as they are not in the same coordinated position command.)
StartCoordinatedPos(CoordinatedJerkRatioPosCommand *pPosCommand)
ApiBuffer
Functions Affected by the Interrupt of the Device
Each API buffer channel is associated with an interrupt. When the Execute function is called, the specified channel becomes associated with the interrupt of the device calling the function. The following is processed by the cyclic routine of the associated interrupt.
Evaluation of wait conditions.
Detection of watch errors.
Execution of watch error routines.
Compensation
Functions Affected by the Interrupt of the Axis
The following compensation functions return the InterruptMismatch error if not all specified axes belong to the same interrupt.
CoreMotion
Functions Affected by the Interrupt of the Axis
The following sync and interpolation functions return the InterruptMismatch error if not all specified axes belong to the same interrupt.
Functions Affected by the Interrupt of the DeviceThe following Wait functions are synchronized to the interrupt of the device calling the function. These functions return at the timing immediately after the cyclic handler routine of the cycle that the Wait condition is satisfied.
Motion::Wait(AxisSelection *pAxisSelection, unsigned int waitTimeMilliseconds)
Motion::Wait(WaitCondition *pWaitCondition, unsigned int waitTimeMilliseconds)
Flight recorders are processed separately for each interrupt. “_ipt[n]” (n = interrupt id) is appended to the end of flight recorder files.
Cyclic statuses obtained with GetStatus are updated at the end of the cyclic routine of every interrupt.
The cycleTimeMilliseconds and cycleCounter statuses are returned for each interrupt.
Event
Functions Affected by the Interrupt of the Device
Events with conditions related to the state of an axis are handled in the cyclic routine of the interrupt that the axis belongs to. Other events are handled in the cyclic routine of interrupt 0.
Software touch probe processing is synchronized to the cyclic routine of the interrupt of the axis to latch the position data. When changing a software touch probe channel between axes with different interrupts, the software touch probe channel must first be disabled.
Position synchronous output processing is synchronized to the cyclic routine of the interrupt of the axis whose position is referenced.
Planned velocity override processing is synchronized to the cyclic routine of the interrupt of the axis whose velocity is overridden.
Io
Functions Affected by the Interrupt of the Device
Each output byte may be configured to set an initial output state when communication is started. When the initial output state is configured for an output byte, that output byte becomes associated with an interrupt. The initial output state is applied when the associated interrupt starts communication with its servo network.
The following functions that set the initial output will associate the output byte with the interrupt of the device calling the function.
The following functions obtain the ID of the interrupt that is associated with each output byte.Log
Functions Affected by the Interrupt of the Axis
The following log functions return the InterruptMismatch error if not all specified axes belong to the same interrupt.
Functions Affected by the Interrupt of the DeviceThe following functions reference the interrupt of the device calling the function if the log channel is not collecting any axis data. The log data will be collected at the frequency of the interrupt. If the log channel is collecting data for one or more axes, the log data will be collected at the frequency of the interrupt of these axes.
While the log channel is not configured yet, the following functions reference the interrupt of the device calling the function to obtain the cycle time.