CIP_Axis_State_Machine AOI
Description
Each AKD2G Axis requires a corresponding CIP_Axis_State_Machine AOI to receive requested actions (commands) from the supplementary Kollmorgen CIP Axis AOIs to generate operations such as Enable, Disable, Home, Fault Reset, Quick Stop, Enable Streaming, and Disable Streaming.
Use the CIP_Axis_State_Machine instruction to:
- Synchronize the AKD2G axis’ AXIS#.EIP.STREAMPERIOD with the Motion Group’s CoarseUpdatePeriod
- Synchronize the AKD2G axis’ AXIS#.EIP.UNWIND where:
- If the Virtual Axis is rotary, AXIS#.EIP.UNWIND = Position Unwind value of the Virtual Axis.
- If the Virtual Axis is linear, the Position Unwind of the Virtual Axis is not used and the AXIS#.EIP.UNWIND is set to 2,000,000,000.
- Monitor the axis’ State Machine including:
- CIP_Axis_State_Machine AOI’s IP, DN, and ER bits
- Axis status bits
- AxisControlWord bits
- RequestedAction
- StateMachineErrorCode (if State Machine Error is present)
- StateMachineErrorDescription (if State Machine Error is present)
- StateMachineCurrentState and StateMachineCurrentStateDescription
Compatibility
The CIP_Axis_State_Machine AOI is only compatible with AKD2G-SPI drives when used with Motion Supported PLCs with Studio 5000 and the CIP Sync connection.
Required Command Source and Operation Mode
AXIS#.CMDSOURCE = Fieldbus
AXIS#.OPMODE = Position
The CIP_Axis_State_Machine AOI is always enabled in the Ladder routine under MainTask → MainProgram by the AOI’s EnableIn being tied to the left rail. The Sample project includes a CIP_Axis_State_Machine AOI for each axis in a routine under the MainTask → MainProgram called MainRoutine_with_CIP_State_Machines.
The CIP_Axis_State_Machine provides the following functionality:
- Sets the Stream Period of the Axis in the AKD2G drive (on prescan) via internal MSG instructions inside the CIP_Axis_State_Machine AOI.
- Receives a Request Action from the supplemental KollmorgenAOIs to move within the CIP Sync: State Machine from one state to another to generate certain operations (i.e., fault reset).
- Monitors and displays the Status bits for the axis based on the current state
- Displays the AxisControlWord bits
- Displays the Requested Action
- Displays the StateMachineErrorCode and StateMachineErrorDescription (if state machine error present). See State Machine Error table for details.
- Displays StateMachineCurrentState and StateMachineCurrentStateDescription. See State Machine States table for details.
Operands
These entries are required by the user.
|
Operand |
Data Type |
Format |
Description |
|---|---|---|---|
|
CIP_Axis_State_Machine |
CIP_Axis_State_Machine |
Tag |
Tag name for this instance of the AOI. |
|
Axis |
CIP_Axis |
Tag |
Tag name for AKD2G drive’s axis defined in the CIP_Drive_Comms AOI fields Axis1 or Axis2. |
|
VirtualAxis |
AXIS_VIRTUAL |
Tag |
Tag name of the Virtual Axis declared in the Motion Group which generates the motion trajectory of the corresponding AKD2G drive’s axis or if unused in the Ungrouped Axes. |
|
MotionGroup |
MOTION_GROUP |
Tag |
Tag name defining the name of the MotionGroup controlling the given AKD2G drive. |
|
UpdatePeriodMsg |
MESSAGE |
Tag |
Tag name defining the name of the UpdatePeriod MSG internal to the CIP_Axis_State_Machine AOI. |
|
UnwindMsg |
MESSAGE |
Tag |
Tag name defining the name of the Unwind MSG internal to the CIP_Axis_State_Machine AOI. |
|
StateMachineErrorDescription |
STRING |
Tag |
Tag name for reporting the State Machine Error
Description in the CIP_Axis_State_Machine AOI. |
|
StateMachineCurrentStateDescription |
STRING |
Tag |
Tag name for reporting the State Machine Current
Description in the CIP_Axis_State_Machine AOI. |
Structure
The following fields are not entered by the user and are populated automatically with Read Only data once the Operands (in the Operand table for this AOI) are entered or presented as output data (bits).
|
Mnemonic |
Type/Usage |
Data Type |
Description |
|---|---|---|---|
|
.EnableIn |
Input |
BOOL |
The Enable Input bit indicates the instruction is enabled. |
|
.EnableOut |
Output |
BOOL |
The Enable Output bit is the output of the Enable Input (.EnableIn) bit. |
|
.IP |
Output |
BOOL |
In Process bit |
|
.DN |
Output |
BOOL |
Done bit |
|
.ER |
Output |
BOOL |
Error bit |
|
RequestedAction |
Output |
INT |
Displays Requested Action. |
|
StateMachineErrorCode |
Output |
INT |
Displays State Machine Error Code. |
|
StateMachineCurrentState |
Output |
INT |
Displays State Machine Current State. |
|
AxisControlWord |
Output |
INT |
Displays Control Word bits. See the Control Word section of CIP Sync Command Assembly Data Structure (105). |
|
.AxisReadyToSwitchOn |
Output |
BOOL |
Displays the status bit of the CIP Axis status word. |
|
.AxisSwitchedOn |
Output |
BOOL |
|
|
.AxisOperationEnabled |
Output |
BOOL |
|
|
.AxisFaulted |
Output |
BOOL |
|
|
.AxisVoltageEnabled |
Output |
BOOL |
|
|
.AxisQuickStop |
Output |
BOOL |
|
|
.AxisSwitchedOnDisabled |
Output |
BOOL |
|
|
.AxisWarning |
Output |
BOOL |
|
|
.AxisSTO |
Output |
BOOL |
|
|
.AxisRemote |
Output |
BOOL |
|
|
.AxisTargetReached |
Output |
BOOL |
|
|
.AxisInternalLimitActive |
Output |
BOOL |
|
|
.AxisHomeAttained |
Output |
BOOL |
|
|
.AxisHomingError |
Output |
BOOL |
|
|
.AxisMotionModeHoming |
Output |
BOOL |
|
|
.AxisMotionModeCyclicPosition |
Output |
BOOL |
|
|
.AxisFollowingError |
Output |
BOOL |
|
|
.AxisStreamingActive |
Output |
BOOL |
State Machine Requested Actions
|
Requested Action # |
Requested Action |
Used By AOI |
State Machine AOI Internal Mode |
|---|---|---|---|
|
0 |
Idle |
CIP_Axis_Disable_Streaming |
Mode 0 |
|
1 |
Disable |
CIP_Axis_Disable |
Mode 1 |
|
2 |
Enable |
CIP_Axis_Enable |
Mode 2 |
|
3 |
Reset Faults |
CIP_Axis_Fault_Reset |
Mode 3 |
|
4 |
Quick Stop |
CIP_Axis_Quick_Stop |
Mode 4 |
|
5 |
Start Home Move |
CIP_Axis_Home |
Mode 5 |
|
6 |
Enable Cyclic Position Streaming |
CIP_Axis_Enable_Streaming |
Mode 6 |
In most cases after the Requested Action is completed, the reported RequestedAction is 0 (Idle).
Figure 1: State Machine RequestedAction shown in the field highlighted in the AOI.
State Machine Current States and Descriptions
|
Current State # |
State Description |
|---|---|
|
0 |
Not Ready To Switch On |
|
1 |
Switch On Disabled |
|
2 |
Ready To Switch On |
|
3 |
Switched On |
|
4 |
Operation Enabled |
|
5 |
Quick Stop Active |
|
6 |
Fault Reaction Active |
|
7 |
Faulted |
Hover the mouse cursor over the tag for StateMachineCurrentStateDescription to view the Current State Description.
Execution
Changes to Axis Status Bits and Control Word bits Description
-
All status bits are updated from the drive. See Status Word in CIP Sync Response Assembly Data Structure (106) for more information.
-
Control Word bits descriptions and functions are described under Control Word in CIP Sync Command Assembly Data Structure (105).
Example of Usage/Programming Guidelines
From the Sample project under MainTask → MainProgram a routine named “MainRoutine_with_CIP_State_Machines” contains the CIP_Axis_State_Machine AOIs for each axis (only Axis1 shown below). There are also JSR (Jump To Subroutines) where each subroutine is the ladder logic for each respective axis ( i.e., Axis1_Routine, Axis2_Routine, etc.).
The CIP_Axis_State_Machine AOI(s) are tied unconditionally to the left rail and execute on every scan.
The UpdatePeriodMSG and UnwindMsg messages inside the CIP_Axis_State_Machine AOI must be configured correctly to point to the correct attribute IDs (of the parameters for the axis in the AKD2G drive) and point to the correct module path in order for the CIP_Axis_State_Machine to operate without error (.ER).
Axis 1 CIP_Axis_State_Machine
UpdatePeriodMsg:
| ID | Instance | Attribute | Name | Data Type | Access | User Mappable |
|---|---|---|---|---|---|---|
| 7537 | 1 | 0x1d71 | AXIS1.EIP.STREAMPERIOD | Signed32 | Read/Write | Yes |
Axis 1:
Message Configuration:
Message Type: CIP Generic
Service Type: Set Attribute Single
Service Code: 10
Class: 64
Instance: 1 (Axis 1)
Attribute: 1d71 (hex), AXIS#.EIP.STREAMPERIOD
Destination Element: Tag that points to CIP_Axis_State_Machine instance name.UpdatePeriod (using the example above, ax1_Cip_State_Machine.UpdatePeriod)
UnwindMsg:
| ID | Instance | Attribute | Name | Data Type | Access | User Mappable |
|---|---|---|---|---|---|---|
| 7538 | 1 | 0x1d72 | AXIS1.EIP.UNWIND | Signed32 | Read/Write | Yes |
Axis 1:
Message Configuration:
Message Type: CIP Generic
Service Type: Set Attribute Single
Service Code: 10
Class: 64
Instance: 1 (Axis 1)
Attribute: 1d72 (hex), AXIS#.EIP.UNWIND
Destination Element: Tag that points to CIP_Axis_State_Machine instance name.Unwind (using the example above, ax1_Cip_State_Machine.Unwind)
Axis 2 CIP_Axis_State_Machine
UpdatePeriodMsg
| ID | Instance | Attribute | Name | Data Type | Access | User Mappable |
|---|---|---|---|---|---|---|
| 73073 | 2 | 0x1d71 | AXIS2.EIP.STREAMPERIOD | Signed32 | Read/Write | Yes |
Axis 2:
Message Configuration:
Message Type: CIP Generic
Service Type: Set Attribute Single
Service Code: 10
Class: 64
Instance: 2 (Axis 2)
Attribute: 1d71 (hex), AXIS#.EIP.STREAMPERIOD
Destination Element: Tag that points to CIP_Axis_State_Machine instance name.UpdatePeriod (using the example above, ax2_Cip_State_Machine.UpdatePeriod)
UnwindMsg:
| ID | Instance | Attribute | Name | Data Type | Access | User Mappable |
|---|---|---|---|---|---|---|
| 73074 | 2 | 0x1d72 | AXIS2.EIP.UNWIND | Signed32 | Read/Write | Yes |
Axis 2:
Message Configuration:
Message Type: CIP Generic
Service Type: Set Attribute Single
Service Code: 10
Class: 64
Instance: 2 (Axis 2)
Attribute: 1d72 (hex), AXIS#.EIP.UNWIND
Destination Element: Tag that points to CIP_Axis_State_Machine instance name.Unwind (using the example above, ax2_Cip_State_Machine.Unwind)
Troubleshooting
State Machine Error Codes are found in the StateMachineErrorCode and StateMachineErrorDescription fields. Hover the mouse cursor over the StateMachineErrorDescription tag to view the error description.
Error Code Syntax: XYY
-
X = Mode the Fault occurs in
-
YY = Error ID
|
Error Code |
Error Description |
Additional Description |
Mode |
|---|---|---|---|
|
0 |
No Error |
|
N/A |
|
101 |
In Fault Reaction Active state while trying to disable |
|
1-Disable Axis |
|
102 |
In Fault state while trying to disable |
|
1-Disable Axis |
|
201 |
In Fault Reaction Active state while trying to enable |
|
2-Enable Axis |
|
202 |
In Fault state while trying to enable |
|
2-Enable Axis |
|
401 |
Not in Operation Enable or Quick Stop state after requesting Quick Stop State |
|
4-Quick Stop |
|
501 |
Homing Error status bit is set |
Indicates the home routine failed. |
5-Home |
|
601 |
Not In Operation Enabled state |
Attempt to stream when axis is not enabled. |
6-Cyclic Position |
|
602 |
Home Attained status bit is cleared |
Attempt to enable streaming when not homed. |
6-Cyclic Position |
|
603 |
Cyclic Position Following Error bit is set |
Status bit 13 indicates a following error occurred. |
6-Cyclic Position |
|
604 |
Update Period MSG error |
UpdatePeriodMsg attempt to write the stream period failed and is in error (therefore attempt to stream failed) |
6-Cyclic Position |
|
605 |
Unwind MSG error |
UnwindMsg attempt to write the position unwind value failed and is in error (therefore attempt to stream failed) |
6-Cyclic Position |
|
701 |
Error in MRP instruction used to synch drive axis with virtual axis, (while) not streaming |
Error in the internal MRP (Motion Redefine Position ) instruction that synchronizes the AKD2G drive axis with the virtual axis when not streaming (the MRP is used to set the virtual axis command to the AKD2G drive axis’ position feedback when not streaming). Most common cause of error is the rotary axis’ modulo is not turned on and the virtual axis command is synchronized to a drive axis position feedback outside the position unwind range. |
N/A |
Step Summary
- None
Revision History
| Revision Number | Description/Notes | Date of Revision |
|---|---|---|
| v1.5 | Initial release | 03-14-2024 |

















