MC_ReadParameter
The function block MC_ReadParameter is used to read an axis parameter.
In this case "axis" refers to the TwinCAT NC axis and its parameters, and not the drive. |
Inputs
VAR_INPUT
Enable : BOOL; (* B *)
ParameterNumber : MC_AxisParameter; (* B *)
ReadMode : E_ReadMode (* V *)
END_VAR
Name | Type | Description |
---|---|---|
Enable | BOOL | Reads the parameter once or cyclically depending on the ReadMode. |
ParameterNumber | Number of the parameter to be read | |
ReadMode | Read mode of the parameter to be read (once or cyclic) |
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VAR
Name | Type | Description |
---|---|---|
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. |
Outputs
VAR_OUTPUT
Valid : BOOL; (* B *)
Busy : BOOL; (* E *)
Error : BOOL; (* B *)
ErrorID : DWORD; (* E *)
Value : LREAL; (* B *)
END_VAR
Name | Type | Description |
---|---|---|
Valid | BOOL | Signals with TRUE that the value read at output Value is valid. |
Busy | BOOL | TRUE as soon as the command is started with Enable and as long as the command is processed. If Busy is FALSE, the function block is ready for a new order. |
Error | BOOL | TRUE, if an error occurs. |
ErrorID | DWORD | If the error output is set, this parameter supplies the error number. |
Value | LREAL | Shows the read value. |
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v3.0.0 | PC or CX (x86 or x64) | Tc2_MC2 |