EasyManua.ls Logo

Omron SYSMAC CV Series - Page 291

Omron SYSMAC CV Series
636 pages
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...
(413)
–CL D00200D00210 D00220
(411)
–L D00100 D00110 D00120
0000
00
0000
01
–L 0200 0120 D00100
TR0
0000
02
04 (CY)
A500
00
0021
(411)
04 (CY)
A500
1
–L #00000000 D00100 D00100
(411)
2
00
0021
“–” display
279
Programming Example 1 –L Operation
When CIO 000000 is ON in the following example, the content of D00111 and
D00110 is subtracted from the content of D00101 and D00100, and the result is
output in eight-digit binary to D00121 and D00120. CY is set if the subtraction
resulted in a borrow.
–CL Operation
When CIO 000001 is ON in the following example, the content of D00211 and
D00210 is subtracted from the content of D00201 and D00200, and the result is
output in eight-digit binary to D00221 and D00220. CY is set if the subtraction
resulted in a borrow.
Address Instruction Operands
00000 LD 000000
00001 –L(411)
D00100
D00110
D00120
00002 LD 000001
00003 –CL(413)
D00200
D00210
D00220
Program Example 2 Example (unsigned data): 20F55A10 – B8A360E3 = –97AE06D3.
In this example, the eight-digit binary value in CIO 0121 and CIO 0120 is sub-
tracted from the value in CIO 0201 and CIO 0200, and the result is output to
eight-digit binary in D00101 and D00100. If the result is negative, the instruction
at (2) will be executed, and the actual result will then be output to D00101 and
D00100.
The Carry Flag (A50004) will be turned ON, so the actual number is
–97AE06D3. Because the content of D00101 and D00100 is negative, CY is
used to turn ON a self-holding bit that turns ON a bit indicating a negative value.
Address Instruction Operands
00000 LD 000002
00001 OUT TR0
00002 –L(411)
0200
0120
D00100
00003 LD TR0
00004 AND A50004
00005 –L(411)
#00000000
D00100
D00100
00006 LD TR0
00007 AND A50004
00008 OR 002100
00009 OUT 002100
Symbol Math Instructions Section 5-20

Table of Contents

Related product manuals