Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
25 Applied Instructions (Block Data Operation)
25.3 BKCMP=, >, <, < >, <=, >= / Block Data Compare
615
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
21
Applied Instructions
(Real Time
Clock Control)
22
Applied Instructions
(External Device)
23
Applied Instructions
(Extension
Function)
24
Applied Instructions
(Others)
25
Applied Instructions
(Block Data
Operation)
26
Applied Instructions
(Character
String Control)
27
Applied Instructions
(Data Operation 3)
28
Applied Instructions
(Data Comparison)
29
Applied Instructions
(Data Table
Operation)
30
Applied Instructions
(External Device
Communication)
Program examples
1) In the program shown below, four 16-bit binary data starting from D100 are compared with four 16-bit
binary data starting from D200 by BKCMP= instruction when X020 is set to ON, and the comparison
result is stored in four points starting from M10.
When the comparison result is "ON (1)" in all of the four points starting from M10, Y000 is set to ON.
2) In the program shown below, the constant K1000 is compared with four data starting from D10 when
X010 is set to ON, and the comparison result is stored in b4 to b7 of D0.
[Structured ladder/FBD]
X020
Y000
M8090
Block comparison signal
BKCMP=
EN ENO
d
s1
s2
n
D100
D200
K4
M10
D100
Comparison result
=
K1000
K2000
K4000
K3000
OFFY000
K1000
K2000
K4000
K5000
M10
ON
ON
ON
OFF
M11
M12
M13
(When all of M10 to M13 are ON, Y000 is set to ON.)
D101
D102
D103
D200
D201
D202
D203
[Structured ladder/FBD]
<>K1000
K2000
K1000
K2222
K1000
D10
D0 before
operation
0000010001000010
b15 b7 b4 b0
D0 after
operation
0000100101000010
D11
D12
D13
b15 b7 b4 b0
X010
BKCMP<>
EN ENO
d
s1
s2
n
K1000
D10
K4
D0.4