diff --git a/solution/_Config/PLC/tc_project_app.xti b/solution/_Config/PLC/tc_project_app.xti index 482ce85..11de617 100644 --- a/solution/_Config/PLC/tc_project_app.xti +++ b/solution/_Config/PLC/tc_project_app.xti @@ -1,11 +1,19 @@ - + tc_project_app Instance {08500001-0000-0000-F000-000000000064} PlcTask Inputs + + Safety_Shutter.bPSSPermit1 + BOOL + + + Safety_Shutter.bPSSPermit2 + BOOL + GVL.nAirPressureSensorGroup1 @@ -17,6 +25,24 @@ INT + + PlcTask Outputs + + Safety_Shutter.bPSSPermitPower + + BOOL + + + Pneumatic_Box.bPowerLedAndLight + + BOOL + + + Pneumatic_Box.bPowerPressureSensors + + BOOL + + 0 diff --git a/solution/tc_project_app/GVLs/GVL_APP.TcGVL b/solution/tc_project_app/GVLs/GVL_APP.TcGVL index 0da9a07..ac3e9a0 100644 --- a/solution/tc_project_app/GVLs/GVL_APP.TcGVL +++ b/solution/tc_project_app/GVLs/GVL_APP.TcGVL @@ -12,10 +12,11 @@ VAR_GLOBAL CONSTANT 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 + tTIME_PRESSURE_OUT_OF_RANGE: TIME := T#10S; //User defined allowed time in seconds for the duration of air pressure value fluctuation + fLOW_LIMIT_AIR_PRESSURE1: REAL := 1; //User defined value in bar for low limit air pressure value for pneumatic axes group 1 + fHIGH_LIMIT_AIR_PRESSURE1: REAL := 6; //User defined value in bar for high limit air pressure value for pneumatic axes group 1 + fLOW_LIMIT_AIR_PRESSURE2: REAL := 1; //User defined value in bar for low limit air pressure value for pneumatic axes group 2 + fHIGH_LIMIT_AIR_PRESSURE2: REAL := 6; //User defined value in bar for high limit air pressure value for pneumatic axes group 2 END_VAR ]]> diff --git a/solution/tc_project_app/GlobalTextList.TcGTLO b/solution/tc_project_app/GlobalTextList.TcGTLO index aad6021..2a574ff 100644 --- a/solution/tc_project_app/GlobalTextList.TcGTLO +++ b/solution/tc_project_app/GlobalTextList.TcGTLO @@ -5,21 +5,6 @@ - - "947" - " LocalMode" - - - - "972" - " bLocalMode" - - - - "587" - "%1d" - - "951" "%2.2f" @@ -40,21 +25,11 @@ "%d" - - "39" - "%n" - - "821" "%s" - - "916" - "%time_t" - - "940" "%x" @@ -95,11 +70,6 @@ "bBwEnabled" - - "633" - "bCoammandAborted" - - "225" "bCommandAborted" @@ -125,11 +95,6 @@ "bError" - - "102" - "bExecute" - - "999" "bExtended" @@ -140,11 +105,6 @@ "bFwEnabled" - - "297" - "bGeared" - - "902" "bHighTempAxisDisabled" @@ -155,11 +115,6 @@ "bHomed" - - "944" - "bCommandAborted" - - "509" "bHWMaskActive" @@ -176,8 +131,8 @@ - "541" - "bInVeloit" + "835" + "bLocalMode" @@ -190,21 +145,11 @@ "bMovingExtend" - - "648" - "bMovingExtract" - - "998" "bMovingRetract" - - "511" - "bPermit" - - "963" "bPSSPermit" @@ -245,11 +190,6 @@ "disSoftLimFw" - - "986" - "ehomeDirect" - - "350" "eHomeDirect" @@ -305,11 +245,6 @@ "eHomeToRef_Fwd" - - "313" - "Elapsed time" - - "87" "Elapsed time (ms)" @@ -320,16 +255,6 @@ "ENABLE" - - "106" - "ENABLE BW" - - - - "105" - "ENABLE FW" - - "1009" "End switches simulation" @@ -345,11 +270,6 @@ "EndSwitchFwd" - - "109" - "English" - - "1496" "enSoftLimBw" @@ -385,11 +305,6 @@ "eWriteParameter" - - "768" - "eWriteParameter" - - "937" "E_PneumaticErrors" @@ -400,11 +315,6 @@ "E_PneumaticMode" - - "463" - "E_PneumaticMode Selection" - - "955" "fAcceleration" @@ -430,11 +340,6 @@ "fHomePosition" - - "157" - "fHomePositions" - - "957" "fPosition" @@ -475,11 +380,6 @@ "fWriteCoEParam" - - "299" - "gearIn" - - "717" "gearInMultiMaster" @@ -500,31 +400,11 @@ "High pressure limit (bar)" - - "123" - "HOME" - - "568" "Home" - - "169" - "homeDirect" - - - - "566" - "homeSensorNeg" - - - - "677" - "homeSensorPos" - - "784" "Interlock Bwd" @@ -550,41 +430,16 @@ "Label" - - "19" - "Limit switches simulation" - - - - "919" - "LimitBwd" - - - - "459" - "LimitFwd" - - "961" "Low pressure limit (bar)" - - "298" - "masterGear" - - "460" "Mode Selection" - - "118" - "Mode selection" - - "111" "moveAbsolute" @@ -610,31 +465,11 @@ "nIndex" - - "716" - "nTimeToExtend" - - - - "787" - "nTimeToExtend(ms)" - - "992" "nTimeToExtend(s)" - - "929" - "nTimeToRetract" - - - - "444" - "nTimeToRetract(ms)" - - "995" "nTimeToRetract(s)" @@ -645,26 +480,11 @@ "Pneumatic Axis Selection" - - "958" - "Pneumatic AxisSelection" - - - - "694" - "Pneumatics" - - "942" "reset" - - "611" - "shomeDirect" - - "227" "Single Solenoid Manual" @@ -675,21 +495,6 @@ "Single Solenoid PLC" - - "581" - "Single Solenoid PLC ON" - - - - "959" - "Sngle solenoid PLC" - - - - "466" - "Sngle solenoid PLC " - - "855" "sStatus" @@ -710,36 +515,11 @@ "stop" - - "978" - "Stop at any Limit Swtich" - - "1033" "SWLimitSwitches" - - "108" - "Test Language" - - - - "103" - "toggle" - - - - "445" - "Write" - - - - "322" - "WriteParameters" - - {a3a9f9fc-0872-4de9-8fe0-73a54ef2c389} 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 deleted file mode 100644 index 812c3c4..0000000 --- a/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Configuration.TcPOU +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - , - aErrorMsg=> , - nEcMasterFramesLost=> , - nCPULoad=> , - fCycleExecTime_ms=> , - nAlarmGrpBitNumber=> ); -*) - -//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/Application_Specific/Applications/Cabinet_Monitoring.TcPOU b/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Monitoring.TcPOU new file mode 100644 index 0000000..1af68a5 --- /dev/null +++ b/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Monitoring.TcPOU @@ -0,0 +1,23 @@ + + + + + + , + aErrorMsg=> , + nEcMasterFramesLost=> , + nCPULoad=> , + fCycleExecTime_ms=> , + nAlarmGrpBitNumber=> ); +*) +]]> + + + \ No newline at end of file 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..62e9042 --- /dev/null +++ b/solution/tc_project_app/POUs/Application_Specific/Applications/Pneumatic_Box.TcPOU @@ -0,0 +1,105 @@ + + + + + + + + + + + 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/Applications/Shutter_Operator_panel_Template.TcPOU b/solution/tc_project_app/POUs/Application_Specific/Applications/Shutter_Operator_Panel.TcPOU similarity index 71% rename from solution/tc_project_app/POUs/Application_Specific/Applications/Shutter_Operator_panel_Template.TcPOU rename to solution/tc_project_app/POUs/Application_Specific/Applications/Shutter_Operator_Panel.TcPOU index b9eaf76..d8fcf84 100644 --- a/solution/tc_project_app/POUs/Application_Specific/Applications/Shutter_Operator_panel_Template.TcPOU +++ b/solution/tc_project_app/POUs/Application_Specific/Applications/Shutter_Operator_Panel.TcPOU @@ -1,7 +1,7 @@  - - + 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..5c1eb7d 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,17 @@ 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..c878b55 --- /dev/null +++ b/solution/tc_project_app/POUs/Application_Specific/Axes/Safety_Shutter.TcPOU @@ -0,0 +1,33 @@ + + + + + + + + + \ 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..ab6434b 100644 --- a/solution/tc_project_app/POUs/MAIN.TcPOU +++ b/solution/tc_project_app/POUs/MAIN.TcPOU @@ -129,11 +129,14 @@ GVL.fbGetCurTaskIndex(); //Axes initial parameters and program Axis_Template(); +Safety_Shutter(); //Pneumatics_Template(); //Application program calls -Cabinet_Configuration(); -Application_Template(); +Cabinet_Monitoring(); +Pneumatic_Box(); +//Shutter_Operator_Panel(); +//Application_Template(); ]]> diff --git a/solution/tc_project_app/tc_mca_std_lib b/solution/tc_project_app/tc_mca_std_lib index e0866f8..b4e85b3 160000 --- a/solution/tc_project_app/tc_mca_std_lib +++ b/solution/tc_project_app/tc_mca_std_lib @@ -1 +1 @@ -Subproject commit e0866f8a66aebed3bf87e21e19e6056b9fca198d +Subproject commit b4e85b36da70f30cdecb3059c5fe98b88725e9dd diff --git a/solution/tc_project_app/tc_project_app.plcproj b/solution/tc_project_app/tc_project_app.plcproj index 39c4c6c..6581927 100644 --- a/solution/tc_project_app/tc_project_app.plcproj +++ b/solution/tc_project_app/tc_project_app.plcproj @@ -37,10 +37,13 @@ Code - + Code - + + Code + + Code @@ -49,6 +52,9 @@ Code + + Code + Code