Motion Control Fundamentals: MC_Power, Do You Really Understand It?

The MC_Power function block serves as the core foundation for axis motion control. It manages the enabling state of the axis, ensuring safe and reliable startup and operation upon receiving motion commands. 



Input and Output Pins

Axis: The name of the axis, mapped to the axis to be operated.

Inputs

Enable:

The activation signal for the MC_Power command. The function block will only operate when Enable is TRUE, and the command must be continuously called in the program to maintain the axis enabling state. To maintain the axis enabling state, the state needs to be continuously activated in the program.

bRegulatorOn:

The servo power-on signal. This pin can generally be used to trigger the enabling state of the axis.

bDriveStart:

Disables the rapid stop mechanism. This pin can be used to associate with the emergency stop circuit and should normally be kept in the TRUE state.

Outputs:

Status: The StandStill state of the axis.

Busy: Indicates whether the MC_Power command is active.

Error: Indicates whether the MC_Power command has generated an error.

ErrorID: When the MC_Power command generates an error, ErrorID represents the error number.

bRegulatorRealState: Whether the axis is in the power-on state. It is a feedback of the bRegulatorOn signal.

bDriveStartRealState: Whether the axis is in the rapid stop state. It is a feedback of the bDriveStart signal.

Functional Description


Only when the input Enable is TRUE will the other inputs be processed by the function block.

If the MC_Power function block has been called and bRegulatorOn=FALSE, the function block will set the axis state of the relevant axis to power_off, indicating that the axis is not yet ready for motion.

If the MC_Power function block has been called and bRegulatorOn=TRUE, and if no errors occur, the function block will set the state of the relevant axis to StandStill; if an error occurs, the corresponding error state will be output.

If Enable, bRegulatorOn, and bDriveStart are all TRUE, but the output Status remains FALSE after a certain period, the output Error will be set. This may happen if a hardware issue arises while in the enabling state.

If the enable signal is lost, the relevant axis will be set to the ErrorStop state.


Functional Description

The MC_Power function block processes other inputs only when the Enable input is set to TRUE.

If the MC_Power function block is called and bRegulatorOn is FALSE, it will set the axis state of the relevant axis to power_off, indicating that the axis is not yet prepared for motion.

If the MC_Power function block is called, and bRegulatorOn is TRUE, and no errors occur, the function block will set the state of the relevant axis to StandStill. If an error occurs, it will output the corresponding error state.

If Enable, bRegulatorOn, and bDriveStart are all TRUE, but the output Status remains FALSE after a specified period, the output Error will be set. This scenario can occur if a hardware issue arises while the axis is in the enabled state.

If the Enable signal is lost, the relevant axis will be set to the ErrorStop state.


Timing Diagram:

Set Enable to TRUE, bRegulatorOn to TRUE, and bDriveStart to TRUE. Subsequently, the axis enters the enabled ON state, and simultaneously, the Status also changes to TRUE, reflecting that the axis is currently in the StandStill state.

Like my work? Consider a donation! 👇