MC_Power (FB)
FUNCTION_BLOCK MC_Power
This function block controls the power stage (on or off).
If this function block is called with Enable = TRUE and axis Disabled, it will either lead to StandStill when no error inside the axis or ErrorStop if an error exists. An error indicates that there is a hardware problem with the power stage.
If power fails (also during operation) block will generate a transition to the state ErrorStop.
When MC_Power is called with Enable = FALSE the axis goes to state Disabled for every state including ErrorStop.
It is possible to set an error variable when the Command is TRUE for a while and the Status remains FALSE with a Timer Function Block and an AND Function (with inverted Status input). It indicates that there is a hardware problem with the power stage
Note
Error “NO_FIELD_ACCCESS” can get generated at the output ErrorID even when function block is disabled.
- InOut:
Scope
Name
Type
Initial
Comment
Input
EnableBOOLEnable continuously on “TRUE”
EnablePositiveBOOLTRUE
Enable positive movement direction, FALSE will hold the axis without ramp, an ongoing movement is aborted
EnableNegativeBOOLTRUE
Enable negative movement direction, FALSE will hold the axis without stop, an ongoing movement is aborted
Output
StatusBOOLAxis is ready for operation
ErrorBOOLSignals that error has occurred within function block
ErrorIDError identification. For error details refer to Enumeration ERROR_ID
Inout
AxisReference to axis