L_MC1P: AxisRef extended by identifier for device axis A, axis B for multi-axis devices (from V03.19.00)
Function extension:
L_MC1P: The AxisRef of the motion axes has now been extended by an identifier (property) for multi-axis devices. For example, in the case of an i700 double axis, this identifier can now be used to determine whether axis A or axis B is assigned to a motion axis.
Contained in which products?
Library: L_MC1P_MotionControlBasic (FAST Motion) from V03.19.00.101 (Update via Package-Manager)
Application:
For reading/writing parameters via the PLC application, multi-axis devices require the information whether axis A or axis B of the device is assigned to the motion axis to be parameterized. Until now, only a less convenient solution was available for this task (program example under Application Ideas Pool). With this previous solution, an internal variable from AxisRef (_AXIS_REF_i700) is accessed via pointer. In terms of compatibility aspects, however, this method cannot be considered future-proof and, furthermore, pointer access involves an increased risk of errors.
With the new identifier for axis A or B in the AxisRef structure, there is now a simple and secure way to determine this.
Programming example:
//Variables Declaration VAR eA1_Offset: L_MC1P_AxisSlot ; eA2_Offset: L_MC1P_AxisSlot ; END_VAR
// Program code to query whether device axis A or B is assigned. eA1_Offset := A1.AxisSlot ; eA2_Offset := A2.AxisSlot ;
Note: The variables eA1_Offset and eA2_Offset can be used as an offset to specify the parameter index for the functions L_MC1P_IndexToParameter and L_MC1P_IndexToParameter. For this purpose add the offset variable to the index of a single axis. For example, for the function "Set actual position" the start value is to be written under parameter 0x2983:
Index of the single axis or axis A of a double axis: Set 0x2983 actual position: Start value The resulting index of axis B: 0x2983+AxisB = 0x3183
Enum description L_MC1P_AxisSlot (values of type UINT):