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

  • 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 232
Chapter
Call Routines 0–68
12
12 -43
Use CALL 47 to retrieve the current day of week as a three character
string.
Input and Output Arguments
This routine has one input argument and no output arguments. The input
argument is the number of the string to receive the day of week. You must
use the STRING statement (see page 11 -37) to allocate a minimum of 3
characters/string. Strings returned are SUN, MON, TUE, WED, THU,
FRI, SAT.
Syntax
PUSH number of string to receive the day of the week
CALL
47
Example
>
10 STRING 100,3
>
20 PUSH 0 : CALL 47
>
30 PRINT “Today is ”,$(0)
>
RUN
Today is THU
Use CALL 48 to retrieve the current day of week on the argument stack as
a number.
Input and Output Arguments
This routine has no input arguments and one output argument. The output
argument is the day of the week as a number:
G 1 = Sunday G 5 = Thursday
G 2 = Monday G 6 = Friday
G 3 = Tuesday G 7 = Saturday
G 4 = Wednesday
Syntax
CALL
48
POP
day of the week (1–7)
Example
>10
REM DAY OF WEEK RETRIEVE - NUMERIC EX
>
20 CALL 48: REM INVOKE UTILITY TO GET D.O.W.
>
30 POP D
CALL
47: Retrieve Day of
W
eek String
CALL 48: Retrieve Day of
W
eek Numeric
Vista de pagina 232
1 2 ... 228 229 230 231 232 233 234 235 236 237 238 ... 393 394

Comentarios a estos manuales

Sin comentarios