Double Signed Binary Compare: Cpsl(027) - Omron SYSMAC CVM1 Series Operation Manual

Duplex system
Hide thumbs Also See for SYSMAC CVM1 Series:
Table of Contents

Advertisement

Comparison Instructions

5-16-9 DOUBLE SIGNED BINARY COMPARE: CPSL(027)

Ladder Symbol
(
)
027
CPSL S
1
Description
Flags
Example
0000
00
A50005
(GR)
A50006
(EQ)
A50007
(LE)
204
Operand Data Areas
S
: First comparison word 1
1
S
2
S
: First comparison word 2
2
When the execution condition is OFF, CPSL(027) is not executed. When the ex-
ecution condition is ON, CPSL(027) compares constants and/or the contents of
specified sets of words as signed 32-bit binary data and changes the status of
comparison flags according to the results. The content of S
compared to that of S
After CPSL(027) execution, the A50005 (GR), A50006 (EQ), and A50007 (LE)
flags turn ON and OFF as shown in the following table.
Comparison result
S
+ 1, S
> S
1
1
S
+ 1, S
= S
1
1
S
+ 1, S
< S
1
1
The range that can be specified for comparison is 80000000 to 7FFFFFFF (i.e.,
-2,147,483,648 to 2,147,483,647 in decimal).
Content of *DM word is not BCD when set for BCD.
ER (A50003):
GR (A40213), EQ (A50006), LE (A50007):
When CIO 000000 is ON in the following example, the content of D00002 and
D00001 is compared with the content of D00006 and D00005 as signed binary
data.
• If the content of D00002 and D00001 is greater than that of D00006 and
D00005, then A50005 (GR) will turn ON, causing CIO 002000 to be turned
ON.
• If the content of D00002 and D00001 is equal to that of D00006 and D00005,
then A50006 (EQ) will turn ON, causing CIO 002001 to be turned ON.
• If the content of D00002 and D00001 is less than that of D00006 and D00005,
then A50007 (LE) will turn ON, causing CIO 002002 to be turned ON.
(027)
CPSL D00001
D00005
0020
00
0020
01
0020
02
D00002
Comparison Results
A50005 (GR)
A50006 (EQ)
A50007 (LE)
and S
+1.
2
2
A50005 (GR)
+ 1, S
ON
2
2
+ 1, S
OFF
2
2
+ 1, S
OFF
2
2
D00001
0124
23BD
Comparison
ON
OFF
OFF
Section 5-16
CIO, G, A, T, C, #, DM,
CIO, G, A, T, C, #, DM,
and S
1
A50006 (EQ)
A50007 (LE)
OFF
ON
OFF
(Refer to tables above.)
Address Instruction
00000
LD
00001
CPSL(027)
00002
AND
00003
OUT
00004
AND
00005
OUT
00006
AND
00007
OUT
D00006
D00005
805C
AF82
+1 is
1
OFF
OFF
ON
Operands
000000
D00001
D00005
A50005
002000
A50006
00201
A50007
002002

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cv seriesSysmac cvm1d series

Table of Contents