Signed Binary-To-Bcd: Bcds(276) - Omron CVM1D Operation Manual

Hide thumbs Also See for CVM1D:
Table of Contents

Advertisement

Conversion Instructions
Example 2
0000
01
(275)
BINS
#0003

5-17-17 SIGNED BINARY-TO-BCD: BCDS(276)

Ladder Symbol
(276)
BCDS C S D
Variations
↑BCDS(276)
Description
232
When CIO 000001 is ON in the following example, first the signed BCD data for-
mat and range in D00300 are checked against data control word "0003" (first
operand). If the check is okay, the signed BCD data in D00300 is converted to
binary and output to D00400.
D00300
D00400
Operand Data Areas
C: Control word
S: Source word
D: Destination word
When the execution condition is OFF, BCDS(276) is not executed. When the
execution condition is ON, BCDS(276) converts the data in a specified source
word (S) from signed binary to signed BCD, and outputs the results to a specified
destination word (C). The format of the destination word is determined by the
contents of the control word (C).
Note Special I/O Units sometimes require input of signed BCD data. BCDS(276) or
BDSL(278) can be used to easily convert signed binary data to signed BCD
data.
The output data format and range designations for the various control word con-
tents are as follows:
When C = 0000 (Output Data Range: –999 to 999 BCD)
When C = 0001 (Output Data Range: –7999 to 7999 BCD)
S: D00300
Signed BCD data
A 3 6 9
(–1369)
D: D00400
Signed binary data
F A A 7
CIO, G, A, T, C, #, DM, DR, IR
CIO, G, A, T, C, DM, DR, IR
CIO, G, A, DM, DR, IR
3 digits BCD, 12 bits
Sign bit (0: Positive; 1: Negative)
Status of 3 bits: 0
3 digits BCD, 12 bits
3 bits of digit 4 (0 to 7)
Sign bit (0: Positive; 1: Negative)
Section 5-17
Address Instruction
Operands
00000
LD
000001
00001
BINS(275)
D00300
D00400
#0003

Advertisement

Table of Contents
loading

Table of Contents