Read kinematic parameters
Kinematic parameters can be read via the FB MC_ReadParameter. Depending on the interface connected at the Axis input, the following parameters can be read:
-
motion axis (AXIS_REF): parameters can be read from the axis data structure or from connected inverter.
-
single axis kinematic (e.g. gantry) or axis group (AXES_GROUP_KIN): parameters of the kinematics can be read
Further information:(MC_ReadParameter)
Example call
---------------------------------------------------------------
//Declaration
VAR
ReadParaFromAxis: MC_ReadParameter;
ReadParaFromKin: MC_ReadParameter;
END_VAR
---------------------------------------------------------------
//Instance call for reading from axis (here subindex 4: PLCopen status)
ReadParaFromAxis(Axis:=GantryAxis_re, ParameterNumber:= 4, xEnable:= TRUE);
//Instance call for reading from kinematics (here Subindex 4: Kinematics status)
ReadParaFromKin(Axis:=Gantry, ParameterNumber:= 4, xEnable:= TRUE);
---------------------------------------------------------------