Download Print this page

Danfoss MCO 305 Design Manual page 88

Hide thumbs Also See for MCO 305:

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 one after the other.
The priorities are described in decreasing order:
*
%
+
>>
<<
>=
<= >
<
!
88
__ 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
(multiplicative)
(additive)
(bit-by-bit shifting)
(relation)
(equality)
®
MG.33.L4.02 – VLT
is a registered Danfoss trademark
Logical operations
AND
and
OR
or
NOT
not
&
(bit-by-bit and)
|
(bit-by-bit inclusive or)
AND
(logical and)
OR
(logical or)
Value range
1 - 32
1 - 32
1 - 4
1 - 4
1 - 2

Advertisement

loading