2COND ----- .. figure:: ../media/image924.png :figwidth: 4.36458in :align: center **Purpose** Compares the results of two conditions (2COND). **Procedure** Each input channel value is compared with its corresponding set value. The type of comparison is chosen by the ‘Logical operator’. Condition 1 is evaluated with the first (upper) input channel value. Condition 2 is evaluated with the second (lower) input channel value. If condition 1 becomes true, the output value is set to true; if condition 2 becomes true, the output value becomes false. Diagram 1 presents the state diagram. Diagram 1: State diagram of the output .. figure:: ../media/image925.png :figwidth: 3.72907in :align: center **Parameters** =================== =================== ==== ===== ======= ======= Parameter input unit range default remarks =================== =================== ==== ===== ======= ======= Logical operator C1 LT (less than)/ GT (greater than)/ LE (less equal)/ GE (greater equal)/ EQ (equal)/ NE (not equal) set value C1 real reset time C1 real [s] 0 Logical operator C2 LT (less than)/ GT (greater than)/ LE (less equal)/ GE (greater equal)/ EQ (equal)/ NE (not equal) set value C2 real reset time C2 real [s] 0 Initial status TRUE/ FALSE =================== =================== ==== ===== ======= ======= **Remarks** Both conditions must hold for periods longer than their corresponding ‘reset time’ before the output will switch its original value. If both conditions do not hold for periods longer than their ‘reset time’ then the output will keep its original value and the timing periods will be restarted. If both transitions would occur within one time step, the behaviour is such that the output will be True. In other words, Condition 1 has priority over Condition 2. **Examples** .. figure:: ../media/image926.png :figwidth: 4.32292in :align: center Fig 1: Control scheme The input signals of 2COND are gathered from a prescribed Head and valve position and shown in figure 2a and 2b. ======================= ================================= |image207| |image208| Fig 2a: prescribed head Fig 2b: prescribed valve position ======================= ================================= The initial state of 2COND is set to false, because the level (condition 1) is below 5 m. The behaviour of 2COND with both reset times 0 s, is shown in figure 3a. Introducing a reset time of 6 s for both condition gives a rather different behaviour shown in figure 3b. +-----------------------------------------------------+------------------------------------------------+ | | |image211| | |image212| | | | Fig 3a: Output 2COND with both reset times 0 s | Fig 3b: Output 2COND with both reset times 6 s | +-----------------------------------------------------+------------------------------------------------+ .. include:: substitutions_control.rst