MC_Power
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
Enable |
BOOL |
FALSE, TRUE |
N/A |
No default |
When this transitions goes to high:
When this transitions go to low:
|
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 |
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. |
Remarks
-
-
This function or function block returns cached data.
See Program a Multi-Core Controller.
- 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.
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