Writing kinematic parameters
Kinematic parameters can be written via the FB MC_WriteParameter. Depending on the interface connected at the Axis input, the following parameters can be written:
-
motion axis (AXIS_REF): parameters of the axis data structure or the connected inverter can be written.
-
single axis kinematic (e.g. gantry) or axis group (AXES_GROUP_KIN): parameters of the structure can be written
Further information:(MC_WriteParameter)
Example call
---------------------------------------------------------------
//Declaration
VAR
WriteParaToAxis: MC_WriteParameter;
WriteParaToKin: MC_WriteParameter;
END_VAR
---------------------------------------------------------------
//Instance call for reading in the axis (here subindex 30: travel range)
WriteParaToAxis(Axis:=GantryAxis_re, ParameterNumber:= 30, Value := 1, ExecutionMode := MC_EXECUTION_MODE.mcImmediately);
//Instance call for writing in the kinematics
//(here subindex 35: coupling mode)
WriteParaToKin(Axis:=Gantry, ParameterNumber:= 35, Value :=1, ExecutionMode := MC_EXECUTION_MODE.mcImmediately );
---------------------------------------------------------------