Dil ID: 13
Dil Adı: romaina
Dil Kodu: ro10
Dünyanın En Büyük
Elektronik Bilgi Kütüphanesi



Programming
Chapter 3
336
Error Message
If you enter a BCD number larger than 4095, the error bit (bit 14) is set and the
result reads zero.
AF1 Binary to BCD Conversion Function
The AF1 binary to BCD conversion function converts a 12-bit binary number to
a BCD number (from 0 to 4095).
How to Enter an AF1 Binary to BCD Conversion Function
To program an AF1 binary to BCD conversion function, perform the following
steps:
1. Press [SHIFT] [EAF] or [SHIFT] [SCT] on the keyboard of your
industrial terminal. Figure 3.1 appears on the CRT.
2. Enter 14, the function number for the AF1 binary to BCD conversion
function.
This entry identifies that the function entered is to perform an AF1 binary to
BCD conversion and that the processor use the data table format shown in
Figure 3.34 when executed.
Figure 3.34
General
AF1 Binary to BCD Conversion Function Word and Digit Format
171615141312111076543210
S
Digit 1 (MSD)
(Always = 0)
Digit 3
Bit No.
Data Address
Digit 5
S
Result AddressResult
DE
E = Enable Bit (1 = Function in Progress)
S = Sign Bit (1= Negative)
D = Done Bit (1 = Function Complete)
MSD = Most Significant Digit
LSD = Least Significant Digit
11496
m
n + 1
n
Operand
Digit 4
Digit 6
(LSD)
Digit 2
(Always = 0)
12 Bit Binary Number