MC_GearOut
| Element Name | Element Type | Description |
|---|---|---|
| Execute | Input | Edge detected request to execute the function block. |
| Slave | Input/Output | Select the slave axis for the gearing to disengage. This must be a UINT variable with a value of the slave axis number. |
| Done | Output | Indicates the function block completed successfully. |
| Busy | Output | Indicates the function block is currently being executed. |
| Error | Output | Indicates whether an error occurs or not. |
| ErrorID | Output | Error Identification number. |
Before executing MC_GearOut
After executing MC_GearOut
//Check that all axes are ready
IF (_AX01_RDY) AND (_AX02_RDY) THEN
All_Axes_Ready := TRUE;
ELSE
All_Axes_Ready := FALSE;
END_IF;
//Check that all axes are powered on
IF (_AX01_SV_ON) AND (_AX02_SV_ON) THEN
All_Axes_Pwr_On := TRUE;
ELSE
All_Axes_Pwr_On := FALSE;
END_IF;
//Set MasterAxis and SlaveAxis variables
Master_Axis := 2;
Slave_Axis := 1;
IF (All_Axes_Pwr_On) AND (All_Axes_Ready) THEN
//MoveVelocity command for master axis
Master_MOVEVELOCITY(Execute:=Execute_MasterMove, Axis:=Master_Axis, ContinuousUpdate:=0, Velocity:=50000.0, Acceleration:=10000.0, Deceleration:=10000.0, Jerk:=1000.0, Direction:=1, BufferMode:=0, ErrorID=>Master_MOVEVELOCITY.ErrorID);
//Example MC_GearOut fb
Slave_GEAROUT(Execute:=Execute_GearOut, Slave:=Slave_Axis, ErrorID=>Slave_GEAROUT.ErrorID);
END_IF;
LM605-3