Plain English and Script Difference Guide
Plain English and Script Difference Guide
Introduction
1 About This Guide ........................................................... 9
1.1 Purpose of This Guide ................................................................. 11
1.2 How This Guide is Organized ...................................................... 12
1.3 Typographical Conventions ......................................................... 13
Reference
3 Script Programming Language Overview ..................... 23
3.1 Script Programming Language ................................................... 25
3.1.1 Script Programs ....................................................................... 25
3.1.2 Script Functions ........................................................................ 25
3.1.3 Types of Script Programs and Functions .................................. 25
3.2 Program Status and Configuration Information ............................ 27
3.3 Tasks .......................................................................................... 28
Topics
Purpose of This Guide
How This Guide is Organized
Typographical Conventions
1 About This Guide
1.1 Purpose of This Guide
Introduction
The Introduction part contains information on the purpose of this guide, how this
guide is organized, where to find more information, and information on regulatory
notices.
Reference
The Reference part contains conceptual information, procedures, user interface
descriptions and troubleshooting information. If you want more information, see
WebHelp or the other Building Operation Reference Guides.
Tip
Helps you understand the benefits and capabilities of the product.
Note
Provides you with supplementary information.
Important
Alerts you to supplementary information that is essential to the completion of a
task.
Caution
Alerts you to a condition that can cause loss of data.
Warning
Alerts you to a condition that can cause product damage or physical harm.
Bold texts:
User interface items, such as property names and buttons, are written in bold, for
example "On the File menu, select New."
Topics
Where to Find Additional Information
Regulatory Notices
2 Additional Information
2.1 Where to Find Additional Information
Finding information
The easiest way to find information on WebHelp is to search for it.
UL 916 Listed products for the Unites States and Canada, Open
Class Energy Management Equipment.
Industry Canada
ICES-003
This is a Class B digital device that meets all requirements of the Canadian
Interference Causing Equipment Regulations.
Topics
Script Programming Language
Program Status and Configuration Information
Tasks
3 Script Programming Language Overview
3.1 Script Programming Language
Continued
Script Type Device Type
3.3 Tasks
Function block and Script programs must be connected to tasks in order to run.
You access Tasks from the Properties dialog box.
The task is a property of the object that defines the program cycles.
When you create a new function block or Script program, Task 3 is the default. This
means that one program cycle executes in 1000 ms.
Figure: Tasks
The way you schedule programs to execute in Script differs from how you schedule
them to execute in Continuum. For more information, see section 4.1 “Script and
Plain English Program Differences ” on page 31.
Task 3 1 seconds
Task 4 5 seconds
Task 5 10 seconds
Topics
Script and Plain English Program Differences
Declaring a Binding Variable
Declaring a User Function
Configuring BACnet Priority Level Access
Configuring Delays in Plain English Programs
Using System Constants
4 Program Language Differences
4.1 Script and Plain English Program Differences
Note
• You can use nested function calls in Script.
The elapsed time keyword method continues to work in Script. The Wait keyword is
not required. Wait is more efficient, however, since it provides a simpler syntax than
that of the elapsed time keywords for both the AS and ES.
The Wait syntax is as follows:
Wait <numeric_expression>
Note
• Wait and Delay are applicable only to standard Script programs and not to b3
Script programs.
4. In the Plain English IDE Editor, use property names or path names instead.
6. In Plain English programs, you must enter a path to the function object (or just
the name if the function is in the same location as the program).
Note
• The ReadProperty and WriteProperty keywords are available in
Script, but the priority level argument is no longer needed in the
statement. It is assumed based on the binding information.
6. For b3 programs in Building Operation, you must create a binding variable and
bind it to the present value of the commandable object (that is, not a specific
priority level as in the AS Script).
7. Then, use ReadProperty, WriteProperty or Relinquish.
Continued on next page
8. Ensure that you use the binding variable name instead of the full path name of
the object. Then, specify the priority level as needed. (See the b3 program
example that follows.)
4. In the Plain English IDE Editor, use the TS property to check whether enough
time has passed while on a given line.
4. Type the rest of the statement. Here, you enter the word 'then' to finish the If
statement.
Continued on next page
5. In Plain English, use the IDE Editor to select the system constant you want to
add to your program.
Topics
Script Editor Similarities to Plain English IDE Editor
Script Editor Color-Coded Program Elements
Script Editor Code Library
Plain English Code Import and Export in Script
5 Script Editor Overview
5.1 Script Editor Similarities to Plain English IDE Editor
Toolbars
Use the toolbars to perform a variety of
functions, including opening, closing, saving,
printing, importing, and exporting Script
programs.
Text Black
Keyword Blue
Value Maroon
String Red
Number Navy
Operator Teal
Comment Green
04-16002-01-en
December 2014