EasyManua.ls Logo

Panasonic FP-E - Page 394

Panasonic FP-E
1334 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
High−level Instructions
3 − 130
Precautions when comparing BCD or external data
When comparing special data, such as BCD or unsigned binary (0 to FFFF), construct your program as
shown in the program example below, using special internal relays R900B and R9009.
Example: Compares BCD data in DT0 and DT1.
R1
R2
R3
R0
R0
R0
R0
F60 CMP, DT 0, DT 1
R9009
R900B
R9009R900B
1
....When DT0 < DT1, internal relay R1
turns on
2
....When DT0 = DT1, internal relay R2
turns on
3
....When DT0 > DT1, internal relay R3
turns on
Flag operation when comparing BCD data or unsigned 16−bit data (0 to FFFF)
Comparison
between
Flag
Comparison between
S1 and S2
R900A
(> flag)
R900B
(= flag)
R900C
(< flag)
R9009
(carry flag)
S1 < S2
off on
S1 = S2
off on off
off
S1 > S2
off
off
“ ”: turns on or off according to the conditions
For example, when S1 = H8000 and S2 = H1000, R900A will turn off and R900C will turn on. For this reason,
the correct comparison result will not be obtained in a program which uses R900A and R900C.
S1
1000000000 0 0 00 00
BCD
80 00
S2
0000000010 0 0 00 00
BCD
10 00
Flag conditions
・Error flag (R9007): Turns on and stays on when the area specified using the index modifier
exceeds the limit.
・Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com