Basic commands & functions – Xylem System 5000 BASIC Manual User Manual
Page 26

24
GETPOWER ETHERNET, var
REM stores a 1 if On, 0 if Off for the Ethernet
REM port on the daughterboard in the var variable
SETPOWER ETHERNET, 0 REM turns the Ethernet port Off
a = 16.0
SETPOWER ETHERNET, a REM turns the Ethernet Port On
A read-only constant containing the number 2.7182818284590452.
var = EULER REM contains 2.71828
EULER
Returns e raised to the power of the given number. Identical to EULER^number.
var = EXP(0) REM stores 1, equivalent to EULER^0
var = EXP(1) REM stores 2.71828, equivalent to EULER^1
var = EULER^2
REM stores 7.38906, equivalent to EXP(2)
EXP (number)
A read-only constant containing the number 0.
var = 0
IF (var = FALSE) GOTO 50 REM jumps to line 50 of the program
FALSE
Returns the floor of the given number.
a = FLOOR(1.2) REM stores 1 in the a variable
a = FLOOR(4.7) REM stores 4 in the a variable
FLOOR
For files, writes any remaining unwritten (buffered) data to the specified file. For serial and ethernet
ports, removes any extra data on the given line. Closing a file, serial, or ethernet port causes an
automatic flush to occur.
OPEN “COM 2” AS #2
INPUT #2, a$ REM retrieves from COM2 and stores in string a$
PRINT #2 “a1”
FLUSH #2
INPUT #2, b$ REM retrieves from COM2 and stores in string b$
CLOSE #2
OPEN “SiteID.csv” FOR READING AS #1
INPUT #1, a$ REM retrieves from COM2 and stores in string a$
FLUSH #1
INPUT #1, b$ REM retrieves from COM2 and stores in string b$
CLOSE #1
FLUSH
BASIC COMMANDS & FUNCTIONS