Function BlockMC_PowerPLCopen motion icon

Description

This function block requests to enable the drive and close the position loop, or disable the drive and open the position loop. 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.

MC_Power

Figure 7-125: MC_Power


  • You must be careful if you have 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 of your active programs.

Arguments

For more detail on how inputs and outputs work, refer to PLCopen Function Blocks - General Rules

Input

Enable

Description

When this transitions go to high, the control closes the servo loop and sends a command to the drive to enable.

When this transitions go to low, the control opens the servo loop and sends a command to the drive to disable.

 

Data type

BOOL

 

Range

0, 1

 

Unit

N/A

 

Default

Axis

Description

Name of a declared instance of the AXIS_REF library function. For more details,About Axis Name and Number

 

Data type

AXIS_REF

 

Range

[1,256]

 

Unit

N/A

 

Default

Enable Positive

Description

for future enhancement

 

Data type

BOOL

 

Range

0, 1

 

Unit

N/A

 

Default

Enable Negative

Description

for future enhancement

 

Data type

BOOL

 

Range

0, 1

 

Unit

N/A

 

Default

BufferMode

Description

Unused

 

Data type

SINT

 

Range

[0]

 

Unit

N/A

 

Default

Output

Status

Description

Indicates the enabled/disabled state of the drive

 

Data type

BOOL

Busy

Description

for future enhancement – always false

 

Data type

BOOL

Error

Description

Indicates an invalid input was specified

 

Data type

BOOL

ErrorID

Description

Indicates the error if Error output is set to TRUE

See table in PLCopen Function Block ErrorID Output

 

Data type

INT

Example

Structured Text

 

(* 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

 

Ladder Diagram

MC_Power: LD example

Go back to the top of the page [Top]