MC_Power

PLCopen motion icon

 Function Block - Requests to either enable the drive and close the loop, or disable the drive and open the loop.

  • See Function Blocks - General Rules about how inputs and outputs work.
  • The Status output indicates the state of the position loop.
    • If the position loop is open, the axis command position is set to the actual position of the axis and tracks the actual position.


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

Inputs

Input

Data Type

See Data Types.

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 to 256

N/A

No default

Name of a declared instance of the AXIS_REF library function.

EnablePositive

BOOL

FALSE, TRUE

N/A

No default

Unused.

EnableNegative

BOOL

FALSE, TRUE

N/A

No default

Unused.

BufferMode

SINT

0 (zero)

N/A

No default

Unused.

Outputs

Output

Data Type

See Data Types.

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

Enumerated

N/A

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