Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 393

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
Sample program
0.00
0.00
If the result of the subtraction is a negative number (Mi<Su or Mi+1, Mi <Su+1, Su), the result is output
as a 2's complement. The Carry Flag (CY) will turn ON. To convert the 2's complement to the true
number, a program which subtracts the result from 0 is necessary, as an input condition of the Carry
Flag (CY). The Carry Flag turning ON thus indicates that the result of the subtraction is negative.
356
When CIO 0.00 is ON in the following example, D110 and CY will be
–C
subtracted from D100 as 4-digit signed binary values and the result will
D100
be output to D120.
D110
D120
When CIO 0.00 is ON in the following example, D111, D110 and CY will be
–CL
subtracted from D101 and D100 as 8-digit signed binary values, and the
D100
result will be output to D121 and D120.
D110
D120
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading

Table of Contents