152
EZMotion User/Programming Guide
www.controltechniques.com
Revision: A8
a background task that monitors parameters for error detection.
The EZMotion processor has the ability to execute multiple tasks. Because only one task can be processed at a time, a process
called time slicing must be used. Time Slicing is simply splitting the total processing time between multiple tasks. The EZMotion
processor generates an interrupt that causes any task to stop, and the control loop to update. The timing of the interrupt is
dependent on the Trajectory Update Rate parameter configured by the user on the Setup view (default update rate is 1 msec).
Within the control loop update, EZMotion updates the motion trajectory, captured data, EZMotion digital inputs and outputs, and
other control parameters. Between each control loop update, the EZMotion processes messages (i.e. Modbus, Errors, etc.) and
then runs as much of the user program as possible until the next interrupt begins. Each update, a different task is processed.
Therefore, the time it takes a given user program to complete depends how many tasks are being processed.
The task assignment is performed on the Program view. Figure 157 shows the Program view with the Task Number parameter. Use
the up and down arrows next to the Task Number to change the task number. To create a new Task, simply click the up arrow until
PowerTools Pro asks if you wish to create a new Task.
Figure 157:
User Program View
EZMotion allows up to four different tasks in a single application.
If the user wishes to operate two programs simultaneously, the two programs must be assigned to two different tasks. Multiple
programs can be assigned to the same task if desired, but that means that the two programs can not be run at the same time. If a
given program calls another program, then calling and the called programs must be on the same task. All programs default to task
zero and therefore will not run simultaneously unless specified to do so.
Figure 158:
Time Slicing with Multiple Tasks Handling Diagram
9.7
Timing Diagram
In Figure 158, the Update Rate represents the Trajectory Update Rate that the user selects on the Setup view. The first routine to be
processed in the update is the control loop update. Next, all messages will be handled. If no message has been sent from a Modbus
master, and no errors are active, then this step is skipped. After all messages are processed, then execution switches to the user
T0
T1
T2
TN
Control Loop Update
Messages
Update Rate
User Program Execution
Summary of Contents for EZMotion
Page 2: ......
Page 12: ...x EZMotion User Programming Guide www controltechniques com Revision A8 ...
Page 18: ...6 EZMotion User Programming Guide www controltechniques com Revision A8 ...
Page 36: ...24 EZMotion User Programming Guide www controltechniques com Revision A8 ...
Page 158: ...146 EZMotion User Programming Guide www controltechniques com Revision A8 ...
Page 186: ...174 EZMotion User Programming Guide www controltechniques com Revision A8 ...
Page 266: ...256 EZMotion User Programming Guide www controltechniques com Revision A8 ...
Page 267: ......