Restarting Motion with Pipe Network

An advantage of the Pipe Network is to minimize machine downtime and reduce material waste when a non-fatal error occurs. After stopping the motion with MLAxisStop command, it can be restarting by using the MLAxisReAlign function block.


  • MLAxisReAlign must be called after the MLAxisStop command, otherwise all motion commands are ignored

For each axis:

Step Example Application Code

Check Axis Status

AxisStatus := MLAxisStatus(PipeNetwork.AXI_A1_Axis);
IF AxisStatus.6 THEN
   StepCounter := 1;
END_IF;

Turn axis back on (re-enable)

IF MLAxisPower(PipeNetwork.AXI_A1_Axis, PowerUp) THEN
   StepCounter := 2;
END_IF;

Calculate position difference between the Reference and Actual Positions

DeltaPos := (MLAxisCmdPos(PipeNetwork.AXI_A1_Axis) - MLAxisReadActPos(PipeNetwork.AXI_A1_Axis));

Determine how far to move

IF DeltaPos > LREAL#0.5*DEF_A1_PosPeriod THEN
   DeltaPos := DeltaPos - DEF_A1_PosPeriod;
ELSE
   IF DeltaPos < LREAL#-0.5*DEF_A1_PosPeriod THEN
      DeltaPos := DeltaPos + DEF_A1_PosPeriod;
   END_IF;
END_IF;
MLAxisReAlign(PipeNetwork.AXI_A1_Axis, 1000.0, 1000.0, 100.0, DeltaPos);
StepCounter := 3;

Wait for move to be completed

IF MLAxisReAlgnRdy(PipeNetwork.AXI_A1_Axis) THEN
   StepCounter := 4;
END_IF;

For the machine:

Step Example Application Code

Execute multi-axis move

              MLMstRun(PipeNetwork.MASTER, 500);