From 0382dc4da6e36d38352637b862083ebda57af322 Mon Sep 17 00:00:00 2001 From: Federico Rojas Date: Wed, 21 Feb 2024 11:37:42 +0100 Subject: [PATCH 1/3] Add DUT enum E_CPUType E_CPUType contains two vlaues. One for the CX5130 and one for the c6017-0020 new file: solution/tc_project_app/DUTs/E_CPUType.TcDUT --- solution/tc_project_app/DUTs/E_CPUType.TcDUT | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 solution/tc_project_app/DUTs/E_CPUType.TcDUT diff --git a/solution/tc_project_app/DUTs/E_CPUType.TcDUT b/solution/tc_project_app/DUTs/E_CPUType.TcDUT new file mode 100644 index 0000000..7ca656f --- /dev/null +++ b/solution/tc_project_app/DUTs/E_CPUType.TcDUT @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file From 04f1e64b36e3f619a67a0e1ecf59f1b121d81fe0 Mon Sep 17 00:00:00 2001 From: Federico Rojas Date: Wed, 21 Feb 2024 11:39:24 +0100 Subject: [PATCH 2/3] Add eCPUType as a global variable for the restore position code --- solution/tc_project_app/GVLs/GVL_APP.TcGVL | 2 ++ 1 file changed, 2 insertions(+) diff --git a/solution/tc_project_app/GVLs/GVL_APP.TcGVL b/solution/tc_project_app/GVLs/GVL_APP.TcGVL index 1f59157..c09ef66 100644 --- a/solution/tc_project_app/GVLs/GVL_APP.TcGVL +++ b/solution/tc_project_app/GVLs/GVL_APP.TcGVL @@ -3,6 +3,8 @@ Date: Wed, 21 Feb 2024 11:40:23 +0100 Subject: [PATCH 3/3] Implemnet eCPUType enum in the restore position code and build solution --- solution/tc_project_app/POUs/MAIN.TcPOU | 11 +++++++++-- solution/tc_project_app/tc_project_app.plcproj | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/solution/tc_project_app/POUs/MAIN.TcPOU b/solution/tc_project_app/POUs/MAIN.TcPOU index 908d574..0eb97b8 100644 --- a/solution/tc_project_app/POUs/MAIN.TcPOU +++ b/solution/tc_project_app/POUs/MAIN.TcPOU @@ -10,7 +10,8 @@ VAR hmiAxisSelection: INT := 1; //Not possible to use local hmi variables for array indexes hmiPneumaticAxisSelection: INT := 1; //Startup, Shutdown and UPS - fbUPS: FB_S_UPS_CX51x0; + fbCX5130UPS: FB_S_UPS_CX51x0; + fbC6017UPS: FB_S_UPS_BAPI; eUpsMode: E_S_UPS_Mode := eSUPS_WrPersistData_Shutdown; eStartUp: (eColdStart, eReadAxisFeedbackType, eCheckReadDone, eExecuteRestore, eCheckRestore, eFinishRestore); bPositionRestoreDone: BOOL := FALSE; @@ -64,7 +65,13 @@ END_FOR - false + + Code + Code @@ -68,6 +71,9 @@ Code + + Code + Code