Syntax, Example, Purpose – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual
Page 121

Publication 1746-RM001A-US-P
Math and Backplane Conversion Functions 9-5
Syntax
This routine has two input arguments and no output arguments. The first input
argument is the floating-point value you want to convert. The second input
argument is the first word in the module’s output buffer. The output buffer
addresses are 100-163 for the M1 file and 200-207 for the Input Image.
PUSH [number to convert]
PUSH [output buffer to receive converted value]
CALL 88
Example
>50
PUSH F: REM Floating-point value to convert
>60
PUSH 100 : REM Words 100 and 101 of the BASIC output buffer
associated with the M1 file
>70
CALL 88 :
>80
PUSH 2 : REM Number of words to transfer from BASIC output
buffer to M1 file
>90
CALL 57 : REM Transfer data from BASIC output buffer to M1
file
>100 POP S : REM status for CALL 57
CALL 89: SLC
Floating-Point to BASIC
Floating-Point
Purpose
This CALL may only be used with a SLC™ 5/03, 5/04 or 5/05 processor. These
are the only SLC processors that support the floating-point data type. In addition,
the module must be configured for SLC 5/02 mode (Class 4), so it cannot be used
in a remote I/O chassis with a 1747-ASB. This CALL may be used in a remote
ControlNet chassis with a 1747-ACN(R)15.
Use this call to convert SLC floating-point to BASIC floating-point. See also CALL
88.
The SLC floating-point number is a 7-digit binary floating-point number (IEEE
Float 32-bit value). The range of the SLC floating-point number:
±1.1754944E
-38
to ±3.4028237E
+38
The module floating-point number is an 8-digit BCD floating-point number. The
range of the module floating-point number is ±1E
-127
to ±.99999999E
+127