Delta AH500 Programming Manual page 246

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

AH 5 00 Pr ogr am m ing Ma n ua l
Example 2:
Users can use the applied instructions to perform the following calculation.
The binary integer in D10 is converted into the single-precision floating-point number,
and the conversion result is stored in (D101, D100).
The binary-coded decimal value in X0.0~X0.15 is converted into the binary value, and
the conversion result is stored in D200.
The binary integer in D200 is converted into the single-precision floating-point number,
and the conversion result is stored in (D203, D202).
The constant 615 is divided by the constant 10, and the quotient which is the
single-precision floating-point number is stored in (D301, D300).
The single-precision floating-point number in (D101, D100) is divided by the
single-precision floating-point number in (D203, D202), and the quotient which is the
single-precision floating-point number is stored in (D401, D400).
The single-precision floating-point number in (D401, D400) is multiplied by the
single-precision floating-point number in (D301, D300), and the product which is the
single-precision floating-point number is stored in (D21, D20).
The single-precision floating-point number in (D21, D20) is converted into the decimal
floating-point number, and the conversion result is stored in (D31, D30).
The single-precision floating-point number in (D21, D20) is converted into the binary
integer, and the conversion result is stored in (D41, D40).
(D1 0 )
(X0.0 ~X0 .15 )
fo ur-digit
16-b it binary
binary -c oded
numbe r
dec imal nu mber
2
1
(D1 0 1,D 1 00 )
(D2 0 0) BIN
Single- pr ecisi on
3
floati ng- point number
(D2 0 3,D 2 02 )
Single- pr ecisi on
floati ng- point number
6 - 7 8
K6 1.5
6
4
5
(D3 0 1,D 3 00 )
Single- pr ecisi on
floati ng- point number
(D4 0 1,D 4 00 )
Single- pr ecisi on
floati ng- point number
Single- pr ecisi on
(D2 1 ,D2 0 )
floati ng- point number
7
(D3 1 ,D3 0 )
D eci mal f lo ati ng -po in t nu mb er
8
(D4 1 ,D4 0 )
3 2-b it in te ge r

Advertisement

Table of Contents
loading

Table of Contents