Call 48 – retrieve day of week numeric, Call 52 – retrieve date string, Purpose – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual
Page 129: Syntax, Example
Advertising
Publication 1746-RM001A-US-P
Clock/Calendar Functions 10-7
>20 PUSH 0 :CALL 47
>30 PRINT “TODAY IS ”,$(0)
READY
>RUN
TODAY IS FRI
READY
>
CALL 48 – Retrieve Day
of Week Numeric
Purpose
Use CALL 48 to return the current day of week on the argument stack as a number
(example:
Sunday=1, Saturday=7
). This number can be POPped into a variable.
Syntax
CALL 48
POP [day of week]
Example
>1
REM EXAMPLE PROGRAM
>10 REM DAY OF WEEK RETRIEVE - NUMERIC EXAMPLE
>20 CALL 48 : REM INVOKE UTILITY TO GET D.O.W.
>30 POP D
>40 PRINT D
>50 END
READY
>RUN
5
READY
>
CALL 52 – Retrieve Date
String
Purpose
Use CALL 52 to return the current date in a string (dd-mmm-yy). PUSH the
number of the string to receive the date. You must allocate a minimum of 9
characters for the string.
Advertising