Xylem STORM 3 Basic Programming manual Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Ausrüstung Xylem STORM 3 Basic Programming manual herunter. Xylem STORM 3 Basic Programming manual User Manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken

Inhaltsverzeichnis

Seite 1 - Storm 3

Storm 3 BASIC PROGRAMMING MANUALV1.0D28 0214

Seite 2 - CONTENTS

8COMMANDS AND FUNCTIONS02 /

Seite 3 - Contents

9Commands and FunctionsThe Storm’s implementation of Basic uses both commands and functions to perform actions and return values, though each is synta

Seite 4 - PROGRAMMING

COMMANDS AND FUNCTIONS10Single-dimensional array: ARRAY myArray(5) FOR i = 1 TO 5 myArray(i) = i * 2 REM Duplicate the number’s value inside the

Seite 5 - Basic Features

11Used with the SWITCH statement to list potential routes. a$ = “Hi” SWITCH a$ CASE “Hello”: response$ = “And Hello to you”

Seite 6 - BASIC PROGRAMMING

12COMMANDS AND FUNCTIONSReturns the number’s ASCII character representation. ASC( ), converting a character to its ASCII numerical value, is the oppos

Seite 7 - Variables, Strings and Arrays

13Commands and FunctionsReturns the cosine value of the given number. var = COS(0) REM sets var to 1 var = COS(PI) REM sets var to -1COS (number)

Seite 8

14COMMANDS AND FUNCTIONS CASE 15: path = 2 BREAK CASE 30: path = 3 BREAK CASE 45: path = 4 BREAK DEFAULT: path

Seite 9 - String Processing

15Commands and FunctionsOptionally used as part of an IF statement to indicate another condition to evaluate. The option is evaluated if all previous

Seite 10 - AND FUNCTIONS

Returns TRUE if the given filenumber has reached the end of the file, FALSE if there is still data available to be read from the current position. OPEN

Seite 11 - ACOS (number)

17Commands and FunctionsA read-only constant containing the number 2.7182818284590452. var = EULER REM sets var to the euler constantEULERReturnseu

Seite 12 - COMMANDS AND FUNCTIONS

Introduction to Basic Programming...2344445556666777Commands and Functions...

Seite 13 - CEIL (number)

18COMMANDS AND FUNCTIONSBegins a loop encompassed by FOR and NEXT with an optional STEP command. The default STEP is 1, meaning each iteration of the

Seite 14

19Commands and FunctionsReturns a specified parameter from a connected SDI-12 sensor. The X following the identier species the SDI-12 sensor’s addre

Seite 15 - DATETIME

Returns a sensor’s most recent raw/unprocessed value. A raw value is the value of a measurement prior to slope, offset, function or digits are applie

Seite 16

21Commands and FunctionsJumps to the specified label or line number within the program. GOTO statements never return back to the point origin and thus

Seite 17

Returns the temperature, in degrees Celsius, of the given number (expecting a 0-5V analog voltage reading) based on the math equation for the WaterLog

Seite 18

23Commands and FunctionsReturns the position, starting at the position given by the third optional parameter (default is 1), of the first occurrence of

Seite 19 - EXP (number)

24COMMANDS AND FUNCTIONSIdentifies a specific location by name. Commands such as GOTO and GOSUB can refer to and send execution to named LABELs. Line

Seite 20

25Commands and FunctionsReturns the common (base-10) logarithm of the given number. The LN function should be used if a natural logarithm is required

Seite 21 - DIGITALX

Returns the given string with all whitespace removed from only the left side. var$ = LTRIM$(“ A1,B2,C3,D4 “) REM sets var$ to “A1,B2,C3,D4 “26COM

Seite 22

27Commands and FunctionsNegates the expression immediately following. The ! operator may alternatively be used. OPEN “SiteID.csv” FOR READING AS #1

Seite 23

1GOSUB...GOTO...

Seite 24

28COMMANDS AND FUNCTIONS ENDIF ON var GOTO critical,moderate,okay LABEL critical SETVALUE DIGITAL1, 1 SETVALUE DIGITAL2, 1 SETVALUE DIGITAL3, 1

Seite 25 - INT (number)

29Commands and FunctionsFile: OPEN “SiteID.csv” FOR APPENDING AS #1 PRINT #1, “A1,B2,C3,D4” CLOSE #1 REM Check if file exists, OPEN #1 FOR READIN

Seite 26

30COMMANDS AND FUNCTIONSA logical operator used between two expressions in conditional statements (e.g. IF, WHILE, etc.). Returns TRUE if the left, r

Seite 27 - LN (number)

31Commands and FunctionsBegins a conditional loop encompassed by REPEAT and UNTIL. The condition is given after the UNTIL statement and while evaluat

Seite 28

Returns the position, starting at 1, of the first occurrence of the second given string within the first given string beginning at the right. If the st

Seite 29 - ON number GOTO

33Commands and FunctionsSets the serial port settings for unopened communication ports. Serial ports are opened with the following defaults: baud rat

Seite 30

Sets a sensor’s function, specied by the Use Function option under the Processing section of the Storm’s Sensor Setup screen. Setting a sensor’s fu

Seite 31 - Listening Port (RS-232 Com):

35Commands and FunctionsReturns the string equivalent of the given number. An optional second parameter string may be specified to declare the format

Seite 32

36COMMANDS AND FUNCTIONSDeclares the beginning of a SWITCH-CASE clause. The single variable given after the SWITCH keyword specifies the character or c

Seite 33 - RIGHT$ (string, number)

37Commands and FunctionsUsed with the IF statement to specify a multi-line IF-THEN clause. var = 40 IF (var >60) THEN var = 60 ELSEIF (var >

Seite 34

BASIC PROGRAMMING01 /2

Seite 35

38COMMANDS AND FUNCTIONSSplits apart a string into an array of strings. The first parameter provides the string to split apart. The second parameter

Seite 36

39Commands and FunctionsMarks the end of a conditional WHILE-WEND loop. END WHILE may also be used instead of WEND. x = 0 WHILE (x < 30) REM B

Seite 37 - STR$ (number, string)

40COMMANDS AND FUNCTIONSMarks the beginning of a conditional WHILE-WEND loop. The condition is specified after the WHILE keyword. As long as the cond

Seite 38

41EXAMPLE PROGRAMS03 /

Seite 39 - TELL (filenumber)

42EXAMPLE PROGRAMSREM Prints out the last line of the log file to the RS-232 Com port REM When set up to run with the sensors, prints out their val

Seite 40

43Example ProgramsREM Determines true wind direction as a bouy rotates,REM based off recorded compass and wind directionGETVALUE SENSOR “Compass”, W

Seite 41 - VAL (string)

REM Respond to simple commands on the RS-232 Com port as a Listener programOPEN “LISTENER” AS #3PRINT #3 “Enter Command > “50REM Ten seconds of ina

Seite 42

45Example ProgramsREM Communicate with and retrieve data from an RS-232 sensorSerialNum$ = “450065”SETPORT 9600,8,None,1,None,0,0OPEN “RS-232 COM” AS

Seite 43 - PROGRAMS

1) The tissue in plants that brings water upward from the roots;2) a leading global water technology company.We’re 12,000 people unied in a common pu

Seite 44 - EXAMPLE PROGRAMS

Basic ProgrammingEach Storm data logger contains a built-in BASIC interpreter (as of firmware version 1.4.2) allowing for more complex procedures and m

Seite 45 - SensorMax.bas

Understanding the available functions and commands as well as the overall operations and flow of Basic is essential to its use within the Storm. Prima

Seite 46

Basic Programming5Basic programming examples provided throughout the manual will follow a specific format. All Basiccommands and functions will be cap

Seite 47 - VR2C.bas

BASIC PROGRAMMINGBasic supports traditional control statements such as GOTO and GOSUB as well as single and multi-line IF-THEN statements and SWITCH-C

Seite 48

Basic Programming7Files stored on the Storm’s local le system can be accessed for reading, writing, and appending of data. The OPEN command allows fi

Kommentare zu diesen Handbüchern

Keine Kommentare