Xylem System 5000 BASIC Manual Uživatelský manuál

Procházejte online nebo si stáhněte Uživatelský manuál pro Zařízení Xylem System 5000 BASIC Manual. Xylem System 5000 BASIC Manual User Manual Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 54
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 0
System H-5000
BASIC PROGRAMMING MANUAL
V1.4.4
D32 0414
Zobrazit stránku 0
1 2 3 4 5 6 ... 53 54

Shrnutí obsahu

Strany 1 - System H-5000™

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

Strany 2 - CONTENTS

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

Strany 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

Strany 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

Strany 5 - Basic Fundamentals

11BASIC COMMANDS & FUNCTIONS02 /

Strany 6 - Error Handling

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

Strany 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)

Strany 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

Strany 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

Strany 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

Strany 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

Strany 12

DIFFXX...DIGITALX...

Strany 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

Strany 14

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 23

DIFFXX...DIGITALX...

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 29 - GETVALUE

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

Strany 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,

Strany 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

Strany 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

Strany 33 - INT (number)

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

Strany 34 - LN (number)

BASIC FEATURES & FUNDAMENTALS01 /2

Strany 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

Strany 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

Strany 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

Strany 38

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

Strany 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

Strany 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

Strany 41

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

Strany 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

Strany 43 - SCANRATE

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 48

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

Strany 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

Strany 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

Strany 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

Strany 52 - VAL (string)

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

Strany 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

Strany 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

Komentáře k této Příručce

Žádné komentáře