beautypg.com

Call 11: 16-bit binary to basic floating point – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 197

background image

Chapter
Call Routines 0–68

12

12 -7

Use this routine to convert 16-bit binary from PLC processor to BASIC
floating point. See also CALL 21.

See Chapter 8 for more information.

Input and Output Arguments

This routine has one input and one output argument. The input argument is
the number (1 to 64) of the word in the write-data-transfer buffer you want
to convert from 16-bit binary to BASIC format. The output argument is
the value converted into BASIC floating point format. There are no sign
or error bits decoded.

Syntax

PUSH

number of word (1 – 64) to be converted

CALL 11

POP

converted value

Example

> 10 PUSH X

> 20 CALL 11

> 30 POP Y

Use this routine to convert 4-bit octal from the PLC processor to BASIC
floating point. See also CALL 22.

See Chapter 8 for more information.

Input and Output Arguments

The input argument is the number (1 to 64) of the word in the processor
block-transfer buffer you want to convert from 4-digit signed octal to
BASIC floating point format. This 12-bit format has a maximum value of
+7777 octal. The output argument is the value converted into BASIC
floating point format. The sign bit is bit number 16.

Syntax

PUSH

number of word ( 1– 64) to be converted

CALL 12

POP

converted value

Example

> 10 PUSH X

> 20 CALL 12

> 30 POP Y

CALL 11: 16-Bit Binary to
BASIC Floating Point

Chapter

CALL 12:
4-Digit Signed Octal to
BASIC Floating Point

Chapter