Klicka här för att komma till innehållsförteckningen

Operators

Many of the operators is pretty obvious, such as +, -, = etc., While others like the GT, LT, etc. may need a short presentation. AND (&), BIT, OR (|) and XOR is the Boolean operators. The characters in brackets can be used instead of writing out the whole word. They are used in conventional ways to handle binary signals.

  Aritmetiska operatorer

+

-

*

/

^

Addition

Subtraction

Multiplication

Division

Used as the exponent operator.
Ex. GRAPH Expo (kPa) = ID1 + 3 (study as CH1 cubed)

  Boolean operators

AND

&

Does one-conditions between two binary values.
Ex: GRAPH mesh (sat) = ID31 AND 4 (Returns 4 if bit 2 is set to Channel 31; zero otherwise)

OR |

Or-conditions:

Ex .: GRAPH mesh (sat) = ID31 OR 4 (Returns ID31 + 4 if bit 3 was not set; otherwise ID31)

BIT Used to see if a bit is set or not.
Ex: GRAPH mesh (sat) = ID31 BIT 4 (Returns a one if bit 3 is set on channel 31; zero otherwise)
XOR

The best way to describe a so-called. half adder is a truth table. The terms for each position in a binary number:

0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0

Ex .: GRAPH add (bin) = 5 XOR 3 (Returns 6)

˜ This function "invert". A zero becomes a one and all nonzero becomes zero.
  Comparison operators
> If the condition is met retuneras 1, otherwise 0th
Ex: GRAPH "greater than" (bit) = ID1> 5 (Is 1 when ID1 is greater than 5, otherwise 0)
< If the condition is met retuneras 1, otherwise 0th
Ex: GRAPH "less than" (bit) = ID1> 100 (Is 1 when ID1 is greater than 100, otherwise 0)
= If the left side is equal to the right side returns 1, otherwise 0
>= Greater than or equal to the returns 1, otherwise 0
<= Less than or equal to the returns 1, otherwise 0
GT

"The largest of .. and .."

Ex: Greater GRAPH (° C) = ID1. GT 30

(If the ID1 is greater than 30 retuneras ID1 otherwise retuneras 30.)

LT

 

"The smallest of .. and .."

Ex: GRAPH lesser (° C) = ID1 LT 30 (If ID1 is less than 30 retuneras ID1 otherwise retuneras 30.)

 

Finally, we provide a number of special characters that can be good to have:

°

μ

²

Degrees sign

My, micro-

Powers 2, quadratic