From 2bdf9e786bab73bdf641a6daf7c519de581eebc8 Mon Sep 17 00:00:00 2001 From: SCooper Date: Wed, 27 Jul 2022 12:28:33 +0100 Subject: [PATCH] Read parameter added to OOP implementation. Visu parameter reads fixed to reference GVL not afbaxes. Text list support added for parameters to allow combo box selection on Visu rather than typing in number --- solution/_Config/PLC/tc_project_app.xti | 2 +- solution/tc_project_app/POUs/MAIN.TcPOU | 22 +++++++++++++++---- .../tc_project_app/tc_project_app.plcproj | 3 +++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/solution/_Config/PLC/tc_project_app.xti b/solution/_Config/PLC/tc_project_app.xti index 269f8e4..1d9983f 100644 --- a/solution/_Config/PLC/tc_project_app.xti +++ b/solution/_Config/PLC/tc_project_app.xti @@ -965,7 +965,7 @@ External Setpoint Generation: - + tc_project_app Instance {08500001-0000-0000-F000-000000000064} diff --git a/solution/tc_project_app/POUs/MAIN.TcPOU b/solution/tc_project_app/POUs/MAIN.TcPOU index 03737b6..a4d6184 100644 --- a/solution/tc_project_app/POUs/MAIN.TcPOU +++ b/solution/tc_project_app/POUs/MAIN.TcPOU @@ -22,6 +22,8 @@ VAR afbReadEncRefSys: ARRAY [1..GVL_APP.nAXIS_NUM] OF MC_ReadParameter; afbRestorePosition: ARRAY [1..GVL_APP.nAXIS_NUM] OF MC_SetPosition; fbGetDeviceIdentification: FB_GetDeviceIdentification; + + counter : BYTE; END_VAR VAR PERSISTENT @@ -30,7 +32,8 @@ END_VAR]]> +PROG(); +AXES_EndOfCycle();]]> @@ -58,6 +61,14 @@ END_FOR*) FOR GVL.iPneumaticAxis := 1 TO GVL_APP.nPNEUMATIC_AXIS_NUM DO afbPneumaticAxes[GVL.iPneumaticAxis](stPneumaticAxisStruct := GVL.astPneumaticAxes[GVL.iPneumaticAxis]); END_FOR +]]> + + + + + @@ -109,8 +120,7 @@ IF astAxes[1].stStatus.fActPosition < -5 THEN astAxes[1].stInputs.bLimitBwd := FALSE; ELSE astAxes[1].stInputs.bLimitBwd := TRUE; -END_IF -]]> +END_IF]]> @@ -241,6 +251,7 @@ END_FOR]]> + @@ -260,6 +271,10 @@ END_FOR]]> + + + + @@ -284,7 +299,6 @@ END_FOR]]> - diff --git a/solution/tc_project_app/tc_project_app.plcproj b/solution/tc_project_app/tc_project_app.plcproj index 7c4e37a..8c8c8df 100644 --- a/solution/tc_project_app/tc_project_app.plcproj +++ b/solution/tc_project_app/tc_project_app.plcproj @@ -149,6 +149,9 @@ Code Visualization Manager.TcVMO + + Code + Code Visualization Manager.TcVMO