EasyManua.ls Logo

Tormach PCNC 440 - Page 146

Tormach PCNC 440
183 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 7
146
UM10372_PCNC440_Manual_0221A
PROgRAMMiNg
There are four basic mathemacal operaons: addion (+), subtracon (-), mulplicaon (*), and
division (/). In addion, the modulus operaon (MOD) nds the remainder aer division of one
number by another number. The power operaon (**) of raising the number on the le of the
operaon to the power on the right. There are three logical operaons: non-exclusive or (OR),
exclusive or (XOR), and logical and (AND).
The relaonal operators are equality (EQ), inequality (NE), strictly greater than (GT), greater than or
equal to (GE), strictly less than (LT), and less than or equal to (LE).
Binary operators are divided into several groups according to their precedence.
Binary Operator Precedence
** 1 (highest)
* / MOD 2
+ - 3
EQ NE GT GE LT LE 4
AND OR XOR 5 (lowest)
If operaons in dierent precedence groups are strung together, operaons with a higher precedence
are performed before operaons with a lower precedence. If an expression contains more than one
operaon with the same precedence, the operaon on the le is performed rst.
Example:
[2.0 / 3 * 1.5 - 5.5 / 11.0]
is equivalent to
[[[2.0 / 3] * 1.5] - [5.5 / 11.0]]
which is equivalent to
[1.0 - 0.5]
which is
0.5
The logical operaons and modulus are to be performed on any real numbers, not just on integers.
The number zero is equivalent to logical false, and any non-zero number is equivalent to logical true.

Table of Contents

Other manuals for Tormach PCNC 440