From eca54b725e0d1c5f78c5360032189776dc1c8411 Mon Sep 17 00:00:00 2001 From: peterbarancek <62284244+peterbarancek@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:57:13 +0100 Subject: [PATCH] * provide blocking information into service view, fixed if suspend method is called more than one --- .../POUs/Cylinders/TcoCylinder.TcPOU | 37 +++++++++++++++--- .../POUs/Cylinders/TcoDoubleCylinder.TcPOU | 39 ++++++++++++++----- 2 files changed, 61 insertions(+), 15 deletions(-) diff --git a/src/TcoPneumatics/src/XaeTcoPneumatics/TcoPneumatics/POUs/Cylinders/TcoCylinder.TcPOU b/src/TcoPneumatics/src/XaeTcoPneumatics/TcoPneumatics/POUs/Cylinders/TcoCylinder.TcPOU index 99e79e7e..bd4573f7 100644 --- a/src/TcoPneumatics/src/XaeTcoPneumatics/TcoPneumatics/POUs/Cylinders/TcoCylinder.TcPOU +++ b/src/TcoPneumatics/src/XaeTcoPneumatics/TcoPneumatics/POUs/Cylinders/TcoCylinder.TcPOU @@ -15,6 +15,10 @@ VAR increment: INT; _suspendedHome:BOOL; _suspendedWork:BOOL; + {attribute 'hide'} + _suspendedHomeCounter:INT; + {attribute 'hide'} + _suspendedWorkCounter:INT; END_VAR VAR _config : TcoCylinderConfig; @@ -23,6 +27,8 @@ VAR END_VAR]]> '); END_IF; @@ -309,7 +315,10 @@ VAR _signalInfo : TcoSignalInfo; END_VAR]]> - 0; IF (_toHomePos OR _moveHomeDefault.Busy) AND inoDisableCondition THEN _signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition)); @@ -328,7 +337,10 @@ VAR_INPUT END_VAR ]]> - 0; IF (_toHomePos OR _moveHomeDefault.Busy) AND inDisableCondition THEN Messenger.Warning(CONCAT('<#Movement suspended due to#> : ' , inMessage)); @@ -366,7 +378,10 @@ VAR _signalInfo : TcoSignalInfo; END_VAR]]> - 0; IF (_toHomePos OR _moveHomeDefault.Busy) AND not inoDisableCondition THEN _signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition)); @@ -405,7 +420,11 @@ VAR _signalInfo : TcoSignalInfo; END_VAR]]> - 0; + IF (_toWorkPos OR _moveWorkDefault.Busy) AND inoDisableCondition THEN _signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition)); Messenger.Warning(CONCAT('<#Movement suspended due to#> : ' , _signalInfo.SymbolPath)); @@ -423,7 +442,10 @@ VAR_INPUT END_VAR ]]> - 0; IF (_toWorkPos OR _moveWorkDefault.Busy) AND inDisableCondition THEN Messenger.Warning(CONCAT('<#Movement suspended due to#> : ', inMessage)); @@ -463,7 +485,10 @@ VAR _signalInfo : TcoSignalInfo; END_VAR]]> - 0; IF (_toWorkPos OR _moveWorkDefault.Busy) AND not inoDisableCondition THEN _signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition)); diff --git a/src/TcoPneumatics/src/XaeTcoPneumatics/TcoPneumatics/POUs/Cylinders/TcoDoubleCylinder.TcPOU b/src/TcoPneumatics/src/XaeTcoPneumatics/TcoPneumatics/POUs/Cylinders/TcoDoubleCylinder.TcPOU index 2c431a03..82e6e819 100644 --- a/src/TcoPneumatics/src/XaeTcoPneumatics/TcoPneumatics/POUs/Cylinders/TcoDoubleCylinder.TcPOU +++ b/src/TcoPneumatics/src/XaeTcoPneumatics/TcoPneumatics/POUs/Cylinders/TcoDoubleCylinder.TcPOU @@ -15,7 +15,10 @@ VAR increment : INT; _suspendedHome : BOOL; _suspendedWork : BOOL; - + {attribute 'hide'} + _suspendedHomeCounter:INT; + {attribute 'hide'} + _suspendedWorkCounter:INT; END_VAR VAR _config : TcoCylinderConfig; @@ -24,7 +27,8 @@ VAR END_VAR]]> '); END_IF; @@ -308,7 +312,10 @@ VAR _signalInfo : TcoSignalInfo; END_VAR]]> - 0; IF (_toHomePos OR _moveHomeDefault.Busy) AND inoDisableCondition THEN _signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition)); @@ -328,8 +335,10 @@ VAR_INPUT END_VAR ]]> - 0; IF (_toHomePos OR _moveHomeDefault.Busy) AND inDisableCondition THEN Messenger.Warning(CONCAT('<#Movement suspended due to#> : ', inMessage)); _toHomePos := FALSE; @@ -369,7 +378,10 @@ VAR _signalInfo : TcoSignalInfo; END_VAR]]> - 0; IF (_toHomePos OR _moveHomeDefault.Busy) AND NOT inoDisableCondition THEN _signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition)); @@ -411,7 +423,10 @@ VAR _signalInfo : TcoSignalInfo; END_VAR]]> - 0; IF (_toWorkPos OR _moveWorkDefault.Busy) AND inoDisableCondition THEN _signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition)); @@ -436,7 +451,10 @@ VAR inoDisableCondition: BOOL; END_VAR]]> - 0; IF (_toWorkPos OR _moveWorkDefault.Busy) AND inDisableCondition THEN Messenger.Warning(CONCAT('<#Movement suspended due to#> : ', inMessage)); @@ -477,7 +495,10 @@ VAR _signalInfo : TcoSignalInfo; END_VAR]]> - 0; IF (_toWorkPos OR _moveWorkDefault.Busy) AND NOT inoDisableCondition THEN _signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition));