Properties of the script component, About the visual basic language – Sensaphone SCADA 3000 Users manual User Manual

Page 237

Advertising
background image

22-5

Chapter 22: Distributed Control using Visual Basic

Properties of the Script Component

If you click once on the Distributed Control management screen, the property editor will dis-

play the component properties.
Listed below are descriptions of each property of the script component. Note that most of the

properties listed below will never have to be changed.

AutoRunDelay - Allows you to have the script program start automatically when

the realtime screen starts. Enter a number in units of seconds. A value of 0 dis-

ables the feature.

AutoRunInterval - Allows the script to restart automatically after a time period has

expired. Enter the time in seconds. A value of 0 disables this feature.

EditScript - Shows the filename of the associated script program. Double-clicking

the filename will bring up the script editor.

EntryProc - Name of the entry procedure for the script program (DO NOT

CHANGE).

ExitProc - Name of the exit procedure for the script program (DO NOT

CHANGE).

FileName -Path and filename of the associated script program.
Height - Height of the script control screen.
Hint - Text that appears when you move the cursor over the Distributed Control

management screen.

Language - Selection of development language. The choices are Visual Basic

script, Delphi script or Java script.

Left - Position of the left side of the script control screen.
ScriptState - Allows you to change the state (run/stop/idle) of the script program.
Status - Displays the current status of the script program.
TimeSliceTicks - Time (in milliseconds) the script is yielded during timer calls.
Top - Position of the top-side of the script control screen
Width - Width of the script control screen

ABOUT THe VISUAL BASIC LANGUAGe

Visual Basic

®

is a structured programming language that is similar to other structured languag-

es like C. The structure of Visual Basic works as if you ask a question or pose a problem, and

then go through the simple steps of information gathering and action to solve the problem. For

example, if your alarm clock is ringing and you want it to stop ringing, you must hit the OFF

button to turn it off, otherwise nothing will happen. If you want the Distributed Control pro-

gram to turn off the alarm clock, you must first tell it how to recognize that the alarm is ring-

ing, then give it the command to turn the alarm off when it recognizes that it is ringing, other-

wise do nothing. To give the Distributed Control program this information, you must translate

English commands into Visual Basic commands.
The Visual Basic language structure is fairly simple. Each program must have a beginning and

an end. Each individual statement within the program must open, provide its information, and

then close. Think of it as writing sentences—without the proper sentence structure and punc-

tuation, you will get syntax errors, and the computer will not be able to receive the message or

understand what to do. There is much more information and detail on the Visual Basic

script language in the online help.

Advertising