Good afternoon Ian,
Yes you can chain If and Alarm statements.
A couple of points to cover first.
- An IF statements is just an ALARM statement by another name.
- We have no = statement. An = when comparing an analog value means it would have to exactly match to the very last decimal place. This can't happen in reality so we have < Less than and > Greater than or equal to.
IF(1CV><2,2.1)AND
IF(2CV><7,7.1)"Some text"{[3CV=1CV/2CV]}
There is another way and that is to use boolean logic, we also have logical operators available to us
These are,
AND (If A is true (1) and B is true (1) = Result is true (1))
OR (If A is True (1) or B is True (1) = Result is True (1))
XOR (If A is true (1) or B is True(1) but not both = Result is true (1)
NOT (If A is true (1) then A is not true (0) Inverse logic)
As well as comparative operators;
We also have comparision operators.
< (Less than)
<= (less than or equal to)
= (Exactly equal to)
>= (Greater than or equal to)
> (Greater than)
For example you could also use
4CV=(1CV=2)AND(2CV=7)
IF(4CV>0.5){[3CV=1CV/2CV]}
Cheers,
Roger
Good afternoon Ian,
Yes you can chain If and Alarm statements.
A couple of points to cover first.
1. An IF statements is just an ALARM statement by another name.
2. We have no = statement. An = when comparing an analog value means it would have to exactly match to the very last decimal place. This can't happen in reality so we have < Less than and > Greater than or equal to.
````
IF(1CV><2,2.1)AND
IF(2CV><7,7.1)"Some text"{[3CV=1CV/2CV]}
````
There is another way and that is to use boolean logic, we also have logical operators available to us
These are,
AND (If A is true (1) and B is true (1) = Result is true (1))
OR (If A is True (1) or B is True (1) = Result is True (1))
XOR (If A is true (1) or B is True(1) but not both = Result is true (1)
NOT (If A is true (1) then A is not true (0) Inverse logic)
As well as comparative operators;
We also have comparision operators.
````
< (Less than)
<= (less than or equal to)
= (Exactly equal to)
>= (Greater than or equal to)
> (Greater than)
````
For example you could also use
````
4CV=(1CV=2)AND(2CV=7)
IF(4CV>0.5){[3CV=1CV/2CV]}
````
Cheers,
Roger