Time retrieve number – call 46, Retrieve day of week string – call 47, Retrieve day of week numeric – call 48 – Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual
Page 107

Operating Functions
Chapter 5
5–70
The time of day is available in numeric form by executing a CALL 46 and
POPing the three variables off of the argument stack on return. There are
no input arguments. The time is POPed in hour, minute and second order.
Example:
u10 REM TIME IN VARIABLES EXAMPLE : REM GET THE WALL CLOCK TIME
u20 CALL 46
u30 POP H,M,S
u40 PRINT “CURRENT TIME IS”, H,M,S 50 END
uRUN
CURRENT TIME IS 13 44 54
READY
CALL 47 returns the current day of week as a three character string. PUSH
the number of the string to receive the day of week. You must allocate a
minimum of 3 characters/string. Strings returned are SUN, MON, TUE,
WED, THUR, FRI, SAT.
Example:
u10 PUSH 0: CALL 47
u20 PRINT “TODAY IS”,$(0)
CALL 48 returns the current day of week on the argument stack as a
number (i.e. Sunday = 1, Saturday = 7). This can be POPed into a variable.
Example:
u10 REM DAY OF WEEK RETRIEVE – NUMERIC EX
u20 CALL 44: REM INVOKE UTILITY TO GET D.O.W.
u30 POP D
5.9.7
Time Retrieve Number – Call
46
5.9.8
Retrieve Day of Week
String – CALL 47
5.9.9
Retrieve Day of Week
Numeric – CALL 48