Xylem XL-BASIC Programming Guide Manual do Utilizador

Consulte online ou descarregue Manual do Utilizador para Equipamento Xylem XL-BASIC Programming Guide. Xylem XL-BASIC Programming Guide User Manual Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 21
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 0
Chapter 23
XL-BASIC Programming Guide
XL™ SERIES XL-BASIC Programming Guide 23-1
Version Changes (available on version 2.07 of the XL series data logger)
!Changes to the ‘input’ command to not change the variable value if no input was received
!Added ‘printsdi’ command, print to the SDI-12 port without any retries.
!Added ‘p12vxon’ command, turn on the 12 volt excite, (Only available on newer
hardware).
!Added ‘p12vxoff’ command, turn off the 12 volt excite, (Only available on newer
hardware).
!Added ‘settimeout (x)’ command, set the system time out value from 15 to 600 seconds.
!Added ‘opencom2’, ‘print2’ and ‘closecom2’ commands, allows printing to com port
two.
!Added ‘logvalx’ variable, an indirect variable normally based on a log column function.
!Added ‘reset’ variable, returns the number of times the system has reset.
!Described the ‘basicx’ variable.
Version Changes (available on version 2.10 of the XL series data logger)
!Added input commands for com port 2 and 3
!Added fluchcom1, flushcom2, and flushcom3 commands.
!Updated This document.
XL-BASIC Programs:
The XL™ series data loggers have a built in BASIC interpreter for handling specialized
operations outside the normal use of the data logger. Since this BASIC interpreter is specific to
the XL™ series of data loggers it is called XL-BASIC. XL-BASIC handles many of the standard
BASIC commands, but also provides access to the I/O and other features of the XL™ series data
logger.
Basic1 to Basic5 There are five basic programs that can be called any time the system is
collecting data to log or to send to the GOES radio, etc. To execute one of the five programs,
select it from the source list just as “Stage” or “Ana1" is selected. Each XL-BASIC program has
a defined variable that will be used as a return value for the function that caused the XL-BASIC
program to execute. For example, as the system processes the data to log, it looks at the source
for each column. The first column is normally set to “Date” so the current date is placed in
column 1. Column 2 is normally time and a time stamp is placed in this column. If column 3
source was set to “Basic1", then the BASIC 1 program would execute and the value in variable
“Basic1" would be placed in the third column.
A BASIC program is written using a standard text editor on a PC and then loaded into the XL
series data logger. Each BASIC program must be 8K bytes or less in size. The size of the
Vista de página 0
1 2 3 4 5 6 ... 20 21

Resumo do Conteúdo

Página 1 - XL-BASIC Programming Guide

Chapter 23XL-BASIC Programming GuideXL™ SERIES XL-BASIC Programming Guide 23-1Version Changes (available on version 2.07 of the XL series data logger)

Página 2

23-10 XL-BASIC Programming Guide XL™ SERIESExample: goto 1000end1000print "code execution continues here"FOR / TO / NEXT This is a “For

Página 3

XL™ SERIES XL-BASIC Programming Guide 23-11--- Sensor Input / Misc I/O Functions —MEASURE(x) Measure selected input. Some inputs are normally only me

Página 4

23-12 XL-BASIC Programming Guide XL™ SERIES--- Com Port Commands —OPENCOM1 Turn on the RS232 drivers for com port 1, initialize I/O buffers making

Página 5

XL™ SERIES XL-BASIC Programming Guide 23-13In the second example the two data values are separate based on the spacesinside the quotes, and the line i

Página 6

23-14 XL-BASIC Programming Guide XL™ SERIESDIGITS(#) Set the number of digits to display to the right of the decimal point. Thedefault value is 2

Página 7

XL™ SERIES XL-BASIC Programming Guide 23-15The following table lists the values that will be returned for the differentkey presses. KEY VALUE KEY VAL

Página 8

23-16 XL-BASIC Programming Guide XL™ SERIES--- Data Card And File Commands —OPENFILE “filename” This command opens a file based on the parameter “

Página 9

XL™ SERIES XL-BASIC Programming Guide 23-17WRITESDI This command is used to send text out the SDI-12 port to smart sensors. The command is preceded w

Página 10 - XL™ SERIES

23-18 XL-BASIC Programming Guide XL™ SERIESCREATING XL-BASIC PROGRAMS:XL-BASIC programs are created using text editors like NOTEPAD that comes wit

Página 11

XL™ SERIES XL-BASIC Programming Guide 23-19PC Menu Screen: XL-Basic Options.XL-BASIC Code Options (Esc to Return)L - Load Code: From PC Card to Me

Página 12

23-2 XL-BASIC Programming Guide XL™ SERIESprogram includes all commands, comments, remarks, and spacing. If the size of the file becomestoo big t

Página 13

23-20 XL-BASIC Programming Guide XL™ SERIESvariable for each basic program. The value of the variable is represented by the XX.XX above. The abov

Página 14

XL™ SERIES XL-BASIC Programming Guide 23-21REM ASSIGN BATTERY VOLTAGE TO BASIC1 VARIABLE FOR LOGGINGBASIC1 = BATTREM CLOSE COM PORT 3CLOSECOM3ENDExamp

Página 15

XL™ SERIES XL-BASIC Programming Guide 23-3Standard Input Variables:Variable Type DescriptionStage Read / Write The last measured stage value is return

Página 16

23-4 XL-BASIC Programming Guide XL™ SERIESRead Only Variables:Variable Type DescriptionDate Read Only The date is returned in the format YYMMDD.00

Página 17

XL™ SERIES XL-BASIC Programming Guide 23-5Math Functions:Basic Math Operations +, -, *, /. Standard Math operators% Modulo divide, returns the rem

Página 18

23-6 XL-BASIC Programming Guide XL™ SERIESXL-BASIC Command Summary:PROGRAM FLOW / CONTROL COMMANDSCOMMAND DESCRIPTIONREM Add remarks to the progra

Página 19

XL™ SERIES XL-BASIC Programming Guide 23-7COM PORT COMMANDSOPENCOMx Open RS-232 Com Port x for Input and Print operations. (x = 1 to 3)CLOSECOMx Turn

Página 20

23-8 XL-BASIC Programming Guide XL™ SERIESDATA CARD AND FILE COMMANDSOPENFILE Open a data file for WRITEFILE operations.WRITEFILE Write text and d

Página 21

XL™ SERIES XL-BASIC Programming Guide 23-9XL-BASIC Language Command Descriptions:Except for functions that have parameters using parentheses, all comm

Comentários a estes Manuais

Sem comentários