Motion Control Function Block Information
The XMC uses PLCOpen motion functions for motion. It also follows the PLCOpen axis state machine which dictates axis state depending on motion function block used.
See section 6.1.7 of the XMC user manual for function block error information.
| Item No. | State | Description |
|---|---|---|
| 1 | ErrorStop | Axis Error can cause ErrorStop state. |
| 2 | Disabled | MC_Power.Enable is turned off when an axis error is not present. |
| 3 | ErrorStop è Disabled | MC_Reset command was executed when MC_Power.Status is off. |
| 4 | ErrorStop è Standstill | MC_Reset command was executed when MC_Power.Status is on and MC_Power.Enable is on. |
| 5 | Disabled è Standstill | Turn on MC_Power.Enable and MC_Power.Status turns on. |
| 6 | Stopping è Standstill | Turn off MC_Stop.Execute when MC_Stop.Done is on. |
Single Axis Motion State Descriptions
| State | Description |
|---|---|
| Disabled | Disabled state indicates the axis is not powered on and has no error. Each axis will begin in disabled state if no error is present. |
| ErrorStop | Axis changes to ErrorStop state when an axis error occurs. The axis will decelerate to a stop if executing a motion command. Only an error reset command can change the axis state. |
| Standstill | Axis enters Standstill state when powered on and not in motion. |
| Homing | Homing state happens when an axis is in homing operation. |
| Stopping | Stopping state occurs when MC_Stop command is executed. Other motion commands can not be given to the axis until the stop is completes. |
| Continuous Motion | Axis enters continuous motion state when a velocity motion command is executed. |
| Discrete Motion | Discrete state is entered when a motion command is executed that has a target position. |
| Synchronized Motion | Synchronized motion state occurs when the axis is a sub-axis in a multi-axis motion function block execution. |
| Item No. | State | Description |
|---|---|---|
| 1 | GroupMoving | Group motion function block was executed. |
| 2 | GroupStopping, GroupErrorStop | A group stop command was executed or error occurred. |
| 3 | GroupStopping è GroupStandby | MC_GroupStop.Done is on and MC_GroupStop.Execute is off. |
| 4 | GroupStandby è GroupDisabled | There is no axis belonging to the group because of MC_UnGroupAllAxes or MC_RemoveAxisFromGroup, |
| 5 | GroupStandby | Axis is added to the group with MC_AddAxisToGroup or removed with MC_RemoveAxisFromGroup. |
| 6 | GroupDisabled | State change when MC_GroupDisable is executed or MC_UnGroupAllDisable is executed. |
Group Axis Motion State Descriptions
| State | Description |
|---|---|
| GroupDisabled | Disabled state indicates the group is not powered on and has no error. Each group will begin in disabled state if no error is present. |
| GroupErrorStop | Group changes to GroupErrorStop state when an axis error occurs. The group will decelerate to a stop if executing a motion command. Only an error reset command can change the group state. |
| GroupStandby | The Group enters GroupStandby state when powered on and not in motion. |
| GroupHoming | Homing state happens when a group is in homing operation. |
| GroupStopping | Stopping state occurs when MC_GroupStop command is executed. Other motion commands can not be given to the group until the stop is completes. |
| GroupMoving | GroupMoving state indicates the group is in motion. |
| Variable | Description |
|---|---|
| Execute | In edge operation function blocks, the motion is executed on transition from Off -> On. |
| Busy | Output indicates that the motion function block is currently running and not completed. On when Execute is on and Done, Error, and CommandAborted are off. |
| Active | Indicates that the motion function block is actually controlling the axis. |
| Done | Indicates the motion function block has successfully completed. |
| Error | Indicate an error while executing the motion function block. |
| ErrorID | Outputs error code while running the motion function block. |
| CommandAborted | Indicates the motion function block is interrupted by another motion function block. |
| Variable | Description |
|---|---|
| Enable | Motion function block is executed on rising edge and while On. Motion function block stops on falling edge and Off. |
| Busy | Output indicates that the motion function block is currently running. |
| Valid | Indicates the motion function is successfully being performed and output is valid. |
| Error | Indicate an error while running the motion function block. |
| ErrorID | Outputs error code while running the motion function block. |
LM411