From ecc0fa93237f66647345106bc2048da15bd76ff6 Mon Sep 17 00:00:00 2001 From: Federico Rojas Date: Fri, 11 Apr 2025 15:02:24 +0200 Subject: [PATCH] Add new programs and templates for penaumtics Add a template for safety shutter, wher ethe PSS permit signals are created. Add a program for the Pneumatic_Box, where all the signals for pressure sensors and pressure calcualtions are implemented. Correct the Pneumatics_Template TaskInfo was missing a _, delete the pressurelimtis, and add the pressure group selection. Call the new programs from PROG() MAIN. --- .../Applications/Pneumatic_Box.TcPOU | 104 ++++++++++++++++++ .../Axes/Pneumatics_Template.TcPOU | 14 +-- .../Axes/Safety_Shutter.TcPOU | 31 ++++++ solution/tc_project_app/POUs/MAIN.TcPOU | 6 +- 4 files changed, 143 insertions(+), 12 deletions(-) create mode 100644 solution/tc_project_app/POUs/Application_Specific/Applications/Pneumatic_Box.TcPOU create mode 100644 solution/tc_project_app/POUs/Application_Specific/Axes/Safety_Shutter.TcPOU diff --git a/solution/tc_project_app/POUs/Application_Specific/Applications/Pneumatic_Box.TcPOU b/solution/tc_project_app/POUs/Application_Specific/Applications/Pneumatic_Box.TcPOU new file mode 100644 index 0000000..85c18c8 --- /dev/null +++ b/solution/tc_project_app/POUs/Application_Specific/Applications/Pneumatic_Box.TcPOU @@ -0,0 +1,104 @@ + + + + + + + + + + + GVL_APP.fHigh_LIMIT_AIR_PRESSURE1,PT:=GVL_APP.tTIME_PRESSURE_OUT_OF_RANGE); + +fbOutOfRangeLowTimer2(IN := fScaledAirPressureGroup2 < GVL_APP.fLOW_LIMIT_AIR_PRESSURE2,PT:=GVL_APP.tTIME_PRESSURE_OUT_OF_RANGE); +fbOutOfRangeHighTimer2(IN := fScaledAirPressureGroup2 > GVL_APP.fHigh_LIMIT_AIR_PRESSURE2,PT:=GVL_APP.tTIME_PRESSURE_OUT_OF_RANGE); + +//Check if the air pressure value is too low for longer than defined time +IF fbOutOfRangeLowTimer1.Q THEN + bAirPressureLowGrp1 := TRUE; +ELSE + bAirPressureLowGrp1 := FALSE; +END_IF + +IF fbOutOfRangeLowTimer2.Q THEN + bAirPressureLowGrp2 := TRUE; +ELSE + bAirPressureLowGrp2 := FALSE; +END_IF + + +//Check if the air pressure value is too high for longer than defined time +IF fbOutOfRangeHighTimer1.Q THEN + bAirPressureHighGrp1 := TRUE; +ELSE + bAirPressureHighGrp1 := FALSE; +END_IF + +IF fbOutOfRangeHighTimer2.Q THEN + bAirPressureHighGrp2 := TRUE; +ELSE + bAirPressureHighGrp2 := FALSE; +END_IF +]]> + + + + + + + + + + \ No newline at end of file diff --git a/solution/tc_project_app/POUs/Application_Specific/Axes/Pneumatics_Template.TcPOU b/solution/tc_project_app/POUs/Application_Specific/Axes/Pneumatics_Template.TcPOU index dfbdcec..dda5fb1 100644 --- a/solution/tc_project_app/POUs/Application_Specific/Axes/Pneumatics_Template.TcPOU +++ b/solution/tc_project_app/POUs/Application_Specific/Axes/Pneumatics_Template.TcPOU @@ -10,21 +10,15 @@ END_VAR diff --git a/solution/tc_project_app/POUs/Application_Specific/Axes/Safety_Shutter.TcPOU b/solution/tc_project_app/POUs/Application_Specific/Axes/Safety_Shutter.TcPOU new file mode 100644 index 0000000..4481776 --- /dev/null +++ b/solution/tc_project_app/POUs/Application_Specific/Axes/Safety_Shutter.TcPOU @@ -0,0 +1,31 @@ + + + + + + + + + \ 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 98821bc..e183ea3 100644 --- a/solution/tc_project_app/POUs/MAIN.TcPOU +++ b/solution/tc_project_app/POUs/MAIN.TcPOU @@ -129,11 +129,13 @@ GVL.fbGetCurTaskIndex(); //Axes initial parameters and program Axis_Template(); +Safety_Shutter(); //Pneumatics_Template(); //Application program calls -Cabinet_Configuration(); -Application_Template(); +Cabinet_Monitoring(); +Pneumatic_Box(); +//Application_Template(); ]]>