Omron CS1G/H-CPUxxH Instructions Manual page 493

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Conversion Instructions
Description
472
Area
Index Registers
Indirect addressing
using Index Registers
BDSL(473) converts double signed binary data to double signed BCD data.
First the double signed binary data in S+1 and S is checked to verify that it is
within the valid range for the signed BCD format specified in the control word
(C). If the source data is correct, the double signed binary data in S+1 and S
is converted to double signed BCD and output to D+1 and D. If the source
data is incorrect, the Error Flag will be turned ON and the instruction will not
be executed.
Note
1. Values of –0 in the source data will be treated as 0 and won't cause an er-
ror.
2. Some Special I/O Units require signed BCD data inputs. BDSL(473) can
be used to convert double signed binary data for output to these Units.
The control word specifies the signed BCD format that will be used for the
result, as shown below.
C = 0000 (Output Data Range: –999 9999 to 999 9999 BCD)
S+1
C = 0001 (Output Data Range: –7999 9999 to 7999 9999 BCD)
S+1
C = 0002 (Output Data Range: –999 9999 to 9999 9999 BCD)
S+1
C
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Signed binary
Signed BCD
Signed binary
Signed BCD
S
S
S
Section 3-12
S
D
Signed BCD format
specified in C
7 digits BCD, 28 bits
Sign bit (0: Positive; 1: Negative)
Status of 3 bits: 0
7 digits BCD, 28 bits
3 bits of digit 8 (0 to 7)
Sign bit (0: Positive; 1: Negative)
7 digits BCD, 28 bits
0 to 9: Eighth digit BCD
F: Negative (–)

Advertisement

Table of Contents
loading

Table of Contents