Rockwell-automation 1746-BAS BASIC LANGUAGE User Manual Page 125

  • Download
  • Add to my manuals
  • Print
  • Page
    / 280
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 124
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.
Page view 124
1 2 ... 120 121 122 123 124 125 126 127 128 129 130 ... 279 280

Comments to this Manuals

No comments