Xylem System 5000 BASIC Manual Manuel d'utilisateur

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Équipement Xylem System 5000 BASIC Manual. Xylem System 5000 BASIC Manual User Manual Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 54
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 0
System H-5000
BASIC PROGRAMMING MANUAL
V1.4.4
D32 0414
Vue de la page 0
1 2 3 4 5 6 ... 53 54

Résumé du contenu

Page 1 - System H-5000™

System H-5000™ BASIC PROGRAMMING MANUALV1.4.4D32 0414

Page 2 - CONTENTS

8BASIC FEATURES & FUNDAMENTALSBasic 5000 provides a number of commands that allow for string manipulation and processing.Functions that return str

Page 3 - Contents

9Basic Features and FundamentalsIn order to provide greater flexibility and reusability of Basic Programs on the System 5000™ ,an advanced subset of co

Page 4 - FUNDAMENTALS

10The ‘GROUP: Symbol specifies where the Basic Program will appear in the Input/Output menus.If not specified or listed without a name, the program will

Page 5 - Basic Fundamentals

11BASIC COMMANDS & FUNCTIONS02 /

Page 6 - Error Handling

12BASIC COMMANDS & FUNCTIONSBasic 5000 uses a combination of commands and functions to allow more complex operations tobe performed on the System

Page 7 - Variables, Strings and Arrays

13Basic Commands and FunctionsReturns the absolute value of the given number. var = ABS(-2.5) REM stores 2.5 in the var variable var2 = ABS(100)

Page 8 - Operators

14A parameter to the DATETIME function returning a string representation of the most recenttriggered alarm time, formatted as “HH:MM:SS”. var$ = DATE

Page 9 - Listening Ports

15Basic Commands and FunctionsMulti-dimensional array: ARRAY myArray$(3,7) REM 2-dimensional string array (3 rows, 7 columns) FOR i = 1 TO 3 FO

Page 10 - System 5000™ Integration

Causes an immediate exit from a loop or SWITCH statement. a = 0 WHILE (a < 10) a = a + 1 IF (a > 5) BREAK REM the while loop exits onc

Page 11

17Basic Commands and FunctionsReturns the result (return value) of the most recent PRINT to either a serial or ethernetconnection. If an error has occ

Page 12

DIFFXX...DIGITALX...

Page 13 - & FUNCTIONS

18Used to begin the next iteration of a FOR, WHILE, REPEAT, or DO loop. FOR var = 1 TO 10 IF (var = 5) CONTINUE REM “5” won’t be printed PRIN

Page 14

19Basic Commands and FunctionsA parameter to the DATETIME function returning the current day as a number, formatted as DD. var = DATETIME(DAY) REM

Page 15 - ACTIVELED

Causes the program to pause execution for the specified number of seconds. A decimal numbermay be used to specify more specific and smaller time increme

Page 16

21Basic Commands and FunctionsBegins an infinite loop encompassed by DO and LOOP. A BREAK or GOTO statement may beused to leave the loop. DO REM

Page 17 - ASIN (number)

Immediately ends the Basic program. Optional if used as the last statement. var = 12 IF (var > 10) THEN var = 5 END ENDIF var = 10 R

Page 18

23Basic Commands and FunctionsA parameter to the DATETIME function returning the number of seconds elapsed fromJan 1, 1970 00:00:00 until today’s date

Page 19 - CLEARSDI ( )

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 E

Page 20 - COUNTERX

25Basic Commands and FunctionsReturns the fractional part of the given number. var = 26.245 REM stores 0.245 in varFRAC (number)Used in conjunction w

Page 21 - DATETIME

GETDB ERRORSTR, var$ REM stores the Default Error String in var$ GETDB SITEID, var$ REM stores the System 5000 Site ID in var$ task$ = “my

Page 22 - DIGITALX

27Basic Commands and FunctionsReturns the provided Task’s most recent measured value. If an unknown Task is specied, the System 5000™ Default Error S

Page 23

DIFFXX...DIGITALX...

Page 24 - EOF (filenumber)

28 slot$ = “SLOT2” GETVALUE DIFF34, var REM stores a new quadrature counter measurement of REM ports 3-4 from the daughterboard in the va

Page 25 - ERRORSTR

29Basic Commands and FunctionsJumps to the specified label or line number within the program. Unlike GOSUB, GOTO statements never return back to the po

Page 26 - EXP (number)

30Used to take actions based on the evaluation of given conditional statements. True is determinedas anything non-zero; false is zero.The short form o

Page 27 - FREQUENCYX

31Basic Commands and FunctionsReturns the integer part of the given number. var = INT(26.245) REM stores 26INT (number)Returns the position, starting

Page 28 - GETPOWER

Returns a string, starting from the left side, containing the given number of characters from the given string. var$ = “Hello World” new_var$ = LEFT

Page 29 - GETVALUE

33Basic Commands and FunctionsUsed within a subroutine, LOCAL marks the given variable as valid only within that subroutine. SUB change_var() LO

Page 30

Returns a smaller section (substring) of a given string. The first parameter is the given string, the second is the starting point from the left side,

Page 31 - HEX$ (number)

35Basic Commands and FunctionsDeclares the end of a FOR loop. The initial FOR variable may be optionally specified. FOR a = 1 TO 10 STEP 2 PRINT

Page 32

36Opens a file, serial (COM) port, network (Ethernet) port, or connects to a listening serial ornetwork port.Files may be opened for either READING, WR

Page 33 - INT (number)

37Basic Commands and Functions FileExists = 1 FileName$ = “LogFile.csv” IF (NOT OPEN(#1, FileName$)) THEN FileExists = 0 ELSE CLOSE #1

Page 34 - LN (number)

BASIC FEATURES & FUNDAMENTALS01 /2

Page 35

38A logical operator used between two expressions in conditional statements (e.g. if, while, etc). Returns TRUE if either the left, right, or both exp

Page 36

39Basic Commands and FunctionsBegins a comment extending to the end of the line. An apostrophe (“ ‘ ”) may alternatively beused. REM does not need a s

Page 37 - ON number GOTO

40Begins a conditional loop encompassed by REPEAT and UNTIL. The condition is given after the UNTIL statement and while evaluated as TRUE, will contin

Page 38

41Basic Commands and FunctionsReturns the given string with all whitespace removed from only the right side. PRINT RTRIM$(“ Hello World “) RE

Page 39 - Listening Port:

42Sets the requested database value to the given number or string. Available parameters are SITEID and SCANRATE with a mentioned Task and number value

Page 40

Basic Commands and Functions43Sets the provided Task’s most recent timestamp to the given number or string. If an unknown Task is specified, no value w

Page 41

44BASIC COMMANDS & FUNCTIONSUsed in conjunction with the GETDB command, SITEID requests the System 5000™’s Site IDas specified in the System Settin

Page 42 - RND (number)

Basic Commands and FunctionsThe array will be automatically sized (larger or smaller) based on the number of strings that areproduced by the split. Th

Page 43 - SCANRATE

46BASIC COMMANDS & FUNCTIONSDeclares a user-defined subroutine. Subroutines can specify and accept multiple arguments andcan return a number or str

Page 44 - SETPOWER

Basic Commands and Functionsnumbers less than or equal to zero will turn the Switched +12 Volt Off. GETPOWER SW12V, var REM stores a 1 if On, 0 if

Page 45 - SGN (number)

Basic Features and FundamentalsThe System 5000™ Data Collection Platform contains a built-in BASIC interpreter (as offirmware version 1.2.0) allowing f

Page 46 - SPLIT (string, array, string)

48BASIC COMMANDS & FUNCTIONSReturns the current read position of the given file number. Presuming SiteID.csv contains: Digital2,AC-In 1,256.25 OPE

Page 47 - STR$ (number, string)

Basic Commands and Functions49A parameter to the DATETIME function returning a string representation of the current time, formatted as “HH:MM:SS”. va

Page 48

50BASIC COMMANDS & FUNCTIONSMarks the end of a conditional loop encompassed by REPEAT and UNTIL. The condition is given after the UNTIL statement

Page 49 - TASKNAME

A parameter to the DATETIME function returning a two-digit number representation of the current year, formatted as YY. var = DATETIME(YEAR) REM sto

Page 50 - TELL (filenumber)

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

Page 51 - TRIM$ (string)

Basic Programs on the System 5000™ can be used as either Inputs or Outputs and operate in thesame manner, being executed according to their associated

Page 52 - VAL (string)

Basic Features and Fundamentals5The REM statement (meaning remark) or apostrophe (“ ‘ ”) introduce a comment that extends tothe end of the line. Notic

Page 53 - XOR (number, number)

BASIC FEATURES & FUNDAMENTALSBasic 5000 supports traditional control statements such as GOTO and GOSUB as well as singleand multi-line IF-THEN sta

Page 54

Basic Features and Fundamentals7Files stored on the System 5000™’s local le system can be accessed for reading, writing, andappending of data. The OP

Commentaires sur ces manuels

Pas de commentaire