dS2824
dS2824
User Manual v4.09
Boolean equations
Boolean equations are used in a number of places in the configuration screens. They are used
for relay automation, triggering emails and peer to peer events and the count, capture and re-
set for the counter/timers.
The types that can be used in boolean equations are:
1. Relays, R1 – R2
2. Digital I/O's, D1 – D4
3. Analog inputs, A1 – A2
4. Pings P1 - P4
5. Sequencer, K1 - K12
6. Schedules, S1 – S8
7. Counters, C1 – C8
8. 1Hz Time base, T1
The simplest equation is R1. This is true when R1 is active and not true when R1 is in-active. If
you enter R1 in the relay 2 automation box it will simply follow whatever R1 does.
The exclamation mark ! is used as a “not”. So !R1 is true when relay 1 is in-active.
Enter !R1 in the relay 2 automation box it will follow the opposite of R1. Relay 2 will be active
when relay 1 is inactive.
The same applies to the digital I/O's. Enter D2 in the relay 2 automation box and the relay will
follow the input.
Analog inputs and Counter values are compared with a number to obtain a true/false boolean
result. In this example we will use analogue input 1. Then we can enter A1<1000 in the relay2
automation box. This will turn on relay 2 when the input A1 falls below 1000. If A1 is con-
nected to a temperature sensor and R2 controls a heater – well, you get the idea. Analog com-
parisons use the “less than” < and “greater than” > symbols only. There is no equal or not
equal. Checking for equality on a potentially jittery analogue input is not really useful.
As well as “not” !, you can use “and” & and “or” | in your equations.
Enter D2&D3 and the result is true only when both D2 and D3 are active.
Enter D2|D3 and the result is true when either D2 or D3 is active.
What happens here:
D2|D3&D4
The answer is that boolean expressions are evaluated left to right. So D2 is ORed with D3 and
the result ANDed with D4. You can change the order of precedence by using parenthesis ().
D2|(D3&D4)
will now AND D3 with D4 and the result is Ored with D2.
Copyright
© 2016-2021,
Devantech Ltd.
All rights reserved.
42