Block Compare: Bcmp(022) - Omron SYSMAC CV Series Operation Manual

Ladder diagrams
Hide thumbs Also See for SYSMAC CV Series:
Table of Contents

Advertisement

Comparison Instructions
Flags
Example
0000
00
(021)
CMPL
0010

5-16-3 BLOCK COMPARE: BCMP(022)

Ladder Symbol
(022)
BCMP
S
Variations
j BCMP(022)
Description
208
Content of *DM word is not BCD when set for BCD.
ER (A50003):
GR (A50005):
Cp1+1 and Cp1 is greater than Cp2+1 and Cp2.
EQ (A50006):
Cp1+1 and Cp1 equals Cp2+1 and Cp2.
LE (A50007):
Cp1+1 and Cp1 is less than Cp2+1 and Cp2.
When CIO 000000 is ON in the following example, the eight-digit content of
CIO 0011 and CIO 0010 is compared to the eight-digit content of CIO 0009 and
CIO 0008 and the result is output to the GR, EQ, and LE Flags. The results re-
corded in the GR, EQ, and LE Flags are immediately saved to CIO 000200
(Greater Than), CIO 000201 (Equals), and CIO 000202 (Less Than).
A500
TR0
05(>)
0008
A500
06(=)
A500
07(<)
Operand Data Areas
S: Source data
CB
R
CB: 1
R: Result word
When the execution condition is OFF, BCMP(022) is not executed. When the
execution condition is ON, BCMP(022) compares S to the ranges defined by a
block consisting of of CB, CB+1, CB+2, ..., CB+32. Each range is defined by two
words, the first one providing the lower limit and the second word providing the
upper limit. If S is found to be within any of these ranges (inclusive of the upper
and lower limits), the corresponding bit in R is set. The comparisons that are
made and the corresponding bit in R that is set for each true comparison are
shown below. The rest of the bits in R will be turned OFF.
CB
S
CB+1
CB+2
S
CB+3
CB+4
S
CB+5
CB+6
S
CB+7
CB+8
S
CB+9
CB+10
S
CB+12
S
CB+14
S
CB+16
S
CB+18
S
CB+20
S
CB+22
S
0002
00
0002
01
0002
02
CIO, G, A, T, C, #, DM, DR, IR
st
block word CIO, G, A, T, C, DM
CIO, G, A, T, C, DM, DR, IR
Bit 00
Bit 01
Bit 02
Bit 03
Bit 04
CB+11
Bit 05
CB+13
Bit 06
CB+15
Bit 07
CB+17
Bit 08
CB+19
Bit 09
CB+21
Bit 10
CB+23
Bit 11
Section 5-16
Address Instruction
Operands
00000
LD
000000
00001
CMPL(021)
00002
OUT
00003
AND
A50005
00004
OUT
000200
00005
LD
00006
AND
A50006
00007
OUT
000201
00008
LD
00009
AND
A50007
00010
OUT
000202
0010
0008
TR0
TR0
TR0

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cv2000Cvm1Cv500Cv1000

Table of Contents