All Axis Servo OnOff with MC_PowerAll
MC_PowerAll is used to power all servo axes. When Enable is TRUE, the servos will be powered on. When Enable is FALSE, the servos will be powered off.
-
LS_Connect must be executed before this function block can be used to control all axes.
-
The following examples can be found in the XMC_MultiAxis_FBs.zip downloadable from Example Applications.
Element Name | Element Type | Description |
---|---|---|
Enable | Input | Level detected request to execute the function block. |
Status | Output | Indicates the status of power for all axes. |
Valid | Output | Indicates the validity of motion function block output. |
Error | Output | Indicates whether an error occurs or not. |
ErrorID | Output | Error Identification number. |
//Check that all axes are ready
IF (_AX01_SV_RDY) AND (_AX02_SV_RDY) AND (_AX03_SV_RDY) AND (_AX04_SV_RDY) THEN
All_Axes_Ready:= TRUE;
ELSE
All_Axes_Ready:= FALSE;
END_IF;
//check that it is good to run MC_PowerAll
IF (All_Axes_Ready) THEN
//Example of MC_PowerAll function block
INST_MC_POWERALL(Enable:=Power_On_Axes, ErrorID=>INST_MC_POWERALL.ErrorID);
END_IF;
LM600