CIP_Axis_Enable_Streaming AOI

 

Description

The CIP_Axis_Enable_Streaming instruction requests to enable position following (streaming data points from the Virtual Axis’ trajectory) via the CIP_Axis_State_Machine in the AKD2G-SPI axis. When streaming is active (enabled) the AKD2G axis follows the Virtual Axis’ command.

Compatibility

The CIP_Axis_Enable_Streaming 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_Enable_Streaming AOI passes a Requested Action of 6 (Enable Cyclic Position Streaming) to the corresponding CIP_Axis_State_Machine AOI for the given axis. When the axis status AXIS.Status.Manu_Specific_15 (bit 15) is True, indicating Streaming Active, then the CIP_Axis_Enable_Streaming AOI command is successful and the .DN bit is set. If the axis status bit AXIS.Status.Manu_Specific_15 (bit 15) does not transition to True in a timely manner, then a command timeout for the CIP_Axis_Enable_Streaming AOI is declared and the .ER bit is set.

The CIP_Axis_Enable_Streaming AOI execution time may require multiple scans due to the required fieldbus communication time and time for the state machine to transition.

Operands

These entries are required by the user.

Operand

Data Type

Format

Description

CIP_Axis_Enable_Streaming

CIP_Axis_Enable_Streaming

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.

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:

  • 0 then Error_Description is No Error.

  • 1 then Error_Description is Command Timeout.

  • 2 then Error_Description is Axis Faulted.

  • 3 then Error_Description is Home Not Attained.

  • 4 then Error_Description is Axis Not Enabled.

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

Turns ON when the streaming active status is returned.

.ER

Output

BOOL

The .ER bit is set if any of the error conditions occur.

Error_Code

Output

SINT

If Error_Code is:

  • 0 then Error_Description is No Error.

  • 1 then Error_Description is Command Timeout.

  • 2 then Error_Description is Axis Faulted.

  • 3 then Error_Description is Home Not Attained.

  • 4 then Error_Description is Axis Not Enabled.

Changes to Axis Status Bits and Control Word bits Description

On Enable Streaming the axis begins following the cyclic data points and time stamps from the Virtual Axis and the following status bits turn ON.

Bit Name Status
14 Motion Mode (Motion Mode = Cyclic Position) ON
15 Manufacturer Specific (Following Position) ON

In the event a position following error occurs while streaming is active and Motion Mode = Cyclic Position.

Bit Name Status
13 Position Following Error ON

Example of Usage/Programming Guidelines

In the Sample project the CIP_Axis_Enable_Streaming 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_Enable_Streaming AOI is to use a conditional N.O. Contact as a trigger (ax1_cyclic_position_on_request in the example below) and then use a One Shot (ONS) to trigger the CIP_Axis_Enable_Streaming 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 (.DN; Done) or fails (.ER; Error). An interlock is shown using the AXIS_ONE.Status.Operation_Enabled and AXIS_ONE.Status.Op_Mode_Specific_12 (Home Attained) status bits both using N.O. Contacts so the CIP_Axis_Enable_Streaming AOI cannot be triggered if the axis is not in operation enabled and homed.

An additional rung provides a way to monitor the streaming active state in the ladder based on the AXIS_ONE.Status_Manu_Specific_15 (streaming active) status bit in the axis status word and when it is True (ON) a coil in the ladder named Ax1_Streaming_Active turns ON. Note AXIS_ONE is the name in the Sample project given to Axis1 in the CIP_Drive_Comms as an alias for all other Kollmorgen CIP_Axis AOIs to use for that axis.

Figure 1: Example: Axis1_Routine with CIP_Axis_Enable_Streaming AOI

Troubleshooting

The condition for the Error (.ER) bit to be set for the CIP_Axis_Enable AOI:

  • The following conditions will generate an Error Code, Error Description, set the .ER bit of the CIP_Axis_Enable_Streaming AOI and set the Step Number to -1:
    • If the Axis.Status.Fault status bit is ON indicating the axis is faulted then:
      • Set the Error_Code to 2 (Axis Faulted).
      • Set the Error_Description to Axis Faulted.
    • If the Axis.Status.Fault status bit is OFF (not faulted) and the CommandTimeout timer is .DN (indicating streaming active did not turn on; request failed):
      • Set the Error_Code to 1 (Command Timeout).
      • Set the Error_Description to Command Timeout.
    • If the Axis.Status.Fault status bit is OFF (not faulted), the Axis.Status.Operation_Enabled is ON but the Axis.Status.Op_Mode_Specific_12 (Home Attained) bit is not ON then:
      • Set the Error_Code to 3 (Home Not Attained).
      • Set the Error_Description to Home Not Attained.
    • If the Axis.Status.Fault status bit is OFF (not faulted) and the Axis.Status.Operation_Enabled status bit is OFF (not enabled) then:
      • Set the Error_Code to 4 (Axis Not Enabled).
      • Set the Error_Description to “Axis Not Enabled.

Step Summary

Step Number

Operation/Result

0

Clear bits, error codes and descriptions, and set Step Number to 1.

1

Set the Axis.RequestedAction to 6 (Enable Cyclic Position Streaming ) and set Step Number to 2.

2

Monitor AXIS.Status.Manu_Specific_15 (streaming active status bit determine success (DN) or command timeout (ER)

-1

Error (See Troubleshooting for more information.)

Revision History

Revision Number Description/Notes Date of Revision
v1.5 Initial release 03-14-2024