Comparing 16-Bit Binary Block Data - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Comparing 16-bit binary block data

BKCMP(P)(_U)
These instructions perform a comparison operation between (n) point(s) of 16-bit binary data in the device starting from the
one specified by (s1) and (n) point(s) of 16-bit binary data in the device starting from the one specified by (s2), and store the
operation result in the device specified by (d).
Ladder diagram
(s1)
(s2)
(d)
( is to be replaced by any of the following: BKCMP=(P)(_U),
BKCMP<>(P)(_U), BKCMP>(P)(_U)< BKCMP<=(P)(_U), BKCMP<(P)(_U),
BKCMP>=(P)(_U).)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s1)
BKCMP(P)
Comparison data or the device where the
comparison data is stored
BKCMP(P)_U
(s2)
BKCMP(P)
Device where the comparison source data is
stored
BKCMP(P)_U
(d)
Head device storing comparison result
(n)
Number of data to be compared
■Applicable devices
Operand
Bit
X, Y, M, L,
U\G T, ST,
SM, F, B, SB
(s1)
(s2)
(d)
(n)
*1 T, ST, C cannot be used.
Processing details
• These instructions perform a comparison operation between (n) point(s) of 16-bit binary data in the device starting from the
one specified by (s1) and (n) point(s) of 16-bit binary data in the device starting from the one specified by (s2), and store the
comparison result in (n) point(s) of data starting from the device specified by (d).
• The relevant devices of (n) point(s) of data starting from the device specified by (d) are turned ON when the comparison
conditions are met and turned OFF when the comparison conditions are not met.
∙∙∙
b15
b0
(s1)
1234
(BIN)
(s1)+1
5678
(BIN)
(s1)+2
5000
(BIN)
(n)
(s1)+(n-2)
7777
(BIN)
(s1)+(n-1)
4321
(BIN)
• Comparison operation is performed in units of 16 bits.
(n)
Word
T, ST, C, D,
U\G
C, LC
W, SD, SW, R
*1
∙∙∙
b15
b0
(s2)
5321
(BIN)
(s2)+1
3399
(BIN)
(s2)+2
5678
(BIN)
>
(s2)+(n-2)
6543
(BIN)
(s2)+(n-1)
1200
(BIN)
Structured text
Not supported
Range
Data type
-32768 to +32767
16-bit signed binary
0 to 65535
16-bit unsigned binary
16-bit signed binary
16-bit unsigned binary
Bit
0 to 65535
16-bit unsigned binary
Double word Indirect
specification
Z
LC
LZ
Operation result
(d)
OFF
(d)+1
ON
(d)+2
OFF
(n)
(d)+(n-2)
ON
(d)+(n-1)
ON
6.1 Comparison Operation Instructions
Data type (label)
ANY16
ANY16_U
ANY16
ANY16_U
ANY_BOOL
ANY16_U
Constant
Others
K, H
E
$
(0)
(1)
(0)
(n)
(1)
(1)
6 BASIC INSTRUCTIONS
6
157

Advertisement

Table of Contents
loading

Table of Contents