MC_ReadParameter
The function block MC_ReadParameter is used to read an axis parameter.
Note: "Axis" is referencing the TwinCAT NC axis parameters in this case, not the drive parameters!
VAR_INPUT
VAR_INPUT
Enable : BOOL;
ParameterNumber : INT;
ReadMode : E_ReadMode
END_VAR
Enable : The command is executed as long as the input is TRUE.
ParameterNumber : Number of the parameter to be read.
ReadMode : ReadMode of the parameter to be read (once or cyclic).
VAR_OUTPUT
VAR_OUTPUT
Done : BOOL;
Error : BOOL;
ErrorID : UDINT;
Value : LREAL;
END_VAR
Done : Becomes TRUE, if the states were determined successfully.
Error: Becomes TRUE, as soon as an error occurs.
ErrorID : Supplies the error number when the Error output is set.
Value : Displays the read value.
VAR_IN_OUT
VAR_IN_OUT
Axis : NCTOPLC_AXLESTRUCT;
END_VAR
Axis : Axis structure.
Requirements
Development environment | Target system type | PLC libraries to be linked |
---|---|---|
TwinCAT v2.8 | PC (i386) | TcMC.Lib |