beautypg.com

Xylem System 5000 BASIC Manual User Manual

Page 25

background image

23

Basic Commands and Functions

A parameter to the DATETIME function returning the number of seconds elapsed fromJan 1, 1970

00:00:00 until today’s date at 00:00:00.

var = DATETIME(EPOCHDAY) REM stores 1893283200

EPOCHDAY

Used in conjunction with the GETPOWER command, ETHERNET requests the current state of the

Ethernet port (10/100 BaseT) and stores the value in the given variable. A 1 is stored if On, 0 if Off.

Used in conjunction with the SETPOWER command, ETHERNET specifies the Ethernet port (10/100

BaseT) to Ethernet port On, and numbers less than or equal to zero will turn the Switched +12 Volt

Off.

Used as a parameter to the OPEN command, attaches to the listening port associated with the

program. This parameter has been deprecated and replaced with the LISTENER parameter. See

LISTENER and the OPEN command below for more information.

ETHERNET

A parameter to the DATETIME function returning the number of seconds elapsed since Jan 1, 1970

00:00:00.

var = DATETIME(EPOCH) REM stores 1893300182

EPOCH

Ends the Basic program with a custom error message. Primarily intended for troubleshooting Basic

programs.

var = 12

IF (var > 10) THEN

ERROR “Number too large - this shouldn’t happen!”

ENDIF

PRINT “Already Ended”

REM never prints as program has ended

ERROR

Used in conjunction with the GETDB command, ERRORSTR requests the System 5000™’s Default

Error String as specified in the System Settings screen and stores it in the given string variable. This

value defaults to -99.99.

GETDB ERRORSTR, var$

REM stores the Default Error String in var$

ERRORSTR