Rockwell-automation 1771-DB BASIC MODULE Manual de usuario Pagina 206

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 394
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 205
Chapter
Call Routines 0–68
12
12 -16
Use CALL 25 to convert a BASIC module floating-point value between 0
and 65535 to its 16-bit binary (or unsigned integer) SLC number and store
the result in the BASIC module output buffer DH-485 common interface
file. This call is used with DH-485 calls for BASIC module to SLC data
conversion. See also CALL 15.
See Chapter 8 for more information.
The fractional part of the BASIC module floating-point value is truncated.
If the BASIC module floating-point value is less than 0, then the value
placed in the output buffer is 0. If the value is greater than +65535, then
the value placed in the output buffer is +65535. You are responsible for
checking the range of the number before conversion.
Input and Output Arguments
This routine has two input and no output arguments. The first input value
is the data you want to convert to 16-bit binary. The second input value is
the address number (100 to 139) of the word in the BASIC module output
buffer to receive the converted value.
Syntax
PUSH
value to be converted
PUSH word number (100–139) of BASIC module output buffer
CALL
25
Example
>
40 PUSH 0A5H : REM THE VALUE TO BE CONVERTED
>
50 PUSH 110 : REM WORD 110 OF BASIC MODULE OUTPUT BUFFER
>
60 CALL 25 : REM DO F.P. TO 16-BIT BINARY CONVERSION
CALL
25:
BASIC Floating-Point to SLC
16-Bit Binary
Chapter
Vista de pagina 205
1 2 ... 201 202 203 204 205 206 207 208 209 210 211 ... 393 394

Comentarios a estos manuales

Sin comentarios