The Distributed Control program comprises the following elements:
STRUCTURE
: To write a valid Visual Basic program, regardless of length, you
must follow its simple structural elements.
KEYWORDS
: These are short words or symbols that define variables or execute
specific actions within a Visual Basic program. They include operators, assign-
ment, comparators, and comments.
PREDEFINED
VARIABLES
: These are variables that have specific predefined
values that are automatically updated and cannot be changed by the user.
FUNCTIONS
: These are word commands that perform a predefined function
within a Visual Basic program.
ARRAYS
: This is a more advanced programming type that significantly shortens
and simplifies long programs.
ERROR HANDLING
: When a program is compiled, it is scanned for language
related errors. An error message, including the type of error, is displayed.
EDITING TOOL
: The SCADA 3000 Realtime Editor provides a Distributed
Control program editing utility that allows you to write, compile, and run
Distributed Control programs. This chapter provides basic instruction in the
Visual Basic language and gives all the commands that are valid for use with
SCADA 3000. Sample programs are included.
Structure
Listed below is information that will help demonstrate the Visual Basic language structure as
it is used in the SCADA 3000. Refer to the following pages for explanation of the keywords,
functions, and commands used within the sample programs.
All programs must start with the predefined template (template.vbs). Your specific program
must be inserted between the comments labeled
Begin User Program
and
End User Program
.
' Begin User Program
' End User Program
*
Note
: All SCADA 3000 Distributed Control Programs must include some pre-
program and post-program instructions. These have been pre-written for you
and are included in the distributed control template program (template.vbs)
located in the SCADA 3000>Samples>Scripts folder.
Keywords
The following is a partial list of valid components of the Visual Basic language that can be used
within the SCADA 3000 Distributed Control program.
Dim
If . . . Then . . . Else
For . . . Next
Do . . . Loop
Definitions
Dim Statement
Declares variables and allocates storage space.
22-6
SCADA 3000 User’s Manual
Summary of Contents for Sensaphone SCADA 3000
Page 1: ...Sensaphone SCADA 3000 User s Manual Version 2 34...
Page 6: ...vi SCADA 3000 User s Manual...
Page 10: ...x SCADA 3000 User s Manual...
Page 30: ...1 6 SCADA 3000 User s Manual...
Page 48: ...4 6 SCADA 3000 User s Manual...
Page 70: ...9 8 SCADA 3000 User s Manual...
Page 122: ...12 8 SCADA 3000 User s Manual...
Page 190: ...15 30 SCADA 3000 User s Manual...
Page 211: ...lead 1 lag 0 else lead 0 lag 1 16 21 Chapter 16 Programming in C...
Page 212: ...16 22 SCADA 3000 User s Manual...
Page 236: ...21 8 SCADA 3000 User s Manual...
Page 248: ...22 12 SCADA 3000 User s Manual...
Page 258: ...23 10 SCADA 3000 User s Manual...
Page 274: ...25 8 SCADA 3000 User s Manual...
Page 288: ...27 8 SCADA 3000 User s Manual...
Page 294: ...28 6 SCADA 3000 User s Manual...
Page 296: ...A 2 SCADA 3000 User s Manual...
Page 302: ...D 2 SCADA 3000 User s Manual...
Page 318: ...I 2 SCADA 3000 User s Manual...
Page 320: ...J 2 SCADA 3000 User s Manual...
Page 322: ...K 2 SCADA 3000 User s Manual...
Page 335: ...Test Log...
Page 336: ......