MC_Power
The MC_Power FB switches the power of the drive of the axis defined by AXIS_REF on or off. It is assigned to the group of administrative FBs.
Block diagram
FB parameters
VAR_IN_OUT | ||
Variable name | Data type | Description |
Axis | AXIS_REF | Axis reference |
VAR_INPUT | ||
Variable name | Data type | Description |
Enable | BOOL | Must have the value TRUE otherwise power cannot be switched on. |
Enable_Positive | BOOL | Must have the value TRUE otherwise power cannot be switched on. Enable only for positive motion direction is not supported. |
Enable_Negative | BOOL | Must have the value TRUE otherwise power cannot be switched on. Enable only for negative motion direction is not supported. |
PowerDefaultState | MCV_DRIVE_ | Function available for CANopen drives: The function block sets the drive to this state as long as the “Status” output indicates FALSE, i.e. at least one of the Enable... inputs is assigned the value FALSE (see table below). The input is assigned mcvPowerStateDefault as default value |
VAR_OUTPUT | ||
Variable name | Data type | Description |
Status | BOOL | TRUE indicates that the drive has torque applied and is in control mode. |
Error | BOOL | Indicates whether an error occurred in the FB. |
ErrorID | WORD | Error identifier |
DriveEnabled | BOOL | TRUE indicates that the drive is ready for enabling power. |
DriveReady | BOOL | TRUE indicates that the drive is being controlled. |
PowerState | MCV_DRIVE_ | State in which the drive is currently (see table below). |
Values of the enumeration type MCV_DRIVE_POWER_STATE
Constant | Value | Note |
mcvPowerStateNotReady | 0 | Drive not ready to run. |
mcvPowerStateReadyForPower | 1 | Drive ready to run. |
mcvPowerStateReadyForOperation | 2 | Drive switched on. |
mcvPowerStateDriveEnabled | 3 | Drive ready but no controller enable. |
mcvPowerStateOperational | 4 | Drive ready and command values to follow. |
mcvPowerStateDefault | 5 | The "PowerDefaultState” input is defaulted with this value. Then MC_Power only sends commands to the drive when TRUE was assigned to all 3 "Enable_...” inputs. If FALSE is assigned to one of the 3 "Enable_...” inputs, this value causes the drive to revert to the initial state configured in the drive. |
Behaviour of the FB:
- The power for the drive is connected only if all 3 inputs have the value TRUE.
- Regardless of the status of the axis, this FB can be commanded and the command can be sent to the motion controller.
- If there is an error in other axes, the MC_Power FB reacts and outputs the error P-ERR-40001 (ERR_PLC_AX_MC) at the function block and indicates the error P-ERR-294039 at its output AxisErrorID on the function block MC_ReadAxisError.
- The behaviour of the axis depends on the defined drive type. If the drive type simulation (P-AXIS-00020) is defined for the axis, the output "Status" is also simulated.