Hello,
I'm facing a "basic" problem in building a proper flow in the Logic Graphical Editor of GIRA HS, I always end-up with an infinite loop whenever having to update a variable (internal object) by some value (not a constant, coming from another internal object)
Problem is pretty simple: I'm keeping a "buffer" counter running for a while (until an event occurs), when this event occurs, I need to update the "main" counter by the value of the buffer i.e.
(background is that I'm measuring water consumption, which I receive as a total volume count, but I would like to ~allocate that count to the right function based on which specific downstream water-gate is open)
However, when I do this in GIRA-logic, I essentially end up with both an INPUT and OUTPUT referencing the same internal object (with an ADD function in-between). I can use a temporary variable as well to not have a single workflow, but it doesn't matter: I always end up with an infinite loop (when the addition occurs, the value of the input changes, which triggers another evaluation, which triggers an additional, which update the value, etc.). I've tried to use BLOCK, etc. but as it is timing-dependent, it doesn't work reliably. I also used "send by change" semantic, which I thought would help me, but it doesn't in that case.
How do you handle those situations? Am I forced into writing my own logic function element in python just for that?!?
I'm facing a "basic" problem in building a proper flow in the Logic Graphical Editor of GIRA HS, I always end-up with an infinite loop whenever having to update a variable (internal object) by some value (not a constant, coming from another internal object)
Problem is pretty simple: I'm keeping a "buffer" counter running for a while (until an event occurs), when this event occurs, I need to update the "main" counter by the value of the buffer i.e.
Code:
// buffer counter was updated in parallel, as specific events where taking place // when the specific condition is over, I need to roll-over the temporary count into the main count if ( ! specific_condition) { main_counter = main_counter + buffer_counter; buffer_counter = 0; }
However, when I do this in GIRA-logic, I essentially end up with both an INPUT and OUTPUT referencing the same internal object (with an ADD function in-between). I can use a temporary variable as well to not have a single workflow, but it doesn't matter: I always end up with an infinite loop (when the addition occurs, the value of the input changes, which triggers another evaluation, which triggers an additional, which update the value, etc.). I've tried to use BLOCK, etc. but as it is timing-dependent, it doesn't work reliably. I also used "send by change" semantic, which I thought would help me, but it doesn't in that case.
How do you handle those situations? Am I forced into writing my own logic function element in python just for that?!?