MC_ReadParameterSet

MC_ReadParameterSet 1:

The function block MC_ReadParameterSet can be used to read the entire parameter set of an axis.

In this case "axis" refers to the TwinCAT NC axis and its parameters, and not the drive.

Inputs

VAR_INPUT
    Execute : BOOL;
END_VAR

Execute: The command is executed with a positive edge.

Inputs/outputs

VAR_IN_OUT
    Parameter : ST_AxisParameterSet;
    Axis      : AXIS_REF;
END_VAR

Parameter: Parameter data structure into which the parameters are read. (Type: ST_AxisParameterSet)

Axis: Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state. (Type: AXIS_REF)

Outputs

VAR_OUTPUT
    Done    : BOOL;
    Busy    : BOOL;
    Error   : BOOL;
    ErrorID : UDINT;
END_VAR

Done: TRUE if the parameters were read successfully.

Busy: TRUE as soon as the command is started with "Execute" and as long as the command is processed. If "Busy" is FALSE, the function block is ready for a new order. At the same time, one of the outputs "Done" or "Error" is set.

Error: TRUE, if an error occurs.

ErrorID: If the error output is set, this parameter supplies the error number.

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)

Tc2_MC2