This section presents the characteristics of the Motion task and provides information on the performance possible when using an optimally configured motion system. The Motion task is created automatically with the External Event name of CAN1_Sync when a CANmotion Manager is configured. This mechanism allows a synchronization of the Motion task with the devices declared on the CANmotion bus. By default the Motion task is configured with priority 1.
NOTE: You can modify this priority setting but you must ensure that the Motion task will have enough time to execute within the CANmotion Sync cycle period (µs).
An adequately defined cycle time meets both of the following requirements:
oThe program processing defined in your Motion task must have enough time to execute in full. Test the execution time of your Motion task under all operating conditions to determine this value.
oThe Sync cycle period (µs) must be of sufficient length to allow the physical exchange of all PDO and SDO data between the controller and all of the configured devices.
If you do not configure a sufficient Sync cycle period (µs) this can result in a system watchdog exception or even a loss of synchronization for the controlled devices and unpredictable operation. For example, an insufficient Sync cycle period (µs) may result in the detection of the loss of the CANmotion master for all controlled devices. In this case, devices detecting a loss of the CANmotion master will assume their programmed fallback states. Always confirm that your Sync cycle period (µs) is sufficient to allow full execution of the Motion Task and a complete physical exchange of all PDO and SDO data before placing your system into service.
|
UNINTENDED EQUIPMENT OPERATION |
Take the following steps to define an adequate Sync cycle period (µs) for your Motion task: oCalculate the required minimum cycle time for your task processing and physical data exchange (1). oDefine a task (software) watchdog for the Motion task with a watchdog period slightly larger than the Sync cycle period (µs) defined for the CANmotion Manager. oThoroughly test your CANmotion system under normal and non-normal operating conditions before placing your system into service. |
Failure to follow these instructions can result in death, serious injury, or equipment damage. |
(1) Refer to CANmotion Cycle Time Configuration for instructions on calculating the required minimum cycle time for your Motion task.
This picture displays the settings for the Motion task:
NOTE: Do not delete the Motion task or change its Name, Type, or External Event attributes. If you do so, EcoStruxure Machine Expert will detect an error when you attempt to build the application, and you will not be able to download it to the controller.
Motion Task Programming Requirements
You must use the Motion task to manage every aspect of programming related to the CANmotion bus and its connected motion devices such as drive controllers.
This includes:
oLocal inputs used to acquire motion events
oEncoder inputs used to acquire motion events
oTask processing for all motion functions (CANmotion, Motion task POU, etc.)
oTransmission of all RPDO to motion devices
oReceipt of all TPDO from motion devices
oTransmission and receipt of all SDO and Optional PDO related to motion processing and events
oEncoder outputs configured to respond to motion events
oLocal outputs configured to respond to motion events
If you attempt to manage motion-related inputs, outputs, task processing, or CAN communications outside of the motion task, your system may behave in an unexpected manner.
|
UNINTENDED EQUIPMENT OPERATION |
Use the Motion task to manage all motion-related inputs, outputs, task processing, and CAN communications. |
Failure to follow these instructions can result in death, serious injury, or equipment damage. |
The Modicon LMC058 Motion Controller is capable of achieving very high performance under certain conditions. For example, if you write a very efficient application using a small subset of the available motion functions, and do not use interpolation, the controller can manage up to:
o4 axes in 2 ms
o8 axes in 4 ms
The subset of functions that can be used and still allow you to achieve similar performance (provided you write an efficient application) are:
oVirtual axes
oRelative and absolute positioning
oSpeed control
oCam profiles
oElectronic gearing
oLinear and circular interpolation
NOTE: The interpolation functions are required for certain applications such as CNC milling.
For more information refer to CANmotion Principle and CANmotion Interface Configuration.