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 Enable is TRUE.

  • A call of MC_Power with bRegulatorOn = FALSE sets nAxisState of the referenced axis always into state power_off. (Except for encoder axes, which stay in standstill, see the note on

    encoders further below.)

  • 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.

  • For encoder axes, such as FREE_ENCODER_REF or an encoder axis below a drive, calling MC_Power is not necessary. If called on an encoder axis, MC_Power has no effect on the axis and the output Status remains FALSE.

InOut:

Scope

Name

Type

Comment

Inout

Axis

AXIS_REF_SM3

Reference to the axis

Input

Enable

BOOL

TRUE: Enables the execution of the function block.

bRegulatorOn

BOOL

TRUE: Enables the power stage.

bDriveStart

BOOL

TRUE: Disables the quickstop mechanism.

Output

Status

BOOL

TRUE: Axis is ready to move.

bRegulatorRealState

BOOL

TRUE: The power stage has been switched on.

bDriveStartRealState

BOOL

TRUE: Drive is not blocked by the quickstop mechanism.

Busy

BOOL

TRUE: Execution of the function block has not been finished yet.

Error

BOOL

TRUE: Error has occurred within the function block during execution.

ErrorID

SMC_ERROR

Error identification