From 10ef1a594d2cfaef8c914ff97d553ef595628af2 Mon Sep 17 00:00:00 2001 From: Paul Barron Date: Wed, 11 Dec 2019 15:02:11 +0100 Subject: [PATCH] Remove MAIN.SHUTDOWN from ordinary PLC cycle This created a problem in that MAIN.STARTUP wasn't working correctly because it takes a couple of cycles to complete and MAIN.SHUTDOWN was overriding the values stored after a power loss. Thus the restore won't work for a user cold reset. It can be catered for by adding it back into the ordinary PLC cycle but only executing if bPositionRestoreDone is set. --- solution/tc_project_app/POUs/MAIN.TcPOU | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/solution/tc_project_app/POUs/MAIN.TcPOU b/solution/tc_project_app/POUs/MAIN.TcPOU index 0485dbc..ac81a90 100644 --- a/solution/tc_project_app/POUs/MAIN.TcPOU +++ b/solution/tc_project_app/POUs/MAIN.TcPOU @@ -69,13 +69,12 @@ END_IF STARTUP(); PROG(); AXES(); -ERROR(); -SHUTDOWN();]]> +ERROR();]]> - -