Output call conversion routines – Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 93

Advertising
background image

Operating Functions

Chapter 5

5–56

5.7.9.4
6-Digit, Signed, Fixed Decimal BCD to Internal Floating Point
"XXXXXX – CALL 13

The input argument is the number (1–64) of the first word (6-digit BCD is
sent to the BASIC module in two processor words) of the
write-block-transfer buffer to be converted from 6-digit, signed, fixed
decimal BCD to internal format. The maximum values allowed are
"999999. The output argument is the converted value in internal floating
point format. The sign bit is bit number 16.

5.7.9.5
4-Digit BCD to Internal Floating Point XXXX – CALL 17

The input argument is the number (1–64) of the word in the
write-block-transfer buffer to be converted from 4-digit BCD to internal
format. The maximum value allowed is 0–9999. The output argument is
the converted value in internal floating point format.

Sample input conversions:

u20 PUSH 3 :REM CONVERT 3rd WORD OF PLC DATA

u30 CALL 10 :REM DO 3 DIGIT BCD TO F.P. CONVERSION

u40 POP W :REM GET CONVERTED VALUE – STORE IN VARIABLE W

u20 PUSH 9 :REM CONVERT STARTING WITH 9th WORD OF PLC DATA

u30 CALL 13 :REM DO 6 DIGIT BCD TO F.P. CONVERSION

u40 POP L(9) :REM GET CONVERTED VALUE – STORE IN ARRAY L (9)

All of the output call conversion routines require the same sequence of
commands. These are:

PUSH – the value to be converted

PUSH – the word position of the processor block-transfer-file to be
converted (1–64)

CALL – the appropriate output conversion

The data format of the converted value of each of the output conversion
routines is described in more detail in Chapter 7. Use these output call
conversion routines to load the BTR buffer before executing a CALL 7 or
CALL 2.

5.7.9
Input Call Conversion
Routines (continued)

5.7.10
Output Call Conversion
Routines

Advertising