From 014cc8d807a1794acedbdb051ec95fceebc2f97c Mon Sep 17 00:00:00 2001 From: Federico Rojas Date: Tue, 17 Mar 2020 16:18:38 +0100 Subject: [PATCH] Chenge variable and references of axesPersistent to aAxesPersistent --- solution/tc_project_app/POUs/MAIN.TcPOU | 14 +++++++------- solution/tc_project_app/tc_project_app.plcproj | 7 ------- 2 files changed, 7 insertions(+), 14 deletions(-) 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