Rockwell Automation Publication 2198-UM004D-EN-P - December 2022 519
Appendix C Use Add-On Instructions
There are two modes of the MAG function that can be used. These modes are
defined by the Cfg_GearingMode entry. This entry is not visible and is set for
Fixed initially. You must intentionally change this setting. Fixed mode does
not impact positioning because it uses the existing E-Gear ratio in the Kinetix
5100 drive. Therefore, we can follow a master source at this fixed ratio and
when gearing is disabled, we can continue positioning without losing the
position scaling for the drive.
Variable mode lets you change the E-Gear ratio by manipulating the master/
slave counts values. The variable mode lets you change the ratio. When the
ratio is changed, the motor positioning is affected because the E-Gear ratio is
also used to define Position Scaling. If you require positioning after using the
variable gearing, issue a Homing Sequence to re-establish an origin.
Figure 270 - MAG Ladder Diagram
Operands
Operand Type Format Description
Instance raC_xxx_K5100_MAG Tag Unique instance of the MAG Add-On Instruction
Ref_Ctrl_Cfg raC_UDT_Itf_PowerMotionSA_Cfg Tag Interface for Ctrl_Cfg of the Device Object
Ref_Ctrl_Set raC_UDT_Itf_PowerMotionSA_Set Tag Interface for Ctrl_Set of the Device Object
Ref_Ctrl_Cmd raC_UDT_Itf_PowerMotionSA_Cmd Tag Interface for Ctrl_Cmd of the Device Object
Ref_Ctrl_Sts raC_UDT_Itf_PowerMotionSA_Sts Tag Interface for Ctrl_Sts of the Device Object
Set_MasterCounts DINT (not visible) Immediate or Tag
Sets the value of E-Gear Ratio; Denominator ID152 (P1.045)
Set this value to represent the desired counts/motor
rotation. This value defines the number of pulses/motor
rotation and when used with the feedback pulses you
expect to see from the source input (also pulses/
revolution) provides a gearing relationship.
Set_SlaveCounts DINT (not visible) Immediate or Tag
Sets the value of E-Gear Ratio; Numerator ID151 (P1.044)
Set this value the same as the Motor Feedback Resolution.
Cfg_GearingMode BOOL (not visible) Tag
0 = Fixed
1 = Variable
Set_AccelReference (future) REAL (not visible) Immediate or Tag
Units are 0.1 rpm/s for rotary motor
Range: 458…30,000,000
Mnemonic Description
Sts_EN (Enable)
This bit is set when the rung makes a false-to-true transition and the message transaction
to MAG is initiated and in process. It remains high until the rung-in condition is false and no
faults are active.
Sts_DN (Done)
This bit is set when the rung makes a false-to-true transition and the message transaction
to MAG (Sts_EN) is complete.
Sts_ER (Error)
This bit is set when the rung makes a false-to-true transition and there is an error that has
occurred with the instruction. (This instruction error can be a result of a fault on the drive
itself). See Sts_ERR for details on the cause of the error.
Sts_IP (In Progress)
This bit is set when the rung makes a false-to-true transition, the MAG message transaction
is successful, and the drive begins following. This bit remains set as the motor is executing
the gearing. It remains set while the MAG is active, regardless of the rung-in condition.