Danfoss MCO 305 Design Manual page 171

Programmable motion controller
Hide thumbs Also See for MCO 305:
Table of Contents

Advertisement

MCO 305 Design Guide
Comparison Operations and Logical Operations
Comparison operations
>
greater than
<
less than
>=
greater than or equal to
<=
less than or equal to
==
the same as
!=
not equal
Assignment Operation
Assignment
Value
= 0
Field[1]
= 0
Value.3
= 1
Field[1].8
= 1
Value.b1
= 72
Value.b2
= 128
Value.w2
= 15
Priority of the Operators and the Operations
Operators in the same line have the same priority, thus they are completed from left to right.
The priorities are described in decreasing order:
exp
*
%
mod
+
>>
<<
>=
<=
>
==
!=
&
U
|
AND
OR
__ How to Program __
Description
Standard assignment to a variable.
Standard assignment to an array value.
Bit 3 is set at 1, value = 4
Bit 8 is set at 1, field[1] = 128
The lowest byte of value is set at 72
Value = 72
Second byte of value is set at 128
Value = 0x00008048
Second word of value is set at the value 15.
Value = 0x000F8048
(exponential)
rnd
.
BITP
(multiplicative)
BITP = bit expression, e.g. .b or .u
(additive)
(bit-by-bit shifting)
<
(relation)
(equality)
(bit-by-bit and)
(exclusive or, binary operation)
(bit-by-bit inclusive or)
(logical and)
(logical or)
®
MG.33.L5.02 – VLT
is a registered Danfoss trademark
Logical operations
AND
and
OR
or
NOT
not
Value range
1 - 32
1 - 32
1 - 4
1 - 4
1 - 2
171

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents