diff --git a/solution/tc_project_app/POUs/MAIN.TcPOU b/solution/tc_project_app/POUs/MAIN.TcPOU index 2ea4309..2da765a 100644 --- a/solution/tc_project_app/POUs/MAIN.TcPOU +++ b/solution/tc_project_app/POUs/MAIN.TcPOU @@ -116,7 +116,7 @@ IF bRestoreExecute AND NOT bPositionRestoreDone THEN aFbRestorePosition[GVL.iAxis]( Axis := gvl.aAxes[GVL.iAxis].Axis, Execute := , - Position := axesPersistent[GVL.iAxis].iPositionAtShutdown); + Position := aAxesPersistent[GVL.iAxis].iPositionAtShutdown); END_FOR CASE eStartUp OF @@ -158,7 +158,7 @@ IF bRestoreExecute AND NOT bPositionRestoreDone THEN eExecuteRestore: // Execute position restore by setting aFbRestorePosition.execute = TRUE FOR GVL.iAxis:= 1 TO gvl_app.nAxisNum DO - IF aFbReadEncRefSys[GVL.iAxis].Valid = TRUE AND aFbReadEncRefSys[GVL.iAxis].Value = 0 AND NOT(axesPersistent[GVL.iAxis].bMovingAtShutdown) THEN + IF aFbReadEncRefSys[GVL.iAxis].Valid = TRUE AND aFbReadEncRefSys[GVL.iAxis].Value = 0 AND NOT(aAxesPersistent[GVL.iAxis].bMovingAtShutdown) THEN IF GVL.aAxes[GVL.iAxis].config.eRestorePosition = E_RestorePosition.RestoreWithoutHome THEN aFbRestorePosition[GVL.iAxis].Execute := TRUE; END_IF @@ -171,7 +171,7 @@ IF bRestoreExecute AND NOT bPositionRestoreDone THEN // Nothing actually happens if the restore is not done, the code just returns from here each cycle and the // bPositionRestoreDone will never get set to TRUE and will take up cycle time FOR GVL.iAxis:= 1 TO gvl_app.nAxisNum DO - IF aFbReadEncRefSys[GVL.iAxis].Valid = TRUE AND aFbReadEncRefSys[GVL.iAxis].Value = 0 AND NOT(axesPersistent[GVL.iAxis].bMovingAtShutdown) THEN + IF aFbReadEncRefSys[GVL.iAxis].Valid = TRUE AND aFbReadEncRefSys[GVL.iAxis].Value = 0 AND NOT(aAxesPersistent[GVL.iAxis].bMovingAtShutdown) THEN IF GVL.aAxes[GVL.iAxis].config.eRestorePosition = E_RestorePosition.RestoreWithoutHome THEN IF NOT aFbRestorePosition[GVL.iAxis].Done THEN RETURN; @@ -195,13 +195,13 @@ END_IF]]> 0 THEN - axesPersistent[GVL.iAxis].bMovingAtShutdown := TRUE; + aAxesPersistent[GVL.iAxis].bMovingAtShutdown := TRUE; ELSE - axesPersistent[GVL.iAxis].bMovingAtShutdown := FALSE; + aAxesPersistent[GVL.iAxis].bMovingAtShutdown := FALSE; END_IF - axesPersistent[GVL.iAxis].bMovingAtShutdown := axesPersistent[GVL.iAxis].bMovingAtShutdown OR gvl.aAxes[GVL.iAxis].Axis.Status.Moving; + aAxesPersistent[GVL.iAxis].bMovingAtShutdown := aAxesPersistent[GVL.iAxis].bMovingAtShutdown OR gvl.aAxes[GVL.iAxis].Axis.Status.Moving; END_FOR]]> diff --git a/solution/tc_project_app/tc_project_app.plcproj b/solution/tc_project_app/tc_project_app.plcproj index b3f98ef..2aa3825 100644 --- a/solution/tc_project_app/tc_project_app.plcproj +++ b/solution/tc_project_app/tc_project_app.plcproj @@ -87,19 +87,12 @@ Code - - Code - Code Code - - Code - Visualization Manager.TcVMO - Code