
MCO 305 Design Guide
__ How to Program __
88
MG.33.L4.02 – VLT
®
is a registered Danfoss trademark
Comparison Operations and Logical Operations
Comparison operations
Logical operations
>
greater
than
AND
and
<
less than
OR
or
>=
greater than or equal to
NOT
not
<=
less than or equal to
==
the same as
!=
not equal
Assignment Operation
Assignment
Description
Value range
Value
= 0
Standard assignment to a variable.
Field[1]
= 0
Standard assignment to an array value.
Value.3
= 1
Bit 3 is set at 1, value = 4
1 - 32
Field[1].8
= 1
Bit 8 is set at 1, field[1] = 128
1 - 32
Value.b1
= 72
The lowest byte of value is set at 72
Value = 72
1 - 4
Value.b2
= 128
Second byte of value is set at 128
Value = 0x00008048
1 - 4
Value.w2
= 15
Second word of value is set at the value 15.
Value = 0x000F8048
1 - 2
Priority of the Operators and the Operations
Operators in the same line have the same priority, thus they are completed one after the other.
The priorities are described in decreasing order:
* %
(multiplicative)
&
(bit-by-bit and)
+
–
(additive)
|
(bit-by-bit inclusive or)
>> <<
(bit-by-bit shifting)
AND
(logical and)
>= <=
> < (relation)
OR
(logical
or)
!
(equality)
Содержание MCO 305
Страница 4: ......