beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 145

background image

MVI56-BAS ♦ ControlLogix Platform

BASIC CALLs Syntax

BASIC Module (DB/BAS Compatible)

User Manual

ProSoft Technology, Inc.

Page 145 of 234

December 13, 2011

CALL 48: Retrieve Day of Week Numeric

Use CALL 48 to return the current day of the week on the argument stack as a

number.

Syntax:

CALL 48
POP[A]

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

Thursday, 6 = Friday, 7 = Saturday)

Example:

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 Saturday
70 PUSH 2: CALL 42
80 REM Print Day of Week
90 CALL 48: POP DW
100 PRINT DW
Ready
>run
5
Ready
>