FUNCTION_BLOCK MC_Power
MC_Power is designed for controlling the power stage ("on" or "off").
Note
The inputs are only processed if Enable is TRUE.
A call of MC_Power with bRegulatorOn = FALSE sets nAxisState of the referenced axis always into state (disabled) power_off. Then the axis isn't ready for motion.
A call of MC_Power with bRegulatorOn = TRUE on a disabled axis sets its nAxisState to standstill if there is no error on the axis. If an error is detected, the state of the axis is set to errorstop.
If the inputs Enable, bRegulatorOn and bDriveStart are TRUE but the output Status remains FALSE for a long time, a possible reason is a hardware problem with the power stage of the drive.
If power fails (also during operation), nAxisState of the referenced axis is set to errorstop.
InOut:
Scope |
Name |
Type |
Initial |
Comment |
Inout |
Axis |
Reference to axis |
||
Input |
Enable |
BOOL |
FALSE |
|
bRegulatorOn |
BOOL |
FALSE |
TRUE: Enables the power stage. |
|
bDriveStart |
BOOL |
FALSE |
TRUE: Disables the quickstop mechanism. |
|
Output |
Status |
BOOL |
FALSE |
|
bRegulatorRealState |
BOOL |
FALSE |
TRUE: The power stage has been switched on. |
|
bDriveStartRealState |
BOOL |
FALSE |
TRUE: Drive is not blocked by the quickstop mechanism. |
|
Busy |
BOOL |
FALSE |
TRUE: Execution of the function block has not been finished yet. |
|
Error |
BOOL |
FALSE |
TRUE: Error has occurred within the function block during execution. |
|
ErrorID |
SMC_ERROR |
Error identification |