EasyManua.ls Logo

Omron SYSMAC CV Series - BCD Calculation Instructions

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...
(278)
BDSL #0003 D00100 D00200
0000
00
249
First the signed BCD data format and range in words S+1 and S are checked
against the data control word (C). If the check is okay, the signed BCD data in
words S+1 and S is converted to binary and output to the designated words D+1
and D. If the check is not okay, the Error Flag (A50003) will turn ON and the
instruction will not be executed.
In signed BCD data, –0 is treated as +0.
Refer to page 115 for general precautions on operand data areas.
Flags ER (A50003): Data to be converted is not within range for data format.
Content of a*DM word is not BCD when set for BCD.
EQ (A50006) Content of the converted data is all zeroes.
N (A50008) Data to be converted is a negative number.
Example When CIO 000000 is ON in the following example, first the data format and
range in D00101 and D00100 are checked against data control word “0003”
(first operand). If the check is okay, the double signed binary data in D00101 and
D00100 is converted to BCD and output to D00201 and D00200.
Address Instruction Operands
00000 LD 000000
00001 BDSL(278)
#0003
D00100
D00200
Double signed binary data
S+1: D00101
F F 8 B
Double signed BCD data
(-7654321)
D+1: D00201
F 7 6 5
S: D00100
3 4 4 F
D: D00200
4 3 2 1
5-18 BCD Calculation Instructions
The BCD Calculation Instructions perform arithmetic operations on BCD data.
These instructions are supported only by version-1 or later CPUs.
STC(078) and CLC(079), which set and clear the carry flag, are included in this
group because most of the BCD operations make use of the carry flag (CY) in
their results. Binary calculations and shift operations also use CY.
The addition and subtraction instructions include CY in the calculation as well as
in the result. Be sure to clear CY if its previous status is not required in the cal-
culation, and to use the result placed in CY, if required, before it is changed by
execution of any other instruction.
Note BCD calculation instructions are also supported by version-2 CVM1 CPUs as
symbol math instructions. Refer to
5-20 Symbol Math Instructions
for details.
Precautions
(V1/V2 CPUs)
BCD Calculation Instructions Section 5-18

Table of Contents

Related product manuals