Comparison And Logic Operations - Siemens SINUMERIK 840D sl Programming Manual

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Program code
R14=(R1+R2)*R3
R15=SQRT(POT(R1)+POT(R2))
RESFRAME=FRAME1:FRAME2
FRAME3=CTRANS(...):CROT(...)
1.4

Comparison and logic operations

Function
Comparison operations can be used, for example, to formulate a jump condition. Complex
expressions can also be compared.
The comparison operations are applicable to variables of type
code value is compared with the
For types
for
The result of comparison operations is always of
Logic operators are used to link truth values.
The logical operations can only be applied to type
applied to the
For the logic (Boolean) operations, the following applies to the
types:
● 0 corresponds to: FALSE
● Not equal to 0 means: TRUE
Bit-by-bit logic operators
Logic operations can also be applied to single bits of types
automatic.
Programming
Relational operator
==
<>
>
<
>=
<=
Job Planning
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
,
and
STRING
AXIS
type operations, even in synchronous actions.
STRING
and
CHAR, INT
Comment
; Parentheses are calculated first.
; Inner parentheses are resolved first:
R15 = square root of (R1+R2)
; The concatenation operator links frames
to form a resulting frame or assigns values
to frame components.
type.
CHAR
, the following are possible: == and <>, which can be used
FRAME
BOOL
data types via internal type conversion.
REAL
Meaning
Equal to
Not equal to
Greater than
Less than
Greater than or equal to
Less than or equal to
Flexible NC programming
1.4 Comparison and logic operations
,
CHAR, INT
type.
variables. However, they can also be
BOOL
,
BOOL
CHAR, INT
and
. Type conversion is
CHAR
INT
and
. The
REAL
BOOL
and
data
REAL
71

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents