186
Notes:
6-3. Description of High-level Instructions
• If you program the
F61 (DCMP)
instruction using
special internal relay R9010 (ON all the time), the
same trigger as the instruction need not be
programmed.
• The comparison instruction flags R900A to R900C
are updated with each execution of the comparison
instruction. If you use two or more comparison
instructions in your program, be sure to use the
flags immediately after each comparison
instruction using the output relays or the internal
relays.
The compared result of
1
is stored in the output
relays (Y0, Y1, and Y2) of program
2
.
The compared result of
3
is stored in the output
relays (Y3, Y4, and Y5) of program
4
.
• When comparing special data, such as BCD or binary without signs, flags R9009, R900A, R900B, and
R900C move as shown in the table below. In this case, construct your program as shown in the program
example below, using special internal relays R900B and R9009.
Program example:
Compares two BCD data in (DT1, DT0) and (DT3, DT2).
1
...When (DT1, DT0) < (DT3, DT2),
internal relay R0 turns ON
2
...When (DT1, DT0) = (DT3, DT2),
internal relay R1 turns ON.
3
...When (DT1, DT0) > (DT3, DT2),
internal relay R2 turns ON
X0
F61 DCMP, DT0, DT100
X0
Y0
R900A
X0
Y1
R900B
X0
Y2
R900C
X1
F61 DCMP, DT1, DT200
X1
Y3
R900A
X1
Y4
R900B
X1
Y5
R900C
1
2
"
"
"
"
"
3
4
"
"
"
"
"
Program example:
Compares DT0 with DT100 when X0
turns ON, and DT1 with DT200 when X1
turns ON
X1
F61 DCMP, DT0, DT2
X1
R0
R900B
X1
R1
R900B
X1
R2
R900B
1
2
3
R9009
R9009
R9009
R9010
F61 DCMP, DT0, DT100
R9010
Y0
R900A
R9010
Y1
R900B
R9010
Y2
R900C
R9010 can be abbreviated in this case.
(S1+1, S1) < (S2+1, S2)
(S1+1, S1) = (S2+1, S2)
(S1+1, S1) > (S2+1, S2)
↕
OFF
↕
OFF
ON
OFF
↕
OFF
↕
ON
OFF
OFF
(> flag) (= flag) (< flag) (carry flag)
R900A R900B R900C
R9009
Flag
Comparison between
(S1+1, S1) and (S2+1, S2)
“
↕
”: turns ON or OFF according to the conditions
Содержание FP1
Страница 1: ...PROGRAMMABLE CONTROLLER FP1 is a global brand name of Matsushita Electric Works Hardware ...
Страница 28: ...20 ...
Страница 98: ...90 ...
Страница 150: ...142 ...
Страница 208: ...200 ...
Страница 226: ...218 ...
Страница 280: ...272 ...