
376
Rockwell Automation Publication 2080-UM002N-EN-E - November 2022
Appendix H User-defined Function Block Motion 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 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 49 - MAG Diagram
Table 115 - MAG Operands
Operand
Type
Format
Description
_EN
BOOL
Tag
True when the rung is enabled.
Ref_Ctrl_Set_In
raC_UDT_Itf_K5100_Set
Tag
Interface from device object.
Ref_Ctrl_Cmd_In
raC_UDT_Itf_K5100_Cmd Tag
Interface from device object.
Ref_Ctrl_Sts_In
raC_UDT_Itf_K5100_Sts
Tag
Interface from device object.
Cfg_GearingMode
BOOL
Immediate
value or
Tag
0 = Fixed
1 = Variable
Set_MasterCounts
DINT
Immediate
value 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
Immediate
value or
Tag
Sets the value of E-gear ratio: Numerator
ID151 (P1.044). Set this value the same as the
Motor Feedback Resolution.
_ENO
BOOL
Tag
True when this UDFB output is enabled.
Ref_Ctrl_Set_Out
raC_UDT_Itf_K5100_Set
Tag
Interface to device object.
Ref_Ctrl_Cmd_Out
raC_UDT_Itf_K5100_Cmd Tag
Interface to device object.
Ref_Ctrl_Sts_Out
raC_UDT_Itf_K5100_Sts
Tag
Interface to device object.
Sts_EN (Enable)
BOOL
Tag
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)
BOOL
Tag
This bit is set when the rung makes a false-
to-true transition and the message
transaction to MAG (Sts_EN) is complete.