beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 143

background image

MVI56-BAS ♦ ControlLogix Platform

BASIC CALLs Syntax

BASIC Module (DB/BAS Compatible)

User Manual

ProSoft Technology, Inc.

Page 143 of 234

December 13, 2011

CALL 46: Retrieve Time Numeric

Use CALL 46 to return the time of the day in numeric form.

Syntax:

CALL 46
POP[A]
POP[B]
POP[C]

Where:
A = hour
B = minute
C = second

Example:

Ready
>list
20 REM Set time to 10:30:00
30 PUSH 10, 30, 0: CALL 40
40 REM Set date to Aug. 31, 1954
50 PUSH 31, 8, 54: CALL 41
60 REM Print Time and Date
70 CALL 46: POP HR, MIN, SEC
80 PRINT HR, MIN, SEC
90 CALL 44: POP D, M, Y
100 PRINT D, M, Y
Ready
>run
10 30 0
31 8 54
Ready
>