From 6f3184712fcd4d065c3b129c0890651ea2a14d70 Mon Sep 17 00:00:00 2001 From: Federico Rojas Date: Wed, 2 Apr 2025 12:14:21 +0200 Subject: [PATCH 1/3] Add variables for pressure limits high and low Because the pressure limits belong to the cabinet and are application specific, move the variables to GVL_APP as constants modified: solution/tc_project_app/GVLs/GVL_APP.TcGVL --- solution/tc_project_app/GVLs/GVL_APP.TcGVL | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/solution/tc_project_app/GVLs/GVL_APP.TcGVL b/solution/tc_project_app/GVLs/GVL_APP.TcGVL index 05a6eef..0da9a07 100644 --- a/solution/tc_project_app/GVLs/GVL_APP.TcGVL +++ b/solution/tc_project_app/GVLs/GVL_APP.TcGVL @@ -10,6 +10,12 @@ END_VAR VAR_GLOBAL CONSTANT nAXIS_NUM: UINT := 0; //Specifies the total of axes in the system nPNEUMATIC_AXIS_NUM: UINT := 0; //Specifies the total number of pneumatic axes in the system + + //Pneumatic air pressure groups high and low limits + fLOW_LIMIT_AIR_PRESSURE1: REAL := 0; //User defined value in bar for low limit air pressure value for pneumatic axes group 1 + fHIGH_LIMIT_AIR_PRESSURE1: REAL := 0; //User defined value in bar for high limit air pressure value for pneumatic axes group 1 + fLOW_LIMIT_AIR_PRESSURE2: REAL := 0; //User defined value in bar for low limit air pressure value for pneumatic axes group 2 + fHIGH_LIMIT_AIR_PRESSURE2: REAL := 0; //User defined value in bar for high limit air pressure value for pneumatic axes group 2 END_VAR ]]> From b21d984ce06c8302c61dc78e809ed93a6417a0b0 Mon Sep 17 00:00:00 2001 From: Federico Rojas Date: Wed, 2 Apr 2025 12:16:59 +0200 Subject: [PATCH 2/3] Add pressure scaling method and variables to Cabinet_Configuration program Add getting the scaled values of the cabinet pressure groups as part of the Cabinet_Configuration program. To later link those values for the alarms in PILS modified: solution/_Config/PLC/tc_project_app.xti modified: solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Configuration.TcPOU modified: solution/tc_project_app/POUs/MAIN.TcPOU --- solution/_Config/PLC/tc_project_app.xti | 17 +++++++- .../Applications/Cabinet_Configuration.TcPOU | 39 +++++++++++++++---- solution/tc_project_app/POUs/MAIN.TcPOU | 2 +- 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/solution/_Config/PLC/tc_project_app.xti b/solution/_Config/PLC/tc_project_app.xti index a36cf68..5cf9615 100644 --- a/solution/_Config/PLC/tc_project_app.xti +++ b/solution/_Config/PLC/tc_project_app.xti @@ -1,9 +1,22 @@ - + - + tc_project_app Instance {08500001-0000-0000-F000-000000000064} + + PlcTask Inputs + + GVL.nAirPressureSensorGroup1 + + INT + + + GVL.nAirPressureSensorGroup2 + + INT + + 0 diff --git a/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Configuration.TcPOU b/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Configuration.TcPOU index 1a332eb..3b26480 100644 --- a/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Configuration.TcPOU +++ b/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Configuration.TcPOU @@ -4,10 +4,13 @@ - , aErrorMsg=> , @@ -17,14 +20,34 @@ END_VAR nAlarmGrpBitNumber=> ); *) -//Define pressure limits for pneumatic pressure group 1 -GVL.fHighLimitAirPressureGroup1 := 0.0; -GVL.fLowLimitAirPressureGroup1 := 0.0; - -//Define pressure limits for pneumatic pressure group 2 -GVL.fHighLimitAirPressureGroup2 := 0.0; -GVL.fLowLimitAirPressureGroup2 := 0.0; +//Scale pressure sensor group 1 and 2 +fScaledAirPressureGroup1 := mScaledPressureValue(nRawValue:=GVL.nAirPressureSensorGroup1); +fScaledAirPressureGroup2 := mScaledPressureValue(nRawValue:=GVL.nAirPressureSensorGroup2); ]]> + + + + + + \ No newline at end of file diff --git a/solution/tc_project_app/POUs/MAIN.TcPOU b/solution/tc_project_app/POUs/MAIN.TcPOU index 1e0304d..2197f09 100644 --- a/solution/tc_project_app/POUs/MAIN.TcPOU +++ b/solution/tc_project_app/POUs/MAIN.TcPOU @@ -120,7 +120,6 @@ END_IF From 337762b88ffe662a1582d675f8536cac43842490 Mon Sep 17 00:00:00 2001 From: Federico Rojas Date: Wed, 2 Apr 2025 12:21:28 +0200 Subject: [PATCH 3/3] Unpin version 4024.56 and rebuild solution with 4024.62 --- solution/solution.tsproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solution/solution.tsproj b/solution/solution.tsproj index 29d4f8f..e6a917a 100644 --- a/solution/solution.tsproj +++ b/solution/solution.tsproj @@ -1,5 +1,5 @@ - +