C40K-CDR-A Omron, C40K-CDR-A Datasheet - Page 133
![no-image](/images/manufacturer_photos/0/4/494/omron_sml.jpg)
C40K-CDR-A
Manufacturer Part Number
C40K-CDR-A
Description
PROGRAMMABLE CONTROLLER CPU
Manufacturer
Omron
Datasheet
1.C28P-EDR-A.pdf
(225 pages)
Specifications of C40K-CDR-A
Leaded Process Compatible
No
Peak Reflow Compatible (260 C)
No
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
- Current page: 133 of 225
- Download datasheet (2Mb)
BCD Calculations
5-16-2
122
Description
Flags
Example
BCD SUBTRACT – SUB(31)
!
Caution
case DM 05 and DM 04 are used to represent the intermediate 4 digits and
the 4 right digits respectively. DM 06 represents the leftmost digit, the 9th dig-
it.
If a carry is generated, SR 1904 (CY) is turned ON and the constant 0001 is
transferred to DM 06. If a carry is not generated SR 1904 remains OFF and
the constant 0000 is transferred to DM 06.
When the execution condition is OFF, SUB(31) is not executed and the next
instruction is moved to. When the execution condition is ON, SUB(31) sub-
tracts the contents of Su and CY from Mi and places the result in R. If the
result is negative, CY is set and the 10’s complement of the actual result is
placed in R. To convert the 10’s complement to the true result, subtract the
content of R from zero (see example below). This instruction will be executed
every cycle as long as the execution condition remains ON. If the instruction
is to be executed only once then it must be used in conjunction with
DIFU(13) or DIFD(14).
ER:
CY:
EQ:
Be sure to clear the carry flag with CLC(41) before executing SUB(31) if its previ-
ous status is not required, and check the status of CY after doing a subtraction
with SUB(31). If CY is ON as a result of executing SUB(31) (i.e., if the result is
negative), the result is output as the 10’s complement of the true answer. To con-
vert the output result to the true value, subtract the value in R from 0.
When 0002 is ON, the following diagram clears CY, subtracts the contents of
DM 01 and CY from the content of IR 10 and places the result in HR 2.
If CY is set by executing SUB(31), the result in HR 2 is subtracted from zero
(note that CLC(41) is again required to obtain an accurate result), the result
is placed back in HR 2, and HR 300 is turned ON to indicate a negative re-
sult.
Ladder Symbol
Mi and/or Su is not BCD.
ON when the result is negative, i.e., when Mi is less than Su plus CY.
ON when the result is 0.
SUB(31)
Su
Mi
R
Mi – Su – CY
CY
Su : Subtrahend word (BCD)
Mi : Minuend word (BCD)
R
Operand Data Areas
IR, SR, DM, HR, TC, #
IR, SR, DM, HR, TC, #
R : Result word
IR, DM, HR
Section 5-16
Related parts for C40K-CDR-A
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![G6S-2G](/images/no-image3.png)
Part Number:
Description:
G6S-2GLow Signal Relay
Manufacturer:
Omron Corporation
Datasheet:
![G3NE-220T](/images/no-image3.png)
Part Number:
Description:
Compact, Low-cost, SSR Switching 5 to 20 A
Manufacturer:
Omron Corporation
Datasheet:
![G6K-2G-Y](/images/no-image3.png)
Part Number:
Description:
Manufacturer:
Omron Corporation
Datasheet:
![G4A-1A-E](/images/no-image3.png)
Part Number:
Description:
Manufacturer:
Omron Corporation
Datasheet:
![G5NB-1A-E](/images/no-image3.png)
Part Number:
Description:
Manufacturer:
Omron Corporation
Datasheet:
![G6B-2114P-US](/images/no-image3.png)
Part Number:
Description:
Manufacturer:
Omron Corporation
Datasheet:
![G6D-1A-ASI](/images/no-image3.png)
Part Number:
Description:
Manufacturer:
Omron Corporation
Datasheet:
![G8P-1A4P](/images/no-image3.png)
Part Number:
Description:
Manufacturer:
Omron Corporation
Datasheet: