MC_ReadBoolParameter
The function block MC_ReadBoolParameter is used to read a boolean axis parameter.
![]() | In this case "axis" refers to the TwinCAT NC axis and not the drive. |
Inputs
VAR_INPUT
Enable : BOOL; (* B *)
ParameterNumber : MC_AxisParameter; (* B *)
ReadMode : E_ReadMode (* V *)
END_VAR
Enable | The command is executed as long as Enable is active. |
ParameterNumber | Number of the parameter to be read. |
ReadMode | Read mode of the parameter to be read (once or cyclic). |
Outputs
VAR_OUTPUT
Valid : BOOL; (* B *)
Busy : BOOL; (* E *)
Error : BOOL; (* B *)
ErrorID : DWORD;(* E *)
Value : BOOL; (* B *)
END_VAR
Valid | The value signaled at the Value output is valid |
Busy | The Busy output becomes TRUE when the command is started with Enable and remains TRUE as long as the command is processed. If Busy becomes FALSE again, the function block is ready for a new order. |
Error | Becomes TRUE if an error occurs. |
ErrorID | If the error output is set, this parameter supplies the error number |
Value | Displays the boolean value that was read. |
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VAR
Axis | Axis data structure |
The axis data structure of type AXIS_REF addresses an axis unambiguously within the system. Among other parameters it contains the current axis status, including position, velocity or error state.