CIP_Axis_Home AOI
Description
The CIP_Axis_Home AOI requests to Home the AKD2G-SPI axis via the CIP_Axis_State_Machine.
Compatibility
The CIP_Axis_Home 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_Home AOI passes a RequestedAction of 5 to the corresponding CIP_Axis_State_Machine AOI for the given axis. When the Axis.Control.Op_Mode_Specific bit 4 (home start when Mode = Home) the DN bit of the CIP_Axis_Home AOI is set (command acknowledged). When the Axis.Status.Target_Reached and Axis.Status.Op_Mode_Specific_12 (home attained when Mode = Home) then the PC bit of the CIP_Axis_Home AOI is set (success and homing complete).
Per the help (see CIP Sync State Machine Statusword), in Homing Mode the Axis.Status.Target_Reached status bit position window is set using AXIS#.SETTLE.P.
The CIP_Axis_Home AOI has multiple possible error conditions which are described in the Troubleshooting section of this topic.
The CIP_Axis_Home AOI execution time may require multiple scans due to the required fieldbus communication time and is also time dependent on the AXIS#.HOME.MODE selected in the AKD2G drive on the Axis 1 or Axis 2 Home view in WorkBench.
Operands
These entries are required by the user.
|
Operand |
Data Type |
Format |
Description |
|---|---|---|---|
|
CIP_Axis_Home |
CIP_Axis_Home |
Tag |
Tag name for instance of the AOI. |
|
Axis |
CIP_Axis |
Tag |
User tag defined in the Axis1 or Axis2 field of the CIP_Drive_Comms AOI. |
|
Timeout_mS |
DINT |
Tag |
User tag for a defined user timeout to declare the CIP_Axis_Home AOI took too long to complete. |
|
Error_Description |
STRING |
Tag |
User tag to display the string error code description. In run-time when the mouse cursor is hovered over the tag the string can be monitored. If Error_Code is:
|
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 |
Format |
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. |
|
.DN |
Output |
BOOL |
Set when axis control word OpMode specific bit 4 turns on where bit 4 is the Home Start bit when the mode bit 11 is ON; Home Mode. |
|
.ER |
Output |
BOOL |
The .ER bit is set when any of the 6 error conditions are present or occur during the homing operation. |
| .IP | Output | BOOL | The IP bit turns ON after the Home Start commences. The IP bit turns OFF when the user TimeOut occurs (Homing took too long) or if the Target Reached and Home Attained bits in the status word turns ON and indicates Homing is successful. |
| .PC | Output | BOOL | After the Home Start commences when the Target Reached and Home Attained bits in the status word turns ON (indicating Homing is successful), the PC bit turns ON. |
|
Error_Code |
Output |
SINT |
If Error_Code is:
|
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).
On Home success:
| Bit | Name | Status |
|---|---|---|
| 10 | Target Reached | ON |
| 12 | Home Attained | ON |
On Home error:
| Bit | Name | Status |
|---|---|---|
| 13 | Homing Error | ON |
Example of Usage/Programming Guidelines
In the Sample project the CIP_Axis_Home AOI is used in the subroutine for the given axis under MainTask → MainProgram → Axis1_Routine or Axis2_Routine.
Subroutines are called in the MainRoutine_with_CIP_State_Machines routine under MainTask → Main Program.
The best practice for the CIP_Axis_Home AOI is to use a conditional N.O. Contact as a trigger (Ax1_Home in the example) and then use a One Shot (ONS) to trigger the CIP_Axis_Home AOI .EnableIn. A parallel branch is implemented around the N.O. Contact and One Shot to seal-in the .EnableIn of the AOI until execution completes (.PC; Success) or fails (.ER; Error). The AXIS_ONE.Status.Operation_Enabled (as a N.O. Contact) and AXIS_ONE.Status.Manu_Specific_15 (as a N.C. Contact) status bits are used both as interlocks to ensure the axis is enabled and to ensure the axis cannot be streaming active prior to triggering the CIP_Axis_Home AOI.
The AXIS#.HOME.MODE selected by the user will affect how long the Home Move (routine) takes. The CIP_Axis_Home AOI’s field TimeOut_mS allows the user to set a time limit for how long the CIP_Axis_Home AOI takes to complete (success) before timing out and declaring a timeout error.
An additional rung provides a way to monitor the homed state in the ladder based on the AXIS_ONE.Status.Op_Mode_Specific_12 status bit in the axis status word and when it is True (ON) a coil in the ladder named “Axis1_Homed” turns ON. Note AXIS_ONE is the name given to Axis1 in the CIP_Drive_Comms in the Sample project as an alias for all other Kollmorgen CIP_Axis AOIs to use for that axis.
Figure 1: Example: Axis1_Routine with CIP_Axis_Home AOI
Troubleshooting
The possible conditions for the Error (.ER) bit to be set for the CIP_Axis_Home AOI:
- Axis.Status.Fault is ON (Axis Faulted).
- Set the Error_Code = 2
- Set Error_Description = Axis Faulted
- Axis.Status.Fault is OFF (Axis not Faulted) but Axis.Status_Operation_Enabled is OFF (Axis Not Enabled).
- Set the Error_Code = 3
- Set the Error_Description = Axis Not Enabled
- Axis.Status.Fault is OFF (Axis not Faulted) but AXIS.Status.Manu_Specific_15 (Streaming Active) status bit is ON.
- Set the Error_Code = 6
- Set the Error_Description = Homing Not Allowed While Streaming Active
- Step Number = 3 (IP, in process) and the TimeOut timer times out
- Set the Error_Code = 4
- Set the Error_Description = User Homing Timeout_mS Exceeded
- Axis.Status.Fault is OFF (Axis not Faulted) and Axis.Status.Op_Mode_Specific_13 (Homing Error) bit turns ON indicating a homing error
- Set the Error_Code = 5
- Set the Error_Description = Axis Homing Error Occurred
- CommandTimeout timer timed out indicating the Start Home bit in the control word was never acknowledged.
- Set the Error_Code = 1
- Set the Error_Description = Command Timeout
Step Summary
|
Step Number |
Operation/Result |
|---|---|
|
0 |
Clear bits and error codes, set TimeOut.PRE to user TimeOut_mS, and set Step Number to 1. |
|
1 |
Set the Axis.RequestedAction to 5 (Home Start) and set the Step Number to 2. |
|
2 |
After Command_Delay, check for control word bit 4 (home start) to turn ON via the CIP_Axis_State_Machine AOI. If success turn on the .DN bit of the CIP_Axis_Home AOI and set Step Number to 3. If bit 4 does not turn ON by the Command_Timeout (2000 msec) an error will be declared (Error_Code = 1; Error_Description = Command Timeout). |
|
3 |
While in Step Number 3 the .IP of the CIP_Axis_Home AOI turns ON. If the Axis.Status.Target_Reached and Axis.Status.Op_Mode_Specific_12 (Home Attained) turn ON before the user timeout (TimeOut_mS) then turn PC bit ON (success) and set the Requested Action to 0 and the Step Number to 4. |
|
-1 |
Error (See Troubleshooting section in this topic for details.) |
Revision History
| Revision Number | Description/Notes | Date of Revision |
|---|---|---|
| v1.5 | Initial release | 03-14-2024 |








