beautypg.com

Xl™ series – Xylem XL-BASIC Programming Guide User Manual

Page 6

background image

23-6 XL-BASIC Programming Guide

XL™ SERIES

XL-BASIC Command Summary:

PROGRAM FLOW / CONTROL COMMANDS

COMMAND

DESCRIPTION

REM

Add remarks to the program for documentation.

DELAY(xxxx)

Delay or wait for xxxx milliseconds, 1 to 65000.

GOSUB xxxx

Go to a subroutine at line number ‘xxxx’.

RETURN

Return from the subroutine.

GOTO xxxx

Go to line number ‘xxxx’.

FOR / TO / NEXT

Loop commands

IF / THEN

Conditional program execution

END

End marker for all programs.

SENSOR INPUT COMMANDS

MEASURE(xxxxx)

Take a new measurement from the selected input.

VXON

Turn on the 5.0 volt excitation.

VXOFF

Turn off the 5.0 volt excitation.

P12VXON

Turn on the 12 volt excitation. (Hardware Rev N and newer only)

P12VXOFF

Turn off the 12 volt excitation. (Hardware Rev N and newer only)

SETDIG1

Set digital I/O 1 high.

SETDIG2

Set digital I/O 2 high.

CLEARDIG1

Clear digital I/O 1 to a low state.

CLEARDIG2

Clear digital I/O 2 to a low state.

CURRENTLOOP(a)

Set the 4 to 20 mA current output level to ‘a’.