From be3f27f657af642fefb1bb59055cda935b6ee1d8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 12:40:01 +0000 Subject: [PATCH 1/2] Create draft PR for #39 From 5584c3c170eb741cca879250d7af656107c6c015 Mon Sep 17 00:00:00 2001 From: peterbarancek <62284244+peterbarancek@users.noreply.github.com> Date: Tue, 27 Jan 2026 09:09:12 +0100 Subject: [PATCH 2/2] +Suspend methods into TcoDo --- .../XAE/TcoElements/Digital/TcoDo/TcoDo.TcPOU | 92 ++++++++++++++++--- 1 file changed, 80 insertions(+), 12 deletions(-) diff --git a/src/TcoElements/src/XAE/XAE/TcoElements/Digital/TcoDo/TcoDo.TcPOU b/src/TcoElements/src/XAE/XAE/TcoElements/Digital/TcoDo/TcoDo.TcPOU index 11dfa594..51642d80 100644 --- a/src/TcoElements/src/XAE/XAE/TcoElements/Digital/TcoDo/TcoDo.TcPOU +++ b/src/TcoElements/src/XAE/XAE/TcoElements/Digital/TcoDo/TcoDo.TcPOU @@ -1,6 +1,6 @@  - + @@ -29,6 +29,7 @@ VAR ~*) _signal : BOOL; + _sb : TcoCore.StringBuilder; END_VAR VAR @@ -56,7 +57,7 @@ IF(_resetTask.Execute())THEN _resetTask.DoneWhen(Reset()); END_IF]]> - + - + @@ -80,7 +81,7 @@ END_VAR ~*) {attribute 'monitoring' := 'variable'} PROPERTY IsFalse : BOOL]]> - + @@ -90,7 +91,7 @@ IF(NOT IsFalse) THEN Messenger.Info('<#Expecting `negative` signal#>'); END_IF;] - + @@ -101,7 +102,7 @@ IF(NOT IsFalse) THEN Messenger.Info('<#Expecting `negative` signal#>'); END_IF;] ~*) {attribute 'monitoring' := 'variable'} PROPERTY IsTrue : BOOL]]> - + @@ -112,7 +113,7 @@ IF(NOT IsTrue) THEN Messenger.Info('<#Expecting `positive` signal#>'); END_IF; - + @@ -128,7 +129,7 @@ _signal := FALSE; Reset := TRUE;]]> - + @@ -144,7 +145,7 @@ METHOD Restore : ITcoRestorable - + @@ -159,7 +160,7 @@ METHOD PROTECTED ServiceMode - + @@ -176,9 +177,9 @@ _signal := TRUE; Set := TRUE;]]> - + - + @@ -187,5 +188,72 @@ END_VAR + + + + Suspend the turning to next position when the condition is 'true'. Task is still bussy + + + + The call of this method will be effective only when called AFTER the initialization of the instance of given TcoCarousel. + + + +~*) +METHOD Suspend : BOOL +VAR_IN_OUT + (*~ + + + Condition to suspend the output. + + + ~*) + inoDisableCondition : BOOL; +END_VAR +VAR_INPUT + (*~ + + + Condition to suspend the movement of the carousel can be inverted by this parameter. + + + ~*) + Invert:BOOL; +END_VAR +VAR + _signalInfo : TcoSignalInfo; +END_VAR]]> + + : ').Append(_signalInfo.SymbolPath).ToString()); + _signal := FALSE; + IF(__ISVALIDREF(THIS^.inoSignal)) THEN THIS^.inoSignal := FALSE; END_IF; +ELSIF(_setTask.Busy OR _signal ) AND inoDisableCondition AND Invert THEN + _signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition)); + Messenger.Warning(_sb.Clear().Append('<#Output is suspended due to NOT #> : ').Append(_signalInfo.SymbolPath).ToString()); + _signal := FALSE; + IF(__ISVALIDREF(THIS^.inoSignal)) THEN THIS^.inoSignal := FALSE; END_IF; +END_IF]]> + + + + + + : ' , inMessage)); + _signal := FALSE; + IF(__ISVALIDREF(THIS^.inoSignal)) THEN THIS^.inoSignal := FALSE; END_IF; +END_IF;]]> + + \ No newline at end of file