MC_Power (FB)¶
FUNCTION_BLOCK MC_Power
MC_Power is designed for controlling the power stage (“on” or “off”).
Note
The inputs are only processed if
EnableisTRUE.A call of
MC_PowerwithbRegulatorOn=FALSEsetsnAxisStateof the referenced axis always into state power_off. (Except for encoder axes, which stay in standstill, see the note onencoders further below.)
A call of
MC_PowerwithbRegulatorOn=TRUEon a disabled axis sets itsnAxisStateto standstill if there is no error on the axis. If an error is detected, the state of the axis is set toerrorstop.If the inputs
Enable,bRegulatorOnandbDriveStartareTRUEbut the outputStatusremainsFALSEfor a long time, a possible reason is a hardware problem with the power stage of the drive.If power fails (also during operation),
nAxisStateof the referenced axis is set to errorstop.For encoder axes, such as FREE_ENCODER_REF or an encoder axis below a drive, calling
MC_Poweris not necessary. If called on an encoder axis, MC_Power has no effect on the axis and the outputStatusremainsFALSE.
- InOut:
Scope
Name
Type
Comment
Inout
AxisReference to the axis
Input
EnableBOOLTRUE: Enables the execution of the function block.bRegulatorOnBOOLTRUE: Enables the power stage.bDriveStartBOOLTRUE: Disables the quickstop mechanism.Output
StatusBOOLTRUE: Axis is ready to move.bRegulatorRealStateBOOLTRUE: The power stage has been switched on.bDriveStartRealStateBOOLTRUE: Drive is not blocked by the quickstop mechanism.BusyBOOLTRUE: Execution of the function block has not been finished yet.ErrorBOOLTRUE: Error has occurred within the function block during execution.ErrorIDSMC_ERRORError identification