beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 142

background image

BASIC CALLs Syntax

MVI56-BAS ♦ ControlLogix Platform

User Manual

BASIC Module (DB/BAS Compatible)

Page 142 of 234

ProSoft Technology, Inc.

December 13, 2011

CALL 45: Retrieve Date String

Use CALL 45 to return the current time in string format (HH:MM:SS). A STRING

command must be used prior to CALL 45 in order to allocate memory for the

string.
Refer to the String Functions section.

Syntax:

PUSH [A]
CALL 45

Where:
A = the string number where the time is stored .

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 Aug. 31, 1954
50 PUSH 31, 8, 54: CALL 41
60 REM Print Time and Date
70 PUSH 1: CALL 45
80 PRINT $ ( 1)
90 CALL 44: POP D, M, Y
100 PRINT D, M, Y
Ready
>run
10:30:00
31 8 54
Ready

>