Mitsubishi Electric FX2N Beginners Manual page 101

Hide thumbs Also See for FX2N:
Table of Contents

Advertisement

More Advanced Programming
The example above checks whether the contents of data registers D10 and D11 are greater
than the contents of registers D250 and D251.
More examples:
Ladder Diagram
0
Relay M12 is set to "1" when the value of counter C0 is equal to or greater than the contents of D20.
Ladder Diagram
0
Output Y003 is switched on when the contents of D10 is greater than -2,500 and timer T52 has
finished running.
Ladder Diagram
0
Relay M53 is set to "1" if either the value of counter C200 is less than 182,547 or relay M110 is
set to "1".
Compare as a logical AND operation
Ladder Diagram
0
³ Compare condition
· First comparison value
» Second comparison value
An AND comparison can be used just like a normal AND instruction (see chapter 3).
The comparison options are the same as those described above for a comparison at the begin-
ning of an operation. Here too, you can also compare 32-bit values with an AND operation:
Ladder Diagram
0
FX Beginners Manual
>= C0 D20
T52
> D10 K-2500
D< C200 K182547
M110
<= D40 D50
D= D30 D400
This "D" specifies 32-bit data
Instruction List
0 LD>=
M12
5 OUT
Instruction List
0 LD>
5 AND
Y003
6 OUT
Instruction List
0 LDD<
M53
9 OR
10 OUT
Instruction List
0 LD
1 AND<= D40
Instruction List
0 ANDD= D30
Compare Instructions
C0
D20
M12
D10
K-2500
T52
Y003
C200
K182547
M110
M53
...
D50
D400
5 – 19

Advertisement

Table of Contents
loading

Table of Contents