beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 139

background image

MVI56-BAS ♦ ControlLogix Platform

BASIC CALLs Syntax

BASIC Module (DB/BAS Compatible)

User Manual

ProSoft Technology, Inc.

Page 139 of 234

December 13, 2011

CALL 42: Set Day of the Week

In the 1746-BAS and 1771-DB, the internal calendar had no intelligence. CALL

42 would actually set the calendar day of week to any day the programmer

suggested. However, the MVI56-BAS uses the DOS calendar. The DOS

calendar has enough intelligence to calculate the proper day of week from the

date. So, CALL 42 actually does nothing.

Syntax:

PUSH [A]
CALL 42

Where:
A = day of the week (1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 =

Thursday, 6 = Friday, 7 = Saturday)

Example:

Ready
>list
10 STRING 100, 30
20 REM Set time to 10:30:00
30 PUSH 10, 30, 0: CALL 40
40 REM Set date to Jan. 23, 2003
50 PUSH 23, 1, 3: CALL 41
60 REM Set Day of Week to Monday
70 PUSH 2: CALL 42
80 REM Print Day of Week
90 PUSH 1: CALL 47
100 PRINT $ ( 1)
Ready
>run
THU
Ready
>