Call 42 – set day of week, Call 42 – set day of week -3, Example – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual
Page 125: Purpose, Syntax
Advertising
Publication 1746-RM001A-US-P
Clock/Calendar Functions 10-3
Example
Program the clock/calendar for the 16th day of June 1991.
>1
REM EXAMPLE PROGRAM
>5
STRING 100,20
>10
H=13 : M=35 : S=00
>20
REM HOURS = 13, MINUTES = 35, SECONDS = 00
>30
PUSH H,M,S
>40
CALL 40
>60
D=16 : MO=6 : Y=91
>70
PUSH D,MO,Y
>80
CALL 41
>90
PUSH 3
>100 CALL 42
>120 PUSH 0
>130 CALL 43
>140 PRINT $(0)
READY
>RUN
16-JUN-91 13:35:00
CALL 42 – Set Day of
Week
Purpose
Use CALL 42 to set the day of the week. Sunday is day 1. Saturday is day 7.
Syntax
PUSH [day of week]
CALL 42
Example
>1
REM EXAMPLE PROGRAM
>10 PUSH 3: CALL 42:REM DAY IS TUESDAY.
Advertising