File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
solution/tc_project_app/POUs Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -365,8 +365,20 @@ END_IF
365365 //Store encoder position BIAS at shutdown
366366 astAxesPersistent[iAxes].fEncoderBiasAtShutdown := afbReadPositionBias[iAxes].Value;
367367
368- //Store homing status at shutdown
368+ //Store axis status at shutdown
369+ astAxesPersistent[iAxes].bInitialized := GVL.astAxes[iAxes].stStatus.bAxisInitialized;
369370 astAxesPersistent[iAxes].bHomedAtShutdown := GVL.astAxes[iAxes].stStatus.bHomed;
371+ astAxesPersistent[iAxes].stMotionState := GVL.astAxes[iAxes].Axis.Status.MotionState;
372+ astAxesPersistent[iAxes].bError := GVL.astAxes[iAxes].Axis.Status.Error;
373+ astAxesPersistent[iAxes].nErrorID := GVL.astAxes[iAxes].Axis.Status.ErrorID;
374+ astAxesPersistent[iAxes].bErrorStop := GVL.astAxes[iAxes].Axis.Status.ErrorStop;
375+ astAxesPersistent[iAxes].bStandStill := GVL.astAxes[iAxes].Axis.Status.StandStill;
376+ astAxesPersistent[iAxes].bHasBeenStopped := GVL.astAxes[iAxes].Axis.Status.HasBeenStopped;
377+ astAxesPersistent[iAxes].bDisabled := GVL.astAxes[iAxes].Axis.Status.Disabled;
378+ astAxesPersistent[iAxes].bMoving := GVL.astAxes[iAxes].Axis.Status.Moving;
379+
380+ astAxesPersistent[iAxes].nCycles := astAxesPersistent[iAxes].nCycles + 1;
381+ astAxesPersistent[iAxes].fPositionDifference := ABS(afCurrentPosition[iAxes] - astAxesPersistent[iAxes].fPositionAtShutdown);
370382
371383 //Store value of moving at shutdown
372384 IF GVL.astAxes[iAxes].Axis.Status.Disabled OR astAxesPersistent[iAxes].fPositionDifference < fPositionDifferenceLimit THEN
You can’t perform that action at this time.
0 commit comments