MC_Power

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Requests to either enableClosed Enable signal for the drive, Hardware-Enable with 24V signal to X8, Software-Enable command by setup Software, fieldbus or permanently set. Both are required for enabling the drive. the driveClosed In electrical engineering, a drive is an electronic device to provide power to a motor or servo. Control device for regulating the speed, torque and position of a motor. A unit controlling a motor using the current and timing in its coils. and close the loop, or disableClosed Removal of the ENABLE signal. Disables power stage. the drive and open the loop.

Inputs

Input

Data Type

Range

Unit

Default

Description

Enable

BOOL

FALSE, TRUE

N/A

No default

When this transitions goes to high:

  • The control closes the servo loop.
  • Sends a command to the drive to enable.

When this transitions go to low:

  • The control opens the servo loop.
  • Sends a command to the drive to disable.

Axis

AXIS_REF

1, 256

N/A

No default

Name of a declared instance of the AXIS_REF library functionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances..

EnablePositive

BOOL

FALSE, TRUE

N/A

No default

For future enhancement.

EnableNegative

BOOL

FALSE, TRUE

N/A

No default

For future enhancement.

BufferMode

SINT

0 (zero)

N/A

No default

Unused.

Outputs

Output

Data Type

Range

Unit

Description

Status

BOOL

FALSE, TRUE

N/A

Indicates the enabled/disabled state of the drive.

Busy

BOOL

FALSE, TRUE

N/A

Always FALSE.

Error

BOOL

FALSE, TRUE

N/A

Indicates an invalid input was specified.

ErrorID

INT

-32768 to +32767

 

Indicates the error if Error output is TRUE.

See PLCopen Function Block ErrorIDs.

Remarks


  • Be careful if there is more than one instance of MC_Power FB for the same drive, scanned in the same cycle.
    The problem arises when one instance requests the drive to enable and the other requests the same drive to disable.
    To avoid this trap, it is recommended to have only one instance of MC_Power for all active programs.

Figure 1: MC_Power

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

(* MC_Power ST example *)
Inst_MC_Power( CloseLoopReq, Axis1, TRUE, TRUE, 0 );
//Inst_MC_Power is an instance of MC_Power function block
DriveIsOn := Inst_MC_Power.Status; //store the Status output into a user defined variable