MicroMod MOD30ML IB-1800R-SCR Owner's Manual

Add to my manuals
98 Pages

advertisement

MicroMod MOD30ML IB-1800R-SCR Owner's Manual | Manualzz
MOD 30ML Multiloop Controller
Scripting Hints, Help and Examples using 1800P
MOD 30ML™ Identity Module and ViZapp
Visual Application Designer
Display Guide
MicroMod Automation, Inc.
The Company
MicroMod Automation is dedicated to improving customer efficiency by providing the most cost-effective, application-specific process solutions
available. We are a highly responsive, application-focused company with years of expertise in control systems design and implementation.
We are committed to teamwork, high quality manufacturing, advanced technology and unrivaled service and support.
The quality, accuracy and performance of the Company's products result from over 100 years experience, combined with a continuous
program of innovative design and development to incorporate the latest technology.
Use of Instructions
Ì Warning. An instruction that draws attention to the risk of
injury or death.
Note. Clarification of an instruction or additional
q Caution. An instruction that draws attention to the risk of
the product, process or surroundings.
i Information. Further reference for more detailed
information or technical details.
information.
Although Warning hazards are related to personal injury, and Caution hazards are associated with equipment or property damage, it
must be understood that operation of damaged equipment could, under certain operational conditions, result in degraded process
system performance leading to personal injury or death. Therefore, comply fully with all Warning and Caution notices.
Information in this manual is intended only to assist our customers in the efficient operation of our equipment. Use of this manual for
any other purpose is specifically prohibited and its contents are not to be reproduced in full or part without prior approval of MicroMod
Automation, Inc.
Licensing, Trademarks and Copyrights
MOD 30 and MOD 30ML are trademarks of MicroMod Automation, Inc.
MODBUS is a trademark of Modicon Inc.
Health and Safety
To ensure that our products are safe and without risk to health, the following points must be noted:
The relevant sections of these instructions must be read carefully before proceeding.
1.
Warning Labels on containers and packages must be observed.
2.
Installation, operation, maintenance and servicing must only be carried out by suitably trained personnel and in accordance with the information
given or injury or death could result.
3.
Normal safety procedures must be taken to avoid the possibility of an accident occurring when operating in conditions of high
4.
pressure and/or temperature.
5.
Chemicals must be stored away from heat, protected from temperature extremes and powders kept dry. Normal safe handling procedures must be
used.
6.
When disposing of chemicals, ensure that no two chemicals are mixed.
Safety advice concerning the use of the equipment described in this manual may be obtained from the Company address on the back
cover, together with servicing and spares information.
All software, including design, appearance, algorithms and source
codes, is copyrighted by MicroMod Automation, inc. and is owned by
MicroMod Automation or its suppliers.
Contents
INTRODUCTION............................................................................................................ 1-1
1.1 Overview ............................................................................................................... 1-1
DISPLAY BASICS ......................................................................................................... 2-1
2.1 Overview ............................................................................................................... 2-1
2.2 Using a smart symbol COMPOUND...................................................................... 2-2
2.2.1 Exercise: Loading and using a PID with display ........................................... 2-4
2.3 Creating Custom Loops and Displays: An Overview ............................................ 2-7
2.3.1 Display Block ................................................................................................. 2-7
2.3.2 State Table Block ........................................................................................ 2-10
2.3.3 Display Interface Block ................................................................................ 2-11
2.3.4 Tune List Blocks .......................................................................................... 2-11
2.3.5 Process Alarm Display Blocks ..................................................................... 2-12
2.4 Using Display Block Menus ................................................................................. 2-14
2.4.1 Display Block Menu Fields........................................................................... 2-14
2.4.2 Display Block Inputs .................................................................................... 2-17
2.4.3 Display Formats........................................................................................... 2-18
2.4.4 Exercise: Creating an Indicating Totalizer using Display Block Menus....... 2-21
2.5 Using State Tables .............................................................................................. 2-27
2.5.1 Exercise: Creating “Clear Totalizer” Keys using State Tables .................... 2-28
DISPLAY SCRIPTS ....................................................................................................... 3-1
3.1 General ................................................................................................................. 3-1
3.1.1 Using External Script Files............................................................................. 3-1
3.1.2 Making External Files Part Of The Display Block .......................................... 3-2
3.1.3 Using A Common Script File For Multiple Display Blocks.............................. 3-2
3.2 The Display Script Language ................................................................................ 3-3
3.2.1 Display States................................................................................................ 3-3
3.2.2 Event Scripts ................................................................................................. 3-4
3.2.3 Assignment Statements................................................................................. 3-5
3.2.4 IF Statements ................................................................................................ 3-8
3.2.5 CASE Statements.......................................................................................... 3-9
3.2.6 TUNE Statement ......................................................................................... 3-10
3.2.7 RETURN Statement .................................................................................... 3-11
3.2.8 Annotating Scripts ....................................................................................... 3-11
SPECIAL EFFECTS ...................................................................................................... 4-1
4.1 Marquee Messages............................................................................................... 4-1
4.2 Remote Display Input ............................................................................................ 4-2
4.3 Auto-Scrolling Displays.......................................................................................... 4-3
i
MOD 30ML Display Guide
Contents
4.4 Changing System Key Definition ........................................................................... 4-4
4.5 Using Multiple Display States................................................................................ 4-4
APPLICATION EXAMPLES........................................................................................... 5-1
2.1 Example 1: Basic PID Display .............................................................................. 5-2
2.2 Example 2: Adding Remote/Local Setpoint Switching .......................................... 5-8
2.3 Example 3: PID & Totalizer Operation on a Single Display ................................... 5-9
2.4 Example 4: Variable Ramping with Two Keys ..................................................... 5-13
2.5 Example 5: Time-Based Variable Ramping ........................................................ 5-18
2.6 Example 6: Multiple Tune Lists ........................................................................... 5-23
2.7 Example 7: Start & Stop a Discrete Device ........................................................ 5-28
2.8 Example 8: Recipe Selection .............................................................................. 5-31
2.9 Example 9: Sequence Operation & Control ......................................................... 5-35
2.10 Example 10: Auto-Scrolling Displays .................................................................. 5-40
ii
MOD 30ML Display Guide
Introduction
1
2.1
Introduction
Overview
The MOD 30ML controller allows you to access virtually all its power through the
operator display. The standard displays provide the generally accepted operating views
for a three-term (P,I,D) control loop including graphic display of process setpoint and
output, and alphanumeric display of loop tag, process value, setpoint/output values, and
mode. Alarm and tuning pages are also provided. However, custom displays can be
created for such strategies as indicating totalizers, direct operation of discrete devices,
sequence control and operation, scrolling indication and many other requirements. It is
also possible to cause information to be displayed based on logic or alarms, and construct
pages specifically for commissioning activities.
This book is intended as a guide to display building and should be used in conjunction
with Database Reference Manual IB-1800R-APP. The first part of this manual explains
the basic principals of display building and includes exercises for building typical
displays. The second part shows examples of display scripts for various applications.
This guide assumes the user is familiar with the Visual Application Designer software.
Knowledge of loop building, loading Smart Symbols, and communications setup is
required. For assistance in these areas refer to IB-VIZAPP-TUT, “ViZapp Training
Manual”.
1-1
MOD 30ML Display Guide
Introduction
1-2
2
2.1
Display Basics
Overview
The only real limit to the number of display “pages” is database memory. Practical
considerations such as operator preferences and plant philosophy will be the determining
factors in the number of displays created for a single controller.
There are two basic methods of configuring a MOD 30ML display:
•
using pre-defined compounds that contain a complete loop and associated display
•
creating a control strategy and building a custom display
It is often possible to start with a pre-defined compound from the Gallery and modify it to
fit the particular application. This manual includes examples of both of the above
methods.
There are several blocks in the MOD 30ML database that are specific to front panel
displays. They are the Display Block, the Display Interface Block, the State Table Block,
Tune List blocks and Process Alarm Display blocks.
Figure 2 .1.
Display Block
Relationships
Each ‘page’ that you wish to display on the front face of the controller corresponds to one
Display Block (DISP). This is where the attributes are defined that will appear on the
display. One algorithm block, such as a PID, may have one or more display blocks.
Conversely, one Display Block may contain elements from one or more algorithm blocks.
2 -1
MOD 30ML Display Guide
Display Basics
The Display Interface Block (DIF) contains the list of all displays that can be shown on
the operator display. The State Table block (ST) contains a file with lists of numbers to
be translated into text on the displays. Because only one of these blocks is allowed per
controller, the Display Interface Block and State Table Blocks are placed in the strategy
automatically by the configuration software.
Tune List (TL) blocks are used to create displays that are accessed only when needed.
Typically they will include P,I,D tuning parameters and other commissioning information,
but they can also be used to create recipe selection pages and other displays that remain
hidden until needed.
Process Alarm Display (PAD) blocks are used to define alarms and how they will be
indicated and displayed. It is not necessary to use the Display Block to create alarm
indication. PAD blocks are usually connected to PID blocks, but can be used with any
algorithm block.
In general, the steps to creating a MOD 30ML display are:
1. create the Display Block corresponding to the algorithm block, and make the
appropriate connections;
2. enter each Display Tag in the Display List of the Display Interface Block;
3. Create State Tables in the State Table block to present text corresponding to
parameter codes on the front panel.
2.2
Using a smart symbol COMPOUND
The configuration software includes a gallery of pre-defined strategies known as
compounds. These include:
PID-100 – A complete PID loop with one built-in analog input, input function block, PID
block, analog output block, Display and Tuning
PID&ALM – A complete PID loop as in BASICPID, with the addition of a high and a
low process alarm with alarm display
PIDTOT1 – A complete PID loop as in BASICPID with the addition of a totalizer. A
single display is used for indication and operation of the PID loop and totalizer.
PIDTOT2 – This is the same as PIDTOT1, but with two separate displays for indication
and operation of the PID loop and totalizer.
PID_OPH – A compound for using and displaying the MOD 30 Output Holder with
MOD 30ML, including feedback signal. For more information refer to IB-MLAPP-OH.
CAS&DSP – A cascade loop with displays and tuning for both master and slave loops.
2 -2
MOD 30ML Display Guide
Display Basics
Connections between the appropriate algorithm blocks and the Display and Tune blocks
have already been made in the compounds. In most cases the user must make minor
modifications to the blocks within the compound, or add to the State Table block.
Instructions are provided in READ or NOTES blocks within each Symbol.
The default ranges for PID blocks are 0 to 100 per cent, with local setpoint (the
Cascade allows Local/Remote on the Slave). Change ranges by opening the blocks
and making the appropriate entries. Default values for tuning parameters are Gain =
1.0, Reset = 0.01, Preact Off. New tuning values can be entered in the PID block
during strategy configuration, or entered from the front panel after download.
Any of the compounds may be used as a basis for a custom display.
2 -3
MOD 30ML Display Guide
Display Basics
2.2.1 Exercise: Loading and using a PID with display
This exercise shows how to load the PID-100 compound. All default values are used.
The resulting display will look similar to the diagram in the next figure. By holding down
the Scroll key, tuning parameters can be accessed.
Figure. 2 .2.
Typical PID Loop
display
Exercise:
Typical PID Loop
and display
1.
3.
4.
5.
2 -4
Action
Comment
From the Gallery, export the ML_PID
compound. The analog input, input
function, PID, alarm, display, tune list, and
output blocks appear in the workspace.
Open the Display (DISP) block and
position the cursor in the Display Tag field
showing PID-100
This must be loaded within a Loop
Compound in a MOD 30ML.
In the Display Tag field, type in a tag
name of your choice.
Enter the tag name again in the Initial
Display Data field for Line 1, enclosed in
double quotation marks. For example,
“LIC-100”. Or you can type the keyword
DISPTAG (no double quotes).
Close the block using OK
Do not confuse this with the Block Tag
field at the top of the menu. The Block
Tag field serves only to identify the block.
Each display must have a unique name;
this may be the same as the block tag for
easy reference. Display blocks in predefined compounds are usually renamed by the user according to the
specific application.
It is often helpful to make the Display
name the same as the loop tag name,
such as LIC-100.
Any text enclosed in double quotes in the
Initial Display Data fields will be
displayed as entered.
MOD 30ML Display Guide
Display Basics
In order for the new display to appear on the front panel during operation, you must place
the Display Tag name in the Display List of the Display Interface Block, which manages
displays in the controller.
Figure 2 .3.
Display Block Menu
When the TAG key is pressed, displays will appear in the order in which they are listed in
the Display List.
Exercise: Typical
PID Loop display
(cont’d)
6.
7.
8.
9.
10.
11.
Action
Back up to the highest level of the
strategy where the IF, SE, DIF and ST
blocks appear.
Double-click on the DIF block to view the
menus
Select the “New” icon on the Display Tag
List toolbar.
Type the tag name exactly as it was
entered in the Display Block.
Select the button next to User Display and
type the tag name.
Comment
An empty box appears in the Display Tag
List window
The Display List is case sensitive.
This will cause the display to appear on
the front face at power up, instead of the
default device display.
Click on OK, and save the file.
2 -5
MOD 30ML Display Guide
Display Basics
If you wish to download the configuration and view the display, you must configure the
appropriate communication block.
The input ranges for the PID block are the default (0-100). Change these ranges in the
Display (DISP) block:
1. Open the DISP block
2. Select Edit Display Formats
3. Change the Low Limit and High Limit for pvB, pvL, spB and spL to match the new
ranges
4. Select ENTER
5. Save the strategy
2 -6
MOD 30ML Display Guide
Display Basics
2.3
Creating Custom Loops and Displays: An Overview
There are five types of blocks that interact to display process information on the
controller’s front panel: Display Blocks, Tune List Blocks, Process Alarm Display
Blocks, the State Table Block and the Display Interface Block. The following sections
describe the purpose and use of each block, followed by exercises demonstrating how to
use them in display building.
The Display Blocks, State Table Block and Display Interface Block reference information
created in an editor (Display Scripts, State Tables, and Display List). There are two
means of entering this information: using the internal editor, or an external text editor or
word processor.
The advantage of using the internal editor to construct the files is that when the file is
saved, Visual Application Designer saves the information inside the block. The
information is always automatically associated with the block. However, it is not
available to be referenced by other blocks although it can be copied and pasted.
Using an external text editor or word processor provides more flexibility. After creating
the file externally, specify the file name in the field provided (check the “Use External
File” box and enter the filename). However, the user must always ensure that the external
file resides in the same directory as the saved and compiled configuration strategy. Using
this method allow multiple blocks to reference the same information.
2.3.1 Display Block
A Display (DISP) Block is required for each display to be shown on the front face of the
controller, except for Process Alarm Displays. Multiple display blocks may be used in
one configuration; therefore, ViZapp does not automatically insert them into the strategy.
The Display block is used to define which variables will be shown on the display and in
what format they appear. It is also used to define key actions (macros) associated with that
particular display. In its simplest form, the display block accepts process variable data
for presentation as values on lines or bars. These values can be formatted, and identified
with engineering units or other labels. More advanced functions are accomplished using
the display script language (see Display Scripts). When creating displays, menus and
scripts refer to Line Numbers of the display. The next figure shows the line numbers,
which are numbered the same in any display.
2 -7
MOD 30ML Display Guide
Display Basics
Figure 2 .4.
Typical PID Loop
display
Although it is most common to use one display for one algorithm block (e.g. PID block),
it is possible to combine attributes from several algorithm blocks into one display, or have
multiple display blocks for a single algorithm block.
The steps involved in creating a display are:
1. Determine the variables to be displayed and the format in which they will appear,
using “Edit Inputs”.
2. Set up the formats to be used by the inputs using the “Edit Display Formats” menu
3. Fill in the menu fields for the lines and bars on the display
4. If more advanced displays are required, create the script file using the “Edit Display
Scripts” button or by creating an external script file. Display Scripts are discussed in
detail in Chapter 3.
2 -8
MOD 30ML Display Guide
Display Basics
Figure 2 .5.
Display Block Menu
Page 1
Bars refer to the three bargraphs on the controller display. Up to four highlighted
segments may be defined, either by a constant value or by connection to another signal, in
addition to the bar itself.
Inputs are the values that will be shown on the front panel (either inputs from another
block or local constants), or values that will be written from the front panel to logic or
other functions.
Formats determine how variables will be displayed. Each display input must reference a
format. One format can be used for multiple inputs; for example, several inputs may have
a Line format with 2 decimal places.
Scripts are used to create key macros, access custom tuning lists, display multiple
messages in one area of the display, and manipulate data before displaying (e.g. calculate
compensated measurement for display only).
Many displays can be created without any scripting by simply using the menu entries.
Once all bars, inputs, formats and scripts have been defined, inputs are connected from
other blocks using one of the connection methods (e.g. multi-segment, right-angle, jump
point etc.).
2 -9
MOD 30ML Display Guide
Display Basics
2.3.2 State Table Block
The State Table (ST) block is placed in the strategy automatically by Visual Application
Designer. There is only one ST block per controller. Its sole function is to provide text
that corresponds to codes in the controller, such as Auto/Manual, Local/Remote, etc.
Associated with the State Table block is a file that contains the State Tables: one or more
‘tables’, each identified by a 1 – 8 character name, that contain a list of attribute values
and the associated mnemonic (text) strings to be displayed for each value. A default State
Table file is supplied in ViZapp for a standard P,I,D controller display. This may be used
as a starting point for adding sequence text, device display text, or key assignment text;
or, you may create your own.
Figure 2 .6.
State Table Block
The State Table names are entered in the Display Format section of the Display Block
when the user wants to associate the text with the input.
2.3.3 Display Interface Block
Like the State Table block, the Display Interface Block (DIF) is placed in the strategy
automatically by ViZapp when you begin a MOD 30ML configuration. There is only one
DIF block per controller. Its primary functions are:
2 -10
MOD 30ML Display Guide
Display Basics
•
manage the order in which displays appear on the front face
•
define how alarms are indicated and annunciated
•
set password protection for the controller.
In order for a display to appear on the front face when the tag key is pressed, its Display
Tag name must be in the Display List of the DIF block. If there are multiple displays for
a control strategy, when the tag key is pressed displays will appear in the order in which
they are listed in the Display List.
Selecting the “New” icon on the Display Tag List toolbar causes an empty box to appear
in the Display Tag List window. The first Display Tag is then typed in the box. To add a
second display, select New and type the second display name. Display Tags must be
entered EXACTLY as they appear in the relative Display Block; this list is case sensitive.
Display to use at power-up indicates which display will be presented when power is first
applied to the controller. This can be the default DEVICE display, the PREVIOUS
display (in which case the controller shows the last display before power was removed),
or USER. If USER is selected, any Display Tag name from a Display Block may be
entered, and this will always be the power-up display.
REMOTE DISPLAY INPUT is used to force a display to appear on the front face based
on an input to the DIF block. For example, a digital event or an alarm could cause a
specific operating display to appear. The desired display tag name must be in the Display
List in order for this to occur. When the input condition is present, normal navigation via
the TAG key is disabled. This is discussed further in Chapter 4.
The remaining DIF block entries deal with how various alarms are to be displayed on the
front of the instrument and password protected access to configuration and tuning
displays. Refer to IB-1800R-APP for details on these entries.
2.3.4 Tune List Blocks
A Tune List (TL) Block contains a list of attributes accessible as tunable parameters by
one or more display blocks. It does not actually do anything except provide the
information used by the display block. Configuration of Tune List blocks is similar to
Display Blocks; that is, there is an Input List and an Input Formats menu. However, no
actual connections are made to Tune List blocks; attributes to be contained in Tune Lists
are selected using the Browser method.
Tune List Blocks can be used to create Tuning Displays for P,I,D parameters; provide
information for commissioning purposes; create recipe selection screens; and many other
applications.
Tuning displays are invoked from Display Blocks by the TUNE Statement (see Event
Scripts, TUNE Statements). More than one display block can use a Tune List, but Tune
Lists cannot be “nested”. For information on connecting more than one Tune List to a
display, see the example in Part 2 of this book.
2 -11
MOD 30ML Display Guide
Display Basics
2.3.5 Process Alarm Display Blocks
The Process Alarm Display (PAD) block combines the functions of detecting and
signaling alarms, and displaying them on the front face of the MOD 30ML. It is NOT
necessary to construct separate display blocks for alarms, unless the user desires custom
alarm displays.
Separate PAD blocks are used for each alarm trippoint desired. For example, a high
process alarm, a low process alarm and a deviation alarm would require three PAD
blocks.
Figure 2 .7.
Process Alarm
Display Block
The general menu for the Process Alarm Display block is shown in the figure above. The
Alarm Input is the value being examined for the alarm condition. Typically this would be
PVI from the PID block, or the Result of an input function block. However with MOD
30ML the user is not restricted to alarming only on process; this input can be any variable,
such as Controller Output value, or a discrete parameter. Therefore the user may select a
data type other than floating point. The next figure shows sample block connections for
Process Alarm Displays.
Figure 2 .8.
Process Alarm
Display Block
Connections
2 -12
MOD 30ML Display Guide
Display Basics
VCI
Result
AlarmInput
PAD
Figure 2 .9.
Process Alarm
Display Block Display Menu
The Display Menu controls how the alarm will be indicated on the controller display.
Alarms can be displayed numerically and graphically. When BAR is selected for Bar
Format, the bar shows the alarm input with an intensified segment indicating the trip
point. When DEV is selected, the bar displays alarm input as a deviation from a zero
deviation point, which is indicated by an intensified segment at midscale. A second
intensified segment identifies the alarm trip point; if the trip condition is DEVIATION, a
third intensified segment identifies the second alarm trip point.
It is possible to immediately go to an operating display from the alarm display when the
TAG key is pressed. For example, a Low Level alarm in a boiler control system can be
directly connected back to the Level Controller operating display so the operator can
correct the alarm condition. If “Return to previous display” is selected, the TAG key
takes the operator back to the display that was on the front face prior to accessing the
alarm display. If “Go to display with this tag” is selected, the return path from the alarm
2 -13
MOD 30ML Display Guide
Display Basics
display is to the specified display. The name of the desired display must be entered in the
field.
For more information on Process Alarm Display blocks, see instruction manual IB1800R-APP, Section 2.6
2.4
Using Display Block Menus
It is possible to create many displays without using Display Scripts or State Tables simply
by filling in the fields in the main Display Block screens. A brief description of the
relevant fields is given here.
2.4.1 Display Block Menu Fields
Figure 2 .10.
Display Block Menu
Display Tab
Name simply identifies this particular display block within the database for connection
purposes. It should not be confused with the Display Tag described below. The
Description field is for user reference only.
The Display Tag name may be up to eight characters and identifies this display in the
Display List of the DIF block as described in the previous section. Note that it must be
entered in the Display List exactly as it appears in this field. It does NOT define the text
that appears as the tag name on the front face. You may, however, designate the Display
2 -14
MOD 30ML Display Guide
Display Basics
Tag as the front face name by using the mnemonic DISPTAG on Line 1, as shown in the
figure above.
The Initial display state field is used to designate the script used initially by the display
block. In most cases it will be DEFAULTS. If a script is not used, or if the display state
is DEFAULTS, this field is left blank. Display States are described in more detail in
Chapter 4.
The bottom section of the page is used to define how the front display will look initially,
since it is possible to change this dynamically by means of scripts. The Line numbers
refer to the lines on the front display. Figure 10 shows the line numbers, which are
numbered the same for any display.
Figure 2 .11.
Display Elements
There are three columns to define the alphanumeric lines on the display. Lines 1, 2 and 6
may be up to eight characters long; lines 3, 4 and 5 may be up to 3 characters long. To
initially display a fixed value or text string, enclose the value or text in double quotes, for
example, “OP”. This may be dynamically changed during operation using scripts. To
display the value of a signal from another block (for example, process value from a PID
block) enter the mnemonic for that attribute.
The second page of the Display Block defines the bargraphs and highlighted segments.
Up to four intensified segments may be defined for each bar. This is useful for showing
various alarm trip-points, or using the display as a three-point indicator with the
intensified segments as setpoint values. As with the alphanumeric lines, these may be a
constant value, or tied to an input. The next figure shows the Bars tab of the Display
Block.
2 -15
MOD 30ML Display Guide
Display Basics
Figure 2 .12.
Display Block Menu
Bars Tab
By entering all values as fixed, in double quotes, you can create a static screen that
displays exactly what you have typed and does not change. Admittedly, this is not
particularly useful in a process control environment. Therefore it is necessary to attach
inputs to the display block and give them specific formats.
2 -16
MOD 30ML Display Guide
Display Basics
2.4.2 Display Block Inputs
Selecting the Inputs tab brings up the Inputs menu. Up to 40 inputs, or attributes, may be
entered in each Display block. To add inputs to the input list, click on the Add button.
The dialog box Specify Input Data appears, as shown in Figure 12.
Figure 2 .13.
Display Block
Input Definition
Dialog Box
Data in a Display Block can be bi-directional; that is, an input can be used for display
only; or it can be used to change a variable in an algorithm block from the front panel. In
this case it actually behaves as if it were an “output” from the display block, although the
connection is made as an input. This is discussed in more detail in Section 3.
As in the Expression and Sequence blocks, each input to the display block can be assigned
an input name of up to eight characters. That is, instead of using I1, I2 etc., which are the
default names, they can be defined as PROCESS, SP, GAIN etc. according to the needs of
the application. This also makes them easier to identify in scripts. The input names
MUST begin with an alpha character.
Data for display can come from one of two sources: a connection from any other block in
the strategy, or from the block itself (Internal data). Values that will be entered from the
front panel are considered Internal inputs, and an initial value can be entered for Internal
data.
Regardless of whether the input is internal or an external connection, the input data type
must be selected using the pull-down menu. The next field is where an initial internal
value is entered. If an internal data value is entered and a remote connection is made, the
remote connection takes precedence.
An input value may be shown on any of the six lines or three bars. In the Line Format
and Bar Format fields are entered the names of the Line and Bar format types as defined
in the Formats menu (see the following section). If an input is to be shown on a line only
then a bar format is not required; showing an input on a bargraph only does not require a
line format.
2 -17
MOD 30ML Display Guide
Display Basics
2.4.3 Display Formats
Selecting the Formats tab brings up the Formats menu. All attributes to be displayed
must have an associated format; however several attributes may share a common format.
For example, the process and setpoint bargraph displays usually use the same engineering
units range. Therefore, a single format may be defined and used in the Inputs menu for
the process input bar format and for the set-point bar format as well. This eliminates
multiple format definitions in the formats menu with the same information. However,
setpoint often requires operator entry, while process value does not; therefore the Line
formats will be different in this instance.
Figure 2 .14.
Display Format
Dialog Box
Any name starting with an alpha character and up to eight characters may be used to
identify a format. Names must be unique; therefore it is often useful, but not necessary, to
use an L or a B at the end of the name to distinguish lines and bars. For example, the Line
format for process variable could be pvL, while the Bar format could be named pvB.
There is no relationship between format numbers and input numbers, i.e., format number
1 could be used for any input.
2 -18
MOD 30ML Display Guide
Display Basics
The Display Format is selected using the pull-down menu. Table 2-1 shows the format
types and how the data appears for each. For example, most analog variables such as
Process and Setpoint are displayed as a Float, with one to six places to the right of the
decimal point.
Table 2 .1
Display Format
Menu
Display
Format
Used For
Appears As
Float0
Continuous (analog) variables
X
Float1
Continuous (analog) variables
X.X
Float2
Continuous (analog) variables
X.XX
Float3
Continuous (analog) variables
X.XXX
Float4
Continuous (analog) variables
X.XXXX
Float5
Continuous (analog) variables
X.XXXXX
Float6
Continuous (analog) variables
X.XXXXXX
Integer1
Discrete, Short State, Long State
Integer
Integer2
Count
Integer
Integer4
Millisecond Time
Integer
Time1
Time
HH:MM:SS
Time2
Time
M:SS.SSS
Time3
Time
HHHH:MM
Time4
Time
MM:SS.SSS
State
Discrete, Short State, Long State, Count
ASCII
ASCII
As defined in
State Table
ASCII
Hex
Hex
Hex
Date
Date
Bar
Discrete, Short State, Long State, Count,
Millisecond Time, Floating Point
Discrete, Short State, Long State, Count,
Millisecond Time, Floating Point
mm/dd/yy or
dd/mm/yy
Bargraph
Deviation
Bargraph
High Limits and Low Limits are used to for continuous variables that have limits for
operator entry, such as setpoint and output. If there is no operator entry, limits need not
be entered. When the format is a bar or deviation the high and low limits are used to
define the upper and lower range values for the bar.
If an operator will enter or change the value from the front panel using the up/down
arrows, an Entry Method must be selected. When set to Entry Required, the operator
must press the flashing ENT key before the changed value is entered. When set to
Immediate, the new value is entered as soon as the Display Block is executed (on the
next scan).
2 -19
MOD 30ML Display Guide
Display Basics
Setting Entry Method to None causes the up/down arrows to remain invisible, and the
variable cannot be changed from the front panel.
If an engineering units label is desired, up to four characters may be entered in the
Engineering Units field. This will cause the label to appear at the end of the displayed
value, e.g., 175.6PSI. Only Floating Point and Integer display formats use Engineering
Units. If a space is required between the value and the units, press the spacebar prior to
typing the engineering unit label. If the length of the displayed value plus the engineering
units is greater than eight characters, the engineering units label will be truncated to make
room for the value display, one character at a time.
Display State Table and Entry State Table are used when the Display Format selected is
“State”. This is normally used when the operator has several choices to scroll through for
a given key or line. These entries are discussed further in Section 2.6, Using State Tables.
The Edit When field is used to determine when an operator may make a change to this
attribute. For example, if the operator should not change the output if a certain discrete
input were TRUE, the expression for the output format would read I1 == FALSE where
I1 is the name of the input to be compared.
If no expression is entered, the operator can always change the displayed value.
2 -20
MOD 30ML Display Guide
Display Basics
2.4.4 Exercise: Creating an Indicating Totalizer using Display Block
Menus
Using only the Inputs menu, the Formats menu, and the entries on the main screen it is
possible to construct many useful displays without creating either State Tables or Scripts.
This exercise shows how to create an Indicating Totalizer display for use with a Totalizer
block. The resulting display will look similar to the diagram shown in Figure 14.
Figure 2 .15.
Totalizer Display for
Exercise …
Exercise:
Creating an
Indicating Totalizer
1.
2.
Action
Comment
Place a Totalizer block in the strategy.
Configure the Totalizer block. Give a tag
name for the totalizer block.
See the next figure.
2 -21
MOD 30ML Display Guide
Display Basics
Figure 2 .16.
Totalizer Display for
Exercise …
3.
4.
5.
6.
2 -22
Select the Initial/Restart tab of the
Totoalizer block.
Select Run as the Initial mode as shown
in the next figure.
Specify an Analog input to totalize. Any
analog source may be connected to the
blocks ANALINP, or a fixed value can be
entered into Analog input Internal field on
the General tab.
Click on the OK button and close the
Totalizer block
This will be the initial mode for the totalizer.
It will start totalizing as soon as the
database is downloaded. Also note that the
default restart mode (mode upon instrument
power up) for the totalizer is Previous.
The totalizer will totalize this input.
MOD 30ML Display Guide
Display Basics
Figure 2 .17.
Totalizer Display for
Exercise …
Exercise:
Cont’d
7.
8.
9.
10.
11.
12.
13.
Action
From the System menu, place a DISP
block in the strategy.
Double-click to open the DISP block
Comment
In the Name field type a name such as
DispTOT
In the Description field type:
Display total steam flow
In the Display Tag field type STM TOT
Type DISPTAG in the Line 1 Initial Value
field
This identifies this block within the
database. It is NOT the display name.
This description is assigned by the user
In the second blank column of Line 2,
type Total
In order to use STM TOT as the tag name in
the operating display, it has to be positioned
in the Line 1 field. Using the default,
DISPTAG, will cause whatever is typed into
the Display Tag field to appear on Line 1.
This is the name that will be given to Input 1
when inputs are defined. When the
operating display appears, the value of
Input 1, or Total, will be shown on Line 2.
2 -23
MOD 30ML Display Guide
Display Basics
Figure 2 .18.
Display Block
General Menu Totalizer
14.
15.
16.
17.
18.
Figure 2 .19.
Display Block Input
Dialog Box Totalizer
Exercise: (cont’d)
2 -24
Select the Inputs tab.
Select the Add button in the Inputs menu
Give Input 1 the name: Total
Leave the Data type as Floating point.
In the Line Format field type: TotLine
Close the menu with the OK button
It is helpful to give the input a name that
corresponds to the value to be displayed.
This format will be defined in the next menu
The input appears on the Input List
MOD 30ML Display Guide
Display Basics
24.
25.
Action
Select the Formats tab, and select the
Add button
In the Name field, type: TotLine
In the Format Type field, use the pulldown menu to select Float 0.
Change the Entry Method field to None
using the pull-down menu.
Set the High Limit at 100000 by typing the
value in the High Limit field
In the Engineering Units field, type KLB.
Close the dialog box using OK
26.
Close the block using OK
19.
20.
21.
22.
23.
Comment
The Specify Format Data dialog box
appears
Type over the default entry FMT1
The value will show as a floating-point
number with no decimal places.
No operator data entry is required for this
format.
This should correspond to the high limit
in the Totalizer block
This represents “thousands of pounds”.
The format now appears on the formats
list.
Figure 2 .20.
Display Block
Formats - Totalizer
27.
Connect the TC output of the TOT block
to Input 1 (I1, Total) of the Display block.
TC
Figure 2 .21.
Block Connections
for displaying Total
28.
TC represents “Total Count” and will be
displayed on Line 2.
TOTAL
TOT
Add the Display tag STM TOT to the
Display List in the Display Interface Block
as shown below.
DISP
You may also wish to use this as your
display to appear on power-up.
2 -25
MOD 30ML Display Guide
Display Basics
Figure 2 .22.
Display Interface
Block – Display List
29.
30.
31.
2 -26
Click on OK to close the block.
Save and Compile the database.
Download the database to the controller.
MOD 30ML Display Guide
Display Basics
2.5
Using State Tables
In many applications it is useful to display more than one message in the same place. It is
also helpful to be able to re-assign keys for various functions, such as clearing totalizers,
advancing steps in a sequence or profile, turning a discrete device on or off, etc. The
State Tables allow the user to show actual text on the front panel, for ease of operation.
Associated with the State Table block is a file that contains the State Tables: one or more
‘tables’, each identified by a 1 – 8 character name, that contain a list of attribute values
and the associated mnemonic (text) strings to be displayed for each value. A default State
Table file is supplied in Visual Application Designer for a standard P,I,D controller
display. This may be used as a starting point for adding sequence text, device display
text, or key assignment text; or, you may create your own. The syntax for State Tables is
:
(tablename),(#chars),”(default)”
{
(n), “(TEXT1)”;
(n1), “(TEXT2)”;
(n2), “(TEXT3)”;
}
where:
(tablename) is the 8-character name of the table, assigned by the user. For ease of
reference this is often named the same as the mnemonic of the attribute to which text is
being assigned, for example, Opms for “output mode status”.
(#chars) is the longest number of characters to appear in the text
(default) is the string that should appear if the value does not correspond to the list
(n), (n1), (n2) are the values associated with the text
(TEXT1), (TEXT2), (TEXT3) are the text strings that will appear on the display
for each value.
An example of a state table for Output Mode is shown in Figure 18. Opms is the (userdefined) table name; the maximum number of characters to be displayed is three; if the
attribute state does not match anything specified in the table, ??? will appear on the
controller display. The numbers 0, 1, 3 and 5 are the numeric codes given in the
Database Reference Manual for the Output Mode attribute’s Manual, Automatic, Track
and Fault status.
Figure 2 .23.
Sample State Table
Opms,3,”???”
{
0, “MAN”;
1, “AUT”;
3, “TRK”;
5, “FLT”;
}
2 -27
MOD 30ML Display Guide
Display Basics
To determine correct values for an attribute refer to the Database Reference Manual for
the corresponding block. Additional examples of State Tables for specific applications
are shown later in the manual.
The State Table names are entered in the Display Format section of the Display Block
when the user wants to associate the text with the input.
In the Display Block, if a Display Format type of “State” is selected then an entry in the
Display State Table field is required. This will be the name the user has given the table
that relates to the particular attribute. In the above example, the user would enter Opms
in the Display State Table field.
If an Entry Method other than “None” is selected and a Display Format type of “State”
is selected, there must be a state table name entered in the Entry State Table. When a
state input value can be operator selected, the order in which each state name appears on
the display is based on the order in which the names appear in the Table. If an attribute’s
list of possible display states is the same as those for operator selection, then the Display
State Table and the Entry State Table names can be the same. There may be cases
where the operator may not be permitted to select every possible state. For example,
although display might indicate a PID’s Output Mode Status (OPMS) of “fault” the
operator should not be able to place the PID into a fault mode. In this case you must
make a separate Entry State Table that would not include fault as an option.
2.5.1 Exercise: Creating “Clear Totalizer” Keys using State Tables
The previous exercise showed how to create an indicating totalizer. This exercise adds to
that display, the ability to clear the totalizer from the front keyboard and have the totalizer
immediately begin again. The Totalizer strategy from the previous exercise is required to
complete the following actions.
Exercise: Using
State Tables
1.
2.
3.
4.
Type: clear in the Initial value field for
Line 6
5.
Select the Inputs tab and select the Add
button. See next figure.
Give a name Clear for this input and
change its data type to Discrete.
6.
2 -28
Action
Load the Indicating Totalizer strategy from
the previous exercise.
Open the display block.
Type “CLR” in the Line 5 Initial Value
field.
Comment
The quotation marks are REQUIRED and
indicate text. This will identify the Scroll
key as the Clear Totalizer key.
This is the name of Input 2 in the Input
List. We will add this input in the next
step.
This will activate the RESET input in the
Totalizer block, resetting the totalizer to
zero. It will immediately begin counting
again from zero. Remember that this is
case sensitive!
MOD 30ML Display Guide
Display Basics
Figure 2 .24.
Display Block Input
7.
8.
In the Line Format field, type: clear
Close the menu using the OK button
9.
Select the Formats tab and click on the
Add button. See next figure.
In the Name field type: clear
10.
11.
12.
13.
14.
15.
16.
Using the pull-down menu, change the
Display Format to State
The Entry Method is left at the default,
Enter Required
In the Display State Table field, type
CLEAR
In the Entry State Table field, type
CLEAR
Close the menu by clicking on the OK
button.
Close the Display block by clicking on the
OK button.
This format is defined in the next menu.
The input CLEAR appears on the Inputs
list
This name should be exactly the same
as that entered in Step 6 above
This causes a flashing ENT to appear
next to the key, which must be pressed
before the value is accepted. It also
automatically activates the UP and
DOWN arrows to scroll the bottom line
between entry options (to be defined in
the State Table).
This is the name that will be given to the
new State Table
The same state table will be used for
Display and Entry states.
2 -29
MOD 30ML Display Guide
Display Basics
Figure 2 .25.
Display Block
Formats – Clear
Totalizer
17.
Connect from Clear of the Display Block,
to the RESINP input of the TOT block
18.
19.
Close the loop compound.
At the top level of the strategy, open the
State Table (ST) block
Select the Tables tab
Scroll to the bottom of the State Table list.
Leave one line after the last entry and add
the following EXACTLY AS IT APPEARS
BELOW:
20.
21.
22.
clear, 3, “???”
{
1, “YES”;
0, “NO”;
}
23.
This seems as though it is backward, but
actions from the front panel are
connected in this manner.
The name of the state table is clear (this
was entered in the Format list of the
Display block; it is case sensitive).
The maximum number of characters to
be displayed is 3.
If the instrument firmware returns none of
the correct codes, ??? will be displayed.
When the arrow keys are pushed a count
of 0 or 1 is sent. If the count is 1, YES
will be displayed. If the count is 0, NO
will be displayed. The operator must
then press the flashing ENT key for YES
or NO to be accepted by the instrument.
Close the ST block using the OK button
When the strategy is compiled and downloaded, the totalizer immediately begins to count.
When the UP or DOWN arrow is pressed from the STM TOT display, YES appears on
Line 6. Pressing the flashing ENT key clears the totalizer and the count immediately
begins again.
2 -30
MOD 30ML Display Guide
Display Basics
Notes:
2 -31
MOD 30ML Display Guide
Display Basics
Notes:
2 -32
MOD 30ML Display Guide
Display Scripts
3
3.1
Display Scripts
General
Display Scripts are used to:
•
create key macros to change things other than the bottom line
•
change how display resources are used, e.g. access custom tuning lists or
“mutliplex” variables displayed in one place
•
manipulate data before displaying, e.g. calculate compensated measurement for
display only
For PID loops, if you are not changing the default use of the Manual, Auto, R/L or
Scroll keys and you are not re-assigning display fields while a display is being viewed,
you do not need display scripts.
Display scripts only execute when a display block is loaded on the front of the instrument.
If there are multiple Display blocks, only script in the active display will be executed
every 50 milliseconds. Complex scripts can require more processor resource time.
3.1.1 Using External Script Files
Some users prefer editors that assign line numbers to aid in script de-bugging. In the
Scripts tab of the Display Block is a field with a check box labeled “Use External File”.
Checking this box and entering a file name permits use of an external file developed with
an external text editor.
Remember to keep external files in the same directory as that of the strategy. The file
name field does not permit entry of file path information. If you transfer a strategy
using external files, be sure to transfer the external files as well.
3.1.2 Making External Files Part Of The Display Block
It is possible to create files in an external editor, then make them part of the display block
simply by opening the file, copying the script, and pasting it into the Script window in the
Display Block.
Using the reverse procedure, an internal script may be copied into an external file.
3-1
MOD 30ML Display Guide
Display Scripts
3.1.3 Using A Common Script File For Multiple Display Blocks
If using several Display blocks which all operate in the same way, i.e., key functions and
display resource assignments are the same, a common display script file can be
constructed that is shared by several Display Blocks. A benefit to a common display
script file for multiple Display Blocks is that if a display script change is to be made it is
made in one file only.
To create a common display script use the process for creating an external file as outlined
above in Using External Script Files. In each of the Display blocks check the “Use
External File” box and enter the script file name in the appropriate field.
3-2
MOD 30ML Display Guide
Display Scripts
3.2
The Display Script Language
The display script language is used to develop custom displays or to modify displays that
are found in the Compound library. A Display Script is a file associated with each
Display Block, which consists of Display States, Event Scripts and Statements and uses
the following general format:
Figure 3 .1.
Display Script
General Format
DisplayStateN:
{
EventScript1:
{
Statement1;
…
StatementX;
}
…
EventScriptZ;
{
Statement1;
…
StatementY;
}
}
The open bracket ({) is used to identify that all script between it and its associated closing
bracket (}) are part of that particular display state or event script. Spacing between lines
and indenting are not critical in entering display scripts; indenting and spacing is done
only to help with organization. However, correct punctuation is critical to ensure proper
execution of display scripts. Most syntax and punctuation errors are detected and
identified by block name and line number at compile time.
3.2.1 Display States
A Display State contains the various events and their associated script, which make the
display operate as the user wishes. Although up to 256 different states can be defined,
under most circumstances only one Display State will be used per Display block.
When using one Display State, DEFAULTS should be used as the Display State name.
This ensures the Display block will automatically find this state and execute its script.
Display state names are not case sensitive, however they must be correctly spelled. If you
elect to use a name other than DEFAULTS you are required to enter this name in the
Display State field located on the first page of the Display block.
A symptom of not spelling the Display State name correctly or forgetting to enter a
custom state name in the Display State field is that no action occurs when a defined
key is pressed.
An example of using multiple Display States is assigning multiple functions to a common
event within a Display block. A key event (that is, what happens when a key is pressed,
held or released) cannot be defined twice within one Display State, so additional states are
3-3
MOD 30ML Display Guide
Display Scripts
defined. For example, pressing the Scroll key may be used to change what is displayed on
Line 6 most of the time, but under a particular circumstance might also be used to scroll
through a custom menu permitting an operator to turn a valve on or off. For this example
two Display States would be required along with an event that would cause the Display
State to change. In each Display State the Scroll key is defined for a different function.
The command used to change Display States is DSPSTATE = xxxxx, where xxxxx is the
name of the target Display state. The Display block manages multiple Display States by
assigning a count value to each state name. DEFAULTS is automatically assigned the
value 0 (zero). Each new state name is assigned a subsequent value. Based on this,
changing Display States can be done by using the Display State value in place of the
actual Display State name. Example: DSPSTATE = 1.
When developing a Display Script, start with the state name followed by a colon, for
example, DEFAULTS:
3.2.2 Event Scripts
Each Display State is made up of Event Scripts which cause a particular section of script
to be executed, for example, causing an action when the Scroll key is pressed. There are
27 events pre-defined in MOD 30ML. Twenty-four events are defined as key events and
three are defined as display events. Key and display event names are listed in Table 3-1.
A key event occurs when any of the eight keys on the front panel is PRESSED, HELD or
RELEASED. This is similar to the “make” and “break” statements used in other keyboard
applications. For a key to be detected as RELEASED or HELD it must first be detected as
having been PRESSED. Therefore if a key has been given both a PRESSED and a
RELEASED event, the PRESSED function is processed first and then the RELEASED
function when the key has been released. For a key to be detected as HELD the key must
be held in for a minimum of one second.
The three display events are ENTRY, EXIT and ACTIVE. ENTRY and EXIT are run on
entry to and exit from a display state. ACTIVE is run continuously while in a given state.
Therefore, for most applications, which use only one Display State, only the ACTIVE
event script is used.
When a Display block, more specifically a Display State, is executed for the first time
script defined under the ENTRY event will be executed one time. Likewise, script
defined under the EXIT event is executed once when leaving the display (or Display
State). Script defined under the ACTIVE event will be executed each time the Display
block is executed.
When defining an event, type the event name followed by a colon, for example,
SCROLL_PRESSED:
Table 3 .1
3-4
MOD 30ML Display Guide
Display Scripts
Pre-Defined Events
Key Event
ALARM_PRESSED
TAG_PRESSED
MANUAL_PRESSED
AUTO_PRESSED
RL_PRESSED
SCROLL_PRESSED
UP_PRESSED
DOWN_PRESSED
ALARM_HELD
TAG_HELD
MANUAL_HELD
AUTO_HELD
RL_HELD
SCROLL_HELD
UP_HELD
DOWN_HELD
ALARM_RELEASED
TAG_RELEASED
MANUAL_RELEASED
AUTO_RELEASED
RL_RELEASED
SCROLL_RELEASED
UP_RELEASED
DOWN_RELEASED
Display Event
ENTRY
ACTIVE
EXIT
When an Event occurs, the associated Event Script is executed. The event script is made
up of one or more Assignment Statements, IF Statements, CASE Statements, TUNE
statements and RETURN statements.
3.2.3 Assignment Statements
The assignment statement assigns a value to a given target. The target of an assignment
can be an input name, a local attribute name, or one of several display resource names.
All assignment statements have an expression as their right hand side. The target will be
assigned the value of that expression. If the target is one of the display resource names
having the suffice ‘.SRC’, the expression must be just a source name (an input name or
local attribute name). The target will be continuously updated with the value associated
with that name.
Display Resources are the six alphanumeric lines, three bargraphs, twelve intensified
segments, LED, Beeper (annuncicator) and up/down arrows. They can be assigned a
constant value, meaning they will not change dynamically during operation, or a variable,
in which case a source must be defined. The resource names are pre-defined and appear in
Table 3-2.
3-5
MOD 30ML Display Guide
Display Scripts
Table 3 .2
Display Resource
Names
Constant:
#RBAR
#RISEG1
#RISEG2
#RISEG3
#RISEG4
#MBAR
#MISEG1
#MISEG2
#MISEG3
#MISEG4
#LBAR
#LISEG1
#LISEG2
#LISEG3
#LISEG4
#LINE1
#LINE2
#LINE3
#LINE4
#LINE5
#LED
#BEEPER
#UPDN
#LINE6
Variable:
#RBAR.SRC #RISEG1.SRC
#RISEG2.SRC #RISEG3.SRC #RISEG4.SRC
#MBAR.SRC #MISEG1.SRC
#MISEG2.SRC #MISEG3.SRC #MISEG4.SRC
#LBAR.SRC #LISEG1SRC
#LISEG2.SRC
#LISEG3.SRC
#LISEG4.SRC
#LINE1.SRC #LINE2.SRC
#LINE3.SRC
#LINE4.SRC
#LINE5.SRC
#LED.SRC
#UPDN.SRC
#BEEPER.SRC
#LINE6.SRC
#LINE1, #LINE2, #LINE6 can be assigned data of any type.
#LINE3, #LINE4, #LINE5 can be assigned data of any type except date.
#LBAR - #LISEG4, #MBAR - #MISEG4, #RBAR - #RISEG4 can only be assigned data
in the range 0 to 50. The data can be any type except data, hex or ASCII.
#LED and #BEEPER can only be assigned values 0 (off), 1 (on) or 8 (system use). The
data can be any type except date, hex or ASCII.
When using a value greater than 0 but less than 1, a 0 (zero) must precede the decimal
point. Example: 0.35.
An example of using an input name as the target of an assignment is changing Output
Mode from the front panel. Figure 3-2 shows a script which causes display Line 5 to read
OP, Line 6 to show the actual output value, and Output Mode to change to Manual when
the MAN key is pressed. This event script is part of the standard display script provided
with Visual Application Designer.
3-6
MOD 30ML Display Guide
Display Scripts
Figure 3 .2.
Example: Display
Resource
Assignment
DEFAULTS:
{
MANUAL_PRESSED:
{
#LINE5 = “OP”;
#LINE6.SRC = OP;
OPMS = 0;
}
(Display State name)
(When manual key is pressed, then)
(Line 5 reads OP)
(Line 6 source is the Display Block Input
called “OP”)
(Output Mode is changed to 0 (manual))
In the above example, two inputs to the Display Block are the output (OP) attribute and
the output mode status (OPMS) attributes of a PID block. The value shown on Line 6 will
change with the actual output value. The value 0 (zero) is written to the OPMS attribute
of the PID block by the Display Block.
Note the open and closed brackets around the resource assignment script. This tells the
block that all script within these brackets belongs to the MANUAL_PRESSED event.
Also notice that semicolons follow each of the resource assignments.
When a key action at the front panel is used to cause a change in an attribute in an
algorithm block, the connection appears to work “backward”. That is, the new value
is written to a Display Block input, even though it acts as an output to the algorithm
block. The connection is always from the algorithm block to the Display Block, as
shown in Figure 3-3.
Figure 3 .3.
Sample connection
for writing from front
panel
PID
OPMS
I1
DISP
The Beeper (annunciator), LED and Up/Down display resources are normally defined by
the system. Table 3-3 defines expected display results based on values assigned to each of
these display resources. As can be seen in the table a display resource normally defined
by the system can be returned to the system by using a value as defined.
3-7
MOD 30ML Display Guide
Display Scripts
Table 3 .3
System Resources
Display Definition
Display Resource Name
Assigned Value and Displayed Result
Beeper
0 = Off
1 = On
3 - 65535 = Return to system definition
0 = Off
1 = On
3 - 65535 = Return to system definition
0 = No display
1 = Up arrow
2 = Down arrow
3 = slash
4 = Up arrow and slash
5 = down arrow and slash
6 = Up arrow, down arrow and slash
7 - 65535 = Return to system definition
LED
Up/Down Arrows
3.2.4 IF Statements
IF-THEN-ELSE statements are used in display scripts based on key or display events.
The general format of the IF statement is:
IF-THEN-ELSE statement:
IF expression THEN
Statement 1;
ELSE
Statement 2;
IF-THEN statement:
IF expression THEN
Statement 1;
When an IF statement is used, the expression is evaluated. If it is true (that is, the value is
non-zero), statement1 is executed. If it is false (zero) and there is an ELSE, statement2 is
executed. If it is false (zero) and there is not an ELSE, execution continues with the
statement following the IF statement.
ELSE statements can also contain nested IF-THEN or IF-THEN-ELSE statements.
Because ELSE is optional, there is an ambiguity when an ELSE is omitted from a nested
IF sequence. This is resolved by associating the ELSE with the closest unmatched IF. In
the example on the left, the ELSE is matched with the second IF. In the example on the
right, braces are used to force the ELSE to be associated with the first IF.
3-8
MOD 30ML Display Guide
Display Scripts
IF I1 > 0 THEN
IF I2 > I3 THEN
I2 + 1
ELSE
I3 + 1
IF I1 > 0 THEN
{
IF I2 > I3 THEN
I2 + 1
}
ELSE
I3 + 1
In the example below, an IF-THEN-ELSE statement is combined with an assignment
statement to toggle the value of a local display input, named SCRLCNT, between 1 and 0
each time the Scroll key is pressed:
SCROLL_PRESSED:
{
IF SCRLCNT >= 1 THEN
SCRLCNT = 0;
ELSE
SCRLCNT = SCRLCNT + 1;
3.2.5 CASE Statements
The CASE statement presents a list of labels and associated statements. The value of the
expression is compared with these labels. If a match is found, the associated statements
are executed. If no match is found, the default statements are executed. The default case
is optional – if it is not present and no other match is found, no statements are executed.
The general format of the CASE statement is:
CASE expression OF
{
Label1:
Statement1;
Label2:
Statement2;
.
.
.
LabelN:
StatemetnN;
DEFAULT:
StatementM;
}
The cases can be listed in any order. The integer labels must be unique and must be in the
range of 0 to 65535. Up to 255 cases may be present, not including the default case. If
the expression evaluates to a value outside the range 0 to 65535, the default case is
executed, if present.
The BREAK statement causes immediate exit from a CASE statement. As a general rule,
the last statement for each case should be a BREAK statement, although it is not required.
After the statements associated with the case are done, execution continues with the
statements for the next case unless a BREAK statement is present to prevent this.
3-9
MOD 30ML Display Guide
Display Scripts
The example in Figure 3-4 combines an assignment statement, an IF-THEN-ELSE
statement and a CASE statement to change what is displayed on Line 5 and Line 6 of the
display, when the Scroll key is pressed. This is part of the standard Display Script
supplied with Visual Application Designer.
Figure 3 .4.
Example:
Changing the
display based on
scroll key
manipulation
SCROLL_PRESSED:
{
IF SCRLCNT >= 1 THEN
SCRLCNT = 0;
ELSE
SCRLCNT = SCRLCNT + 1;
CASE SCRLCNT OF
{
0:
#LINE5 = “OP”;
#LINE6.SRC = OP;
BREAK;
1:
#LINE5 = “SP”;
#LINE6,SRC = SP;
BREAK;
}
}
(When the scroll key is pressed)
(If the input “SCRLCNT” is greater than or
equal to 1, then set it to zero;
else
add 1 to the input SCRLCNT)
(perform the following based on the value
of SCRLCNT):
(If the value is zero:
display the characters OP on Line 5;
display the value of the input OP on Line
6)
(If the value is one:
display the characters SP on Line 5;
display the value of the input SP on Line
6)
Note that the outermost set of brackets encloses the IF-THEN-ELSE statement and the
CASE statement, and associates the entire group with the assignment statement
SCROLL_PRESSED.
3.2.6 TUNE Statement
The TUNE statement calls the display for the Tune List block associated with that
particular Display Block, to the front panel. Tune List blocks are used to provide operator
access to tunable parameters. TUNE statements can only be invoked with an event,
typically a key event. A common method of calling the Tune List is to hold down the
Scroll key. The required script for this appears in Figure 3-5, and is also included in the
standard Display Script supplied with Visual Application Designer.
Figure 3 .5.
Example: Scripting
the SCROLL key to
call the TUNE
display
3 - 10
SCROLL_HELD:
{
TUNE;
}
(When the Scroll key is held down, then
Call the Tune List display.)
MOD 30ML Display Guide
Display Scripts
3.2.7 RETURN Statement
The RETURN statement indicates immediate exit from an event script. This prevents the
script from performing any additional functions, including pre-defined system level
functions. In other words, RETURN statements are used to keep the instrument operating
system from taking over a key event that is normally defined by the system, when a
custom script has been developed for that key. RETURN statements would be used at the
end of key event scripts for the Alarm, Tag, Up and Down keys. If the RETURN
statement is not used at the end of a key event definition, which is normally defined by the
system (such as Alarm), the custom function will be processed and then the systemdefined functions for that key will happen as well.
A symptom of this is the Alarm key bringing up active alarms after it has performed its
special function.
Key events that are normally system defined can be returned back to the system by
making the RETURN statement conditional.
3.2.8 Annotating Scripts
Comments or notes may be inserted in a script file for reference. Comments must start
with a forward slash followed by an asterisk ( /* ), and end with an asterisk followed by a
forward slash ( */ ). Text enclosed within these symbols is not executed as script.
This method can also be used to temporarily disable sections of script during
troubleshooting.
Figure 3 .6.
Example of
annotated script
SCROLL_PRESSED:
{
IF SCRLCNT >= 1 THEN
SCRLCNT = 0;
ELSE
SCRLCNT = SCRLCNT + 1;
}
/* when scroll key is pressed */
/* if the input SCRLCNT is >=1 */
/* set SCRLCNT to zero */
/* otherwise add 1 to SCRLCNT
*/
3 - 11
MOD 30ML Display Guide
Display Scripts
Notes:
3 - 12
MOD 30ML Display Guide
Special Effects
4
Special Effects
In addition to creating loop displays, sequence displays and other operator displays, there
are special effects that can easily be created, which emulate many operator terminal units.
In many cases it may be possible to eliminate a separate operator interface device.
4.1
Marquee Messages
Lines 1, 2 and 6 on the display may be used for “marquee” type messages of up to 15
characters. This feature can be combined with Process Alarms and display scripts to
provide context-sensitive operator instructions. For example, to post a message that reads
“TURN OFF PUMP”, designate one of the Inputs in the Display Block as Data Type
ASCII. Then, in the Internal value field type the message to be displayed, in this case
TURN OFF PUMP
Although it is possible to use lower case letters in the display, it is not recommended
for reasons of legibility.
To display the message on Line 6:
1.
Open the Inputs tab of the Display block and add an input as shown in the next figure.
Type the text to be displayed in the Initial data field. No Display Formats need to be
defined for this type of display.
Figure 4 .1.
Menu entries for
marquee messages
2.
Open the Display tab and type the input name for Line 6. The next figure shows the
Specify Input menu and the necessary entries.
4-1
MOD 30ML Display Guide
Special Effects
Figure 4 .2.
Menu entries for
marquee messages
4.2
Remote Display Input
Normally, access to the different displays in the display list is controlled locally through
the TAG key. However, the Display Interface (DIF) Block has an attribute called Remote
Display Input. This is used to call up a specific display and normally prevents manual
scrolling through any other display on the front face. It is activated by a count variable
input that represents an index number associated with the order of display tags listed in the
Display List. Index number 1 is for the first display tag listed, index number 2 is for the
second display, etc.; index number 0 is reserved for the Device Display.
When a remote display number is present and the value is less than or equal to the number
of displays in the list, front face navigation using the TAG key is disabled and the remote
input selects the display. If the remote display number is 0 the Device Display appears,
and the TAG key must be used to return to the user displays.
This feature is useful for causing a display to appear based on a discrete event, for
example, a specific operating display appears if a critical alarm occurs.
4-2
MOD 30ML Display Guide
Special Effects
4.3
Auto-Scrolling Displays
The MOD 30ML can scroll automatically and continuously through all displays in the
Display List, with the option of manual intervention to stop and re-start the scroll action.
If the operator must be able to stop the scrolling in order to view or operation the display,
it is essential to choose a key that is NOT being used by the display for any other purpose.
For example, a standard PID display uses the MAN, AUTO and SCROLL keys for
operating the loop. If there is no remote setpoint, the R/L key is a good choice for
operating the scrolling action.
Although Display Blocks can be placed outside Loop Compounds, in this case they must
be placed within a Loop Compound in order to control the rate at which they scroll. The
Scan Group in the Interface Block must be set to allow a reasonable viewing period of
each display before changing to the next one. If the display blocks are in Group 1 and the
Group 1 Scan Rate is set to 2 seconds, the displays will scroll at that rate.
An example of scrolling displays with manual stop/start is given in Chapter 5.
4-3
MOD 30ML Display Guide
Special Effects
4.4
Changing System Key Definition
The following key functions are defined by the instrument operating system:
•
Alarm pressed – calls PAD and diagnostic alarm displays
•
TAG pressed – calls the next display in the Display List of the Display Interface
Block
•
UP or DOWN arrow pressed – ramping of value on Line 6, if that value has been
designated as operator adjustable in the Display Format. Making the attribute
operator adjustable in the Display Format menu causes the Up/Down arrows to
light on the front display when that variable is selected via the Scroll key. This
also automatically causes the appearance and operation of the FAST and SLOW
ramp functions.
•
TAG held – causes the DEVICE display to appear and allows access to
configuration displays (based on password protection).
Most applications have no need to re-assign these key functions, however, there may be
special cases where this is required; for example, emulating the action of a previously
installed instrument.
If a custom function is defined for any one of these keys, all normal functions of that
key are ‘void’ and the user must define actions for each one. For example, taking
control of the Up and Down keys for purposes other than ramping the variable on Line
6 has several ramifications. First, just assigning an attribute to line 6 no longer
necessarily makes it operator adjustable. Also, each attribute that is to be operator
adjustable now must have an Up and Down key action defined for it. If multi-speed
ramping is desired, this must now be defined in scripts.
An example of re-defining system keys is given in Chapter 5, Example 4: Variable
Ramping Using Two Keys.
4.5
Using Multiple Display States
In most applications there is need for only one display state name within a display script;
usually, this is left at “DEFAULT”. However, it is possible to create a display which has
different characteristics based on current conditions. The actual appearance or operation
of attributes or keys on the front panel for a given tag may be different on ENTRY, EXIT,
or when a discrete event takes place.
A good example of using multiple Display States in a single Display Script is autoscrolling displays. When only a few displays are needed and there are not many inputs, it
may be more efficient to use different states within one Display Block script rather than
create individual Display Blocks for each view.
4-4
MOD 30ML Display Guide
Application Examples
5
Application Examples
This section contains several examples of script definitions. In many cases one of these
examples may be exactly what is required for the application. Any of the examples can be
modified with custom script. It is usually easier to start with a known good script and
modify it than it is to start from scratch.
Each example of script is followed with printouts of the Display Block inputs and formats.
Where applicable, information that must be added to the State Table file is also provided.
Example No. Description
Page
1
Basic PID Display............................................................
5-2
2
Adding Remote/Local Switching .....................................
5-8
3
PID and Totalizer Operation on a Single Display ...........
5-9
4
Variable Ramping with Two Keys ...................................
5-13
5
Time-Based Variable Ramping .......................................
5-18
6
Multiple Tune Lists Assigned To One Display Block ......
5-23
7
Start and Stop a Discrete Device....................................
5-28
8
Recipe Selection .............................................................
5-31
9
Sequence Operation & Control ......................................
5-35
10
Auto-Scrolling Displays ...................................................
5-40
5-1
MOD 30ML Display Guide
Application Examples
5.1
Example 1: Basic PID Display
This display definition is contained in the pre-defined compound ML-PID (see Chapter
2). The script defines the functions of the Auto, Manual and Scroll keys. All other keys
(Tag, Alarm, Up/Down Arrows) retain their standard functions as described in Chapter 4.
Holding down the Scroll key calls up the Tune List parameters on Lines 5 and 6. Most of
this script is discussed in detail in Chapter 3.
All other display elements are assigned using the fill-in-the-blank menus as shown. The
State Tables required for this application are already included in the default State Table
file which is supplied with Visual Application Designer.
Figure 5 .1.
Defaults display
state script
DEFAULTS:
{
Display state
MANUAL_PRESSED:
name
{
IF OPMS != 3 THEN
{
Causes the control mode to change to
OPMS = 0;
manual (0) when the MAN key is
#LINE5
= " OP";
pressed unless current mode is TRACK
#LINE6.SRC =
OP;
(3). Displays OP on Line 5 and shows
}
PID block output value on Line 6.
}
AUTO_PRESSED:
{
Causes the control mode to
IF OPMS != 3 THEN
change to automatic (1) when the
{
AUTO key is pressed unless
OPMS = 1;
current mode is TRACK (3).
#LINE5
= " OP";
#LINE6.SRC =
OP;
}
}
SCROLL_PRESSED:
{
IF SCRLCNT >= 1 THEN
SCRLCNT = 0;
ELSE SCRLCNT=SCRLCNT + 1;
CASE SCRLCNT OF
{
0:
#LINE5 ="OP";
#LINE6.SRC= OP;
Toggles line 5 and 6
BREAK;
displays between Output
1:
and Setpoint
#LINE5 = "SP";
#LINE6.SRC = SP;
BREAK;
}
}
SCROLL_HELD:
Calls the Tune List
{
associated with this
TUNE;
}
display and makes the
}
parameters available
to the front face
5-2
MOD 30ML Display Guide
Application Examples
The next figure shows the Display Block Inputs for this display.
Figure 5 .2.
Display Block
Inputs, Basic PID
Display
The next figure shows the Display Formats for process, setpoint and output as digital
readouts (pvL, spL, opL), process/setpoint and output as bargraphs (pvB, opB), and
setpoint mode and output mode in conjuction with State Tables. The Setpoint Line format
(spLine) has an “Edit When” expression so that the setpoint can only be changed when the
mode is Local. The Output Line format (opLine) has an “Edit when” expression so that
the output can only be changed when the controller mode is Manual.
5-3
MOD 30ML Display Guide
Application Examples
Figure 5 .3.
Display Block
Formats, Basic PID
Display
5-4
MOD 30ML Display Guide
Application Examples
The next figure illustrates the menu entries in the Display menu of the Display Block. No
highlighted segments are used in this example.
Figure 5 .4.
Display and Bar
Menus, Basic PID
Display
Enter in
Display List
PID-100 appears
on Line 1
The next figure lists the inputs for the Tuning displays. The Line 1 and Line 2 display
fields allow the user to type in a label that will be displayed on Lines 1 and/or 2 of the
front display, when that tuning parameter appears. Or, the tag name may be used.
5-5
MOD 30ML Display Guide
Application Examples
Figure 5 .5.
Tune List Inputs,
Basic PID Display
Finally, the formats assigned to the Tuning parameters are shown in the next figure. The
“T” in the Display State Table name was used by the author to designate Tuneable
parameters in the State Tables. This is also how they are designated in the default State
Table List provided with Visual Application Designer.
Figure 5 .6.
Tune List Formats,
Basic PID Display
Operator must
press flashing
“ENT” key for value
to be accepted
The connections between the PID block, Display Block and Tune List Block for this
particular example are illustrated in the next figure.
5-6
MOD 30ML Display Guide
Application Examples
Figure 5 .7.
PVI
Block Connections,
Basic PID Display
SP
OP
OPMS
SPMS
PID
I1
I2
I3
I8
DISP
I9
LISTIN
LISTOUT
TL
5-7
MOD 30ML Display Guide
Application Examples
5.2
Example 2: Adding Remote/Local Setpoint Switching
The PID100 Smart Symbol assumes the PID block uses local setpoint only, so no
definition is needed for the R/L key. But many applications use a combination of Local
and Remote setpoint and the operator must be able to switch between them from the front
panel. This example adds the R/L key function to the Basic PID Display in Example 1.
All of the script and menus are identical to those given in Example 1, with a small
addition to the Display Script shown in the Figure 5.1. The script to be added is shown in
the next figure. No new inputs, menu entries or tuning parameters are added. Remember
that text inside the symbols /* … */ is for remarks only.
Figure 5 .8.
Script for R/L key
function
RL_PRESSED:
*/
{
IF SPMS == 0 THEN
*/
SPMS = 1;
ELSE
SPMS = 0;
*/
}
/* when R/L key is pressed, then
/* if setpoint mode is local, then
/* change to remote; */
/* otherwise */
/* change setpoint mode to local
It does not matter where in the script this is added, however, be sure that it is NOT
nested within any other event script.
5-8
MOD 30ML Display Guide
Application Examples
5.3
Example 3: PID & Totalizer Operation on a Single Display
In this example, one Tag display is used for PID loop operation and display/operation of
an indicating totalizer. The Totalizer value and commands appear only when requested.
This is the script used for the compound PIDTOT1 included in Visual Application
Designer’s Project Gallery.
In addition to changing the Output and Setpoint values on Line 6, the Scroll key is used to
display total value and to activate the Totalizer commands: RUN, HOLD, RESET, STOP
and EXIT.
The complete script for this example is shown in the next figure. Much of it is identical to
the first example. Four new inputs and two new formats must be added to those shown in
Example 1, and two new State Tables added to the State Table file.
Figure 5 .9.
Script for PID and
Totalizer Operation
DEFAULTS:
{
MANUAL_PRESSED:
{
IF OPMS != 3 THEN
{
OPMS = 0;
#LINE5
= " OP";
#LINE6.SRC =
OP;
}
}
Changes control mode to MANUAL
unless mode is already TRACK.
Displays output value on Line 6.
AUTO_PRESSED:
{
IF OPMS != 3 THEN
OPMS = 1;
}
SCROLL_PRESSED:
{
#UPDN = 7;
IF SCRLCNT >= 2 THEN
SCRLCNT = 0;
ELSE SCRLCNT = SCRLCNT + 1;
CASE SCRLCNT OF
{
0:
#LINE5
= " OP";
#LINE6.SRC =
OP;
BREAK;
1:
#LINE5
= " SP";
#LINE6.SRC =
SP;
BREAK;
2:
#LINE5
= "TOT";
#UPDN
= 1;
#LINE6.SRC = TOTAL;
BREAK;
}
}
UP_PRESSED:
Change control mode to AUTO
unless mode is already TRACK
Arrow keys are under ‘system’
control
Displays TOT
on Line 5
Causes UP arrow to appear
Current total appears on Line 6
5-9
MOD 30ML Display Guide
Application Examples
{
}
IF SCRLCNT == 2 THEN
#LINE6.SRC = ACTION;
#UPDN = 7;
If the value of SCRLCNT is 2 then
assign a count input called ACTION to
line 6. This count is displayed as a state
value and shows the totalizer
commands of RESET, STOP, RUN,
HOLD and EXIT.
ACTIVE:
Arrow keys returned to “system”
{
control after operation
IF ACTION && !DELTA THEN
{
CMDINP = ACTION;
If value of ACTION is not 0 (EXIT), and
DELTA = 1;
value of DELTA is 0, then set CMDINP
}
equal to ACTION. CMDINP is
IF DELTA THEN
connected to the Command input of the
{
TOT block. Set input DELTA to 1.
ACTION = 0;
DELTA = 0;
#LINE5 = "TOT";
#LINE6.SRC = TOTAL;
#UPDN = 1;
}
}
Causes “UP” arrow to appear
SCROLL_HELD :
{
TUNE;
}
}
The next figure shows the two State Tables that must be added to the State Tables file in
the State Block. It does not matter where the tables are added; however, be sure not to
embed them within an existing State Table. It is usually best to add State Tables to the
end of the file.
Figure 5 .10.
State Tables added
to ST Block – PID
and Totalizer
5 - 10
ACTIOND, 8,
{
0, "EXIT";
}
"????????"
ACTIONE, 8,
{
5, "EXIT";
1, "RESET";
2, "STOP";
3, "RUN";
4, "HOLD";
}
"????????"
Display state table. “D” designates Display.
State table for operator entry. “E” designates Entry.
MOD 30ML Display Guide
Application Examples
The next figure illustrates the new Display Inputs that are added for this example.
Figure 5 .11.
Display Inputs, PID
and Totalizer
Two new formats are added to the formats shown in Example 1. These are shown in the
next figure. They do not require any “Edit When” statements.
5 - 11
MOD 30ML Display Guide
Application Examples
Figure 5 .12.
Display Formats,
PID and Totalizer
New state tables added
to ST Block
5 - 12
MOD 30ML Display Guide
Application Examples
5.4
Example 4: Variable Ramping with Two Keys
The standard method of changing a variable on Line 6 is to press either the UP or DOWN
arrow, use the FAST / SLOW keys to select the digit to be changed, then use the UP /
DOWN arrows to make the change.
Some operators may prefer a two-key operation to change the value of setpoint, output or
other parameters. In this example , the operator holds down the arrow key for the desired
direction of change, and presses the opposite direction key to move the cursor to the left
(e.g. holding down the UP key and pressing the DOWN key twice increments the second
digit to the left).
The TAG and Alarm keys function as they are defined by the operating system. Because
the UP / DOWN keys normally interact with the SCROLL, AUT and MAN keys, the
script for these keys must also be re-defined.
Four new Display Inputs are required in addition to those shown in Example 1. They are:
•
DOWNHLD - identifies that the down key is being held
•
UPHLD - identifies that the up key is being held
•
DWNCOUNT – used to count the number of times the down key is pressed and
determine which digit is changing
•
UPCOUNT – used to count the number of times the up key is pressed and
determines which digit is changing.
When defining a script for the UP and DOWN keys, a separate IF-THEN-ELSE statement
is needed for each variable to be manipulated. This can cause the script to be lengthy if
variables other than Setpoint and Output are involved. The ramping scripts are contained
in a Display State called “ACTIVE”, which is executed every 50 milliseconds. The
imcrement values, therefore, are actually multplied by 20, giving a ramp speed of 2 counts
per second.
Note that all timer values are derived from the 50ms execution time.
Remember that the values for the UP/DOWN key resource (#UPDN) assignments are:
0 = No display
1 = Up arrow
2 = Down arrow
3 = slash
4 = Up arrow and slash
5 = down arrow and slash
6 = Up arrow, down arrow and slash
7 - 65535 = Return to system definition
No new formats are needed, and the default State Table file is used.
5 - 13
MOD 30ML Display Guide
Application Examples
Figure 5 .13.
Script for Two-Key
Ramping
DEFAULTS:
{
MANUAL_PRESSED:
{
IF OPMS != 3 THEN
{
OPMS = 0;
#LINE5
= " OP";
#LINE6.SRC =
OP;
SCRLCNT = 0;
}
}
AUTO_PRESSED:
{
IF OPMS != 3 THEN
OPMS = 1;
IF SCRLCNT == 0 THEN
#UPDN = 0;
}
Change controller mode to manual when MAN
key is pressed unless mode is TRACK. Force
Line 6 to display Output value.
Change controller mode to automatic when
AUT key is pressed, unless mode is TRACK.
Do not display the UP or
DOWN arrows
SCROLL_PRESSED:
{
IF SCRLCNT >= 1 THEN
Controls Line 5
SCRLCNT = 0;
and 6 display
ELSE SCRLCNT = SCRLCNT + 1;
CASE SCRLCNT OF
{
0:
#LINE5 ="OP";
#LINE6.SRC= OP;
IF OPMS == 0 THEN
Return UP / DOWN arrow
#UPDN = 7;
functions to default (system)
BREAK;
1:
#LINE5 = "SP";
#LINE6.SRC = SP;
#UPDN = 7;
BREAK;
}
}
SCROLL_HELD:
{
TUNE;
}
Display Tuning variables when
Scroll Key held
/* Execute every 50 ms: */
ACTIVE:
{
IF OPMS
#UPDN
IF OPMS
#UPDN
5 - 14
== 1 && SCRLCNT == 0 THEN
= 0;
== 0 && SCRLCNT == 0 THEN
= 7;
Turn off UP/DOWN arrows if
control mode is AUTO and
SCRLCNT is 0
Turn the up/down arrows over to
the system if the control mode is
MAN and SCRLCNT is 0
MOD 30ML Display Guide
Application Examples
Script for Two-Key
Ramping
(continued)
/* Cause UP ramping of setpoint or output: */
IF UPHLD && OPMS == 0 &&
OP = OP + 0.01;
ELSE IF UPHLD && OPMS ==
THEN
OP = OP + 0.1;
ELSE IF UPHLD && OPMS ==
THEN
OP = OP + 1;
ELSE IF UPHLD && SCRLCNT
SP = SP + 0.01;
ELSE IF UPHLD && SCRLCNT
SP = SP + 0.1;
ELSE IF UPHLD && SCRLCNT
SP = SP + 1;
SCRLCNT == 0 && DWNCOUNT == 0 THEN
0 && SCRLCNT == 0 && DWNCOUNT == 1
0 && SCRLCNT == 0 && DWNCOUNT == 2
== 1 && DWNCOUNT == 0 THEN
== 1 && DWNCOUNT == 1 THEN
== 1 && DWNCOUNT == 2 THEN
/* Cause DOWN ramping of setpoint or output: */
IF DWNHLD && OPMS
OP = OP - 0.01;
ELSE IF DWNHLD &&
THEN
OP = OP - 0.1;
ELSE IF DWNHLD &&
THEN
OP = OP - 1;
ELSE IF DWNHLD &&
SP = SP - 0.01;
ELSE IF DWNHLD &&
SP = SP - 0.1;
ELSE IF DWNHLD &&
SP = SP - 1;
}
== 0 && SCRLCNT == 0 && UPCOUNT == 0 THEN
OPMS == 0 && SCRLCNT == 0 && UPCOUNT == 1
OPMS == 0 && SCRLCNT == 0 && UPCOUNT == 2
SCRLCNT == 1 && UPCOUNT == 0 THEN
SCRLCNT == 1 && UPCOUNT == 1 THEN
SCRLCNT == 1 && UPCOUNT == 2 THEN
/*Determine ramp speed when UP or DOWN pressed:*/
UP_PRESSED:
{
DWNCOUNT = 0;
IF UPCOUNT >= 2 THEN
UPCOUNT = 2;
ELSE
UPCOUNT = UPCOUNT + 1;
IF
OP
IF
SP
SCRLCNT == 0 THEN
= OP + 0.1;
SCRLCNT == 1 THEN
= SP + 0.1;
IF !TUNING THEN RETURN;
}
DOWN_PRESSED:
{
UPCOUNT = 0;
IF DWNCOUNT >= 2 THEN
DWNCOUNT = 2;
5 - 15
MOD 30ML Display Guide
Application Examples
Script for Two-Key
Ramping
(continued)
ELSE
DWNCOUNT = DWNCOUNT + 1;
IF
OP
IF
SP
SCRLCNT == 0 THEN
= OP - 0.1;
SCRLCNT == 1 THEN
= SP - 0.1;
IF !TUNING THEN RETURN;
}
/* Determine if UP or DOWN key being held: */
UP_HELD:
{
UPHLD = 1;
RETURN;
}
DOWN_HELD:
{
DWNHLD = 1;
RETURN;
}
/* Reset local inputs for next use: */
UP_RELEASED:
{
UPHLD = 0;
RETURN;
}
DOWN_RELEASED:
{
DWNHLD = 0;
RETURN;
}
}
The next figure illustrates the new inputs required for this script (note that this is in
ADDITION to those illustrated in Example 1):
5 - 16
MOD 30ML Display Guide
Application Examples
Figure 5 .14.
Additional Inputs for
Two-Key Ramping
5 - 17
MOD 30ML Display Guide
Application Examples
5.5
Example 5: Time-Based Variable Ramping
In some controllers, the longer the up or down ramp key is held, the faster the variable
changes. In this example, for the first two seconds the tenths digit will ramp at a rate of
0.2 counts per second. Then the ones digit will ramp at a rate of 2 counts per second for
two seconds, and finally the tens digit will ramp at a rate of 20 counts per second, as
illustrated in the next figure.
Figure 5 .15.
Ramp speed of
time-based ramping
example
20 per
second after
first 4
seconds
2 per second
for next two
seconds
.2 per second for first
two seconds
XX.X
This example is based on the configuration shown in Example 1. As with Example 4, the
UP and DOWN keys must be re-defined, and much of the script is similar. The TAG and
Alarm keys remain under default (system) control.
In addition to the PID100 inputs and the four inputs defined in Example 4, one new count
input called TIMER is used. This simply counts from 0 to 200, resets, and begins again.
Because the script executes every 50ms, it will take ten seconds for the timer to count to
200 and reset. This is used to determine how long a key is held.
In the portion of the script that causes the UP ramping, there is a series of IF statements.
When the first IF statement is true, the output will be incremented by a value of .01 each
time that the display block is processed (20 times per second). This means that each
second the tenths digit will increase by a value of .2. If the value of TIMER is greater
than 40 but less than or equal to 80, the first IF statement is false and the second IF
statement is true. This causes the ones digit to increment at a rate of 2 counts per second
for 2 seconds (80 - 40 = 40 x .05 sec. = 2 seconds). Finally, if the value of TIMER is
greater than 80, only the third IF statement is true, and the tens digit increments at a rate of
2 counts per second. The length of time left to ramp to full scale is 6 seconds (200 - 80 =
120 x .05 sec. = 6 seconds).
If the upper engineering unit range value for the variable being changed is large, you
may have to increase the upper value of the local input named TIMER to a value which
provides enough time for the full ramping to occur. Likewise, if you wish a change of
speed to occur at a different time value than two seconds then change the TIMER trip
points in the ACTIVE script.
5 - 18
MOD 30ML Display Guide
Application Examples
Figure 5 .16.
Script for Two-Key
Ramping
DEFAULTS:
{
MANUAL_PRESSED:
{
IF OPMS != 3 THEN
{
OPMS = 0;
#LINE5
= " OP";
#LINE6.SRC =
OP;
SCRLCNT = 0;
}
}
AUTO_PRESSED:
{
IF OPMS != 3 THEN
OPMS = 1;
IF SCRLCNT == 0 THEN
#UPDN = 0;
}
SCROLL_PRESSED:
{
IF SCRLCNT >= 1 THEN
SCRLCNT = 0;
ELSE SCRLCNT=SCRLCNT + 1;
CASE SCRLCNT OF
{
0:
#LINE5 ="OP";
#LINE6.SRC= OP;
IF OPMS == 0 THEN
#UPDN = 7;
BREAK;
1:
#LINE5 = "SP";
#LINE6.SRC = SP;
#UPDN = 7;
BREAK;
}
}
SCROLL_HELD:
{
TUNE;
}
Change controller mode to manual when MAN
key is pressed unless mode is TRACK. Force
Line 6 to display Output value.
Change controller mode to automatic when
AUT key is pressed unless mode is TRACK.
Return UP / DOWN arrow functions to
default (system) if mode is MANUAL
Do not display the UP or DOWN arrows
Display Tuning variables when Scroll Key held
Controls Line 5 and 6 display
/* Execute every 50 ms: */
ACTIVE:
{
IF TIMER == 200 THEN
TIMER = 0;
ELSE
TIMER = TIMER + 1 ;
IF OPMS
#UPDN
IF OPMS
#UPDN
== 1 && SCRLCNT == 0 THEN
= 0;
== 0 && SCRLCNT == 0 THEN
= 7;
5 - 19
MOD 30ML Display Guide
Application Examples
/* Cause UP ramping of setpoint or output:*/
Script for Two-Key
Ramping
(continued)
IF UPHLD && OPMS == 0 &&
OP = OP + 0.01;
ELSE IF UPHLD && OPMS ==
THEN
OP = OP + 0.1;
ELSE IF UPHLD && OPMS ==
OP = OP + 1;
ELSE IF UPHLD && SCRLCNT
SP = SP + 0.01;
ELSE IF UPHLD && SCRLCNT
SP = SP + 0.1;
ELSE IF UPHLD && SCRLCNT
SP = SP + 1;
SCRLCNT == 0 && TIMER
<= 40 THEN
0 && SCRLCNT == 0 && TIMER > 40 && TIMER <= 80
0 && SCRLCNT == 0 && TIMER > 80 THEN
== 1 && TIMER
<= 40
THEN
== 1 && TIMER > 40 && TIMER <= 80
== 1 &&
THEN
TIMER > 80 THEN
/* Cause DOWN ramping of setpoint or output: */
IF DWNHLD && OPMS == 0 &&
OP = OP - 0.01;
ELSE IF DWNHLD && OPMS ==
THEN
OP = OP - 0.1;
ELSE IF DWNHLD && OPMS ==
OP = OP - 1;
ELSE IF DWNHLD && SCRLCNT
SP = SP - 0.01;
ELSE IF DWNHLD && SCRLCNT
SP = SP - 0.1;
ELSE IF DWNHLD && SCRLCNT
SP = SP - 1;
SCRLCNT == 0 && TIMER
<= 40 THEN
0 && SCRLCNT == 0 && TIMER > 40 && TIMER <= 80
0 && SCRLCNT == 0 && TIMER > 80 THEN
== 1 && TIMER
<= 40 THEN
== 1 && TIMER > 40 && TIMER <= 80 THEN
== 1 && TIMER > 80 THEN
}
/*Determine ramping speed when UP or DOWN pressed:*/
UP_PRESSED:
{
TIMER = 0;
IF SCRLCNT == 0 THEN
OP = OP + 0.1;
IF SCRLCNT == 1 THEN
SP = SP + 0.1;
IF !TUNING THEN RETURN;
}
DOWN_PRESSED:
{
TIMER = 0;
IF SCRLCNT == 0 THEN
OP = OP - 0.1;
IF SCRLCNT == 1 THEN
SP = SP - 0.1;
IF !TUNING THEN RETURN;
}
/* Determine if UP or DOWN key being held: */
UP_HELD:
{
UPHLD = 1;
5 - 20
MOD 30ML Display Guide
Application Examples
Script for Two-Key
Ramping
(continued)
RETURN;
}
DOWN_HELD:
{
DWNHLD = 1;
RETURN;
}
/* Reset local inputs UPHLD and DWNHLD for next use: */
UP_RELEASED:
{
UPHLD = 0;
RETURN;
}
DOWN_RELEASED:
{
DWNHLD = 0;
RETURN;
}
}
5 - 21
MOD 30ML Display Guide
Application Examples
The next figure illustrates the new input definition required for this example:
Figure 5 .17.
Additional inputs for
time-based variable
ramping
5 - 22
MOD 30ML Display Guide
Application Examples
5.6
Example 6: Multiple Tune Lists
In some applications it may be either desirable or necessary to use more than one Tune
List block with a single Display Block. Uses of this feature might include:
•
the number of variables to be considered “tuneable” is greater than 40;
•
tuning parameters are to be grouped in different lists; or
•
Tune Lists are used for separate recipe definition.
This example is uses the compound PID&DISP as a starting point. This compound is
supplied with Visual Application Designer. The inputs and formats are the same, and key
functions are almost identical. Pressing the SCROLL key in this example scrolls through
OP, SP and a new option, TUN, where the user selects the desired Tune List. Also, a new
state-type input, TUNE_REQ, and an associated format are needed to allow the operator
to select between Tune Lists.
Because only one graphical connection can be made between a TL block and a Display
Block, and because Tune List blocks cannot be ‘nested’, two Display Block internal
attributes are provided called TUNING and TUNELIST. These attributes are used
exclusively when multiple TL Blocks are associated with a single Display Block.
TUNING is a discrete attribute monitored by the Display block to determine if a Tune List
is being shown on the front of the instrument. If a Tune List is displayed, then the value
of TUNING for the Display Block associated with that list will be TRUE. If no list is
showing, this attribute will have a value of FALSE
TUNELIST is a local count attribute used to identify which tune list is to be placed on the
display. It uses the actual occurrence numbers of the individual TL blocks.
Three new inputs are added to the Display Block for this example:
•
TUNE_REQ – a Count input. The associated format defines the Entry Method as
Entry Req’d, meaning the operator must press the flashing ENT (enter) key to
access the tuning displays. A case statement is added to the Display Script for
selecting which tune list will be displayed.
•
TL_CTRL – a count input representing a tuning list which contains Gain, Reset,
Preact, Action, etc. This is set as a constant with a value equal to the occurrence
number of that tuning list.
•
TL_ALARM - a count input representing a tuning list which contains alarm related
parameters such as trip points. This is set as a constant with a value equal to the
occurrence number of that tuning list.
Caution: Although the user can estimate the occurrence numbers by the order in which
the blocks were placed in the strategy, occurrence numbers are actually assigned at
the time of a successful compile. After compiling the strategy be sure the Internal value
in the Display Block Input menu for each Tune block matches its true occurrence
number.
5 - 23
MOD 30ML Display Guide
Application Examples
A symptom of incorrect occurrence number assignment is tuning one loop and affecting
the tuning parameters of other loops.
No new State Tables are required for this example; they are already contained in the
Default State Tables supplied with Visual Application Designer.
5 - 24
MOD 30ML Display Guide
Application Examples
The script for this example is shown in the next figure:
Figure 5 .18.
Script for
accessing
multiple
TuneLists
DEFAULTS:
{
MANUAL_PRESSED:
{
IF OPMS != 3 THEN
{
OPMS = 0;
#LINE5 = “OP”;
#LINE6.SRC = OP;
}
}
AUTO_PRESSED:
{
IF OPMS != 3 THEN
{
OPMS = 1:
}
}
SCROLL_PRESSED:
{
IF SCRLCNT >= 2 THEN
SCRLCNT = 0;
ELSE SCRLCNT=SCRLCNT + 1;
CASE SCRLCNT OF
{
0:
#LINE5 ="OP";
#LINE6.SRC= OP;
BREAK;
1:
#LINE5 = "SP";
#LINE6.SRC = SP ;
BREAK;
2:
#LINE5 = “TUN”;
#LINE6.SRC = “TUNE_REQ”;
BREAK;
}
}
Continued on following page….
5 - 25
MOD 30ML Display Guide
Application Examples
Display script for
multiple tuning
lists (Continued)
…continued from previous page:
Check to see that TUNING is false (no
ACTIVE:
tune list is already up).
{
IF TUNING == FALSE THEN
CASE TUNE_REQ OF
{
If value of attribute TUNELIST is 1, bring up the Control
0:
tuning display
BREAK;
1:
TUNELIST = TL_CTRL;
TUNE;
BREAK;
2:
TUNELIST = TL_ALARM;
TUNE;
BREAK;
DEFAULT:
TUNELIST = 0;
BREAK;
Reset input to 0
}
TUNE_REQ = 0;
}
}
5 - 26
MOD 30ML Display Guide
Application Examples
The next figure illustrates the new inputs that must be added to the Display Inputs menu:
Figure 5 .19.
Display Block
Inputs, Multiple
Tune Lists
Next figure shows the new Format added for TUNE_REQ:
Figure 5 .20.
Display Formats,
Multiple Tune
Lists
Included in the default State Tables
supplied with ViZapp
5 - 27
MOD 30ML Display Guide
Application Examples
5.7
Example 7: Start & Stop a Discrete Device
Motors, pumps, solenoid valves and other discrete devices can be commanded from the
MOD 30ML display, taking the place of separate display terminals or pushbuttons. This
example illustrates stop and start of a motor. The Start/Stop commands and the feedback
can be shown on the display. No display scripting is required for this strategy. It
consists of one Digital Input Block, one Digital Output Block, and a Display Block, as
shown in the next figure. The “FEEDBACK” digital input comes from a set of auxiliary
contacts located on the starter relay. The Result ( R ) of FEEDBACK is connected to
Input 1 of the Display block. Input 1 of the Display Block is connected to the input of the
Command block.
Figure 5 .21.
Strategy blocks for
Discrete Device
Control
The command to start and stop the pump will come from a Display Block input. The
connection is made from the Display Block input to the Digital Output Module.
State Tables representing the appropriate commands must be added to the State Table file
in the State Table block. They can be inserted at any point in the file, however, care must
be taken not to embed them in an existing State Table. The State Tables for this example
are shown below:
Figure 5 .22.
State Tables, pump
on/off control
fbD, 8, "????????"
{
0, "PUMP OFF";
1, "PUMP ON";
}
comD, 8, "????????"
{
0, "TURN OFF";
1, "TURN ON";
}
5 - 28
/* Pump contact position*/
/* Pump command*/
MOD 30ML Display Guide
Application Examples
The next figure illustrates the Display Menus, Display Inputs, and Display Formats for
this example.
Figure 5 .23.
Display Block
Menus, pump on/off
control
5 - 29
MOD 30ML Display Guide
Application Examples
5 - 30
MOD 30ML Display Guide
Application Examples
5.8
Example 8: Recipe Selection
This example shows how to construct displays for selecting recipes from the front face.
The strategy involves a pressure control loop and a temperature control loop. The
pressure and temperature control loops each have their respective PID display. A third
display is used for recipe selection. The recipes differ in pressure setpoint and
temperature setpoint; these values are stored in the Display Script of the Recipe Display
Block. The next figure illustrates the blocks used in the strategy. Although this example
shows only three recipes with two variables each (time & pressure), up to 255 recipes
could be configured in this manner with many more variables per recipe.
Figure 5 .24.
Strategy Blocks,
recipe selection
The Pressure and Temperature compounds are based on the PID_RSP Smart Symbol
found in the Project Gallery. The PID blocks are configured for Remote Setpoint; the
connections for changing the pressure and temperature targets are made from the Recipe
Display Block to the Remote Set Point Input (RSPI) of each PID block.
It is also possible to construct more elaborate recipes using Sequence and / or RampSoak
blocks, and select them through the front panel display. Tune Lists can also be used for
recipe data and selection, with the additional feature of password protection.
In this example, three inputs are configured in the Recipe Display Block:
•
PRESSURE – configured as a floating point input with initial value of 0. Then an
external connection is made to the Pressure PID Block setpoint.
5 - 31
MOD 30ML Display Guide
Application Examples
•
TEMPERAT – configured as a floating point input with an initial value of 0. Then
an external connection is made to the Temperature PID Block setpoint.
•
RECIPE – a count input that represents the recipe number. This input requires an
associated format that will allow display of actual recipe name (added to the State
Tables), on Line 6.
Using the UP or DOWN arrow key the operator selects the appropriate recipe by name.
The order in which they appear is defined by the order of the Display Tags in the Display
List (Display Interface Block). Each name represents a state value (in this case 0 - 2) of
the input named RECIPE. The setpoint values for the temperature and pressure PID loops
are defined for each case. As a case is selected the values defined for temperature and
pressure are sent to the appropriate block.
If, in the DIF block, any one of the PID block displays are defined to appear first after
a power fail recovery (Power Up Display field), then the initial value for setpoint will
be defined by the PID block initial values. If the Recipe Display block is defined to
come up first after a power fail recovery then the values for the setpoints and the timer
will be determined by the selected recipe data. Define the ‘Power Up Display” to
cause the right startup values according to your needs.
5 - 32
MOD 30ML Display Guide
Application Examples
The next figure shows the State Table to be added to the State Table file in the ST block.
The first recipe should be zero. Any alphanumeric names may be substituted, as the
application requires, however they must start with an alpha character.
Figure 5 .25.
State Table, recipe
selection
recipeD, 8, "????????"
{
0, "RECIPE A";
1, "RECIPE B";
2, "RECIPE C";
}
/* Recipe names */
The next figure shows the script for the Recipe Display Block. The cases 0, 1, 2
correspond to the states defined in the State Table.
Figure 5 .26.
Display Block
Menus, Basic PID
Display
DEFAULTS:
{
ACTIVE:
{
CASE RECIPE OF
{
0:
{
PRESSURE = 250.0;
TEMPERAT = 198.0;
BREAK;
}
1:
{
PRESSURE = 200.0;
TEMPERAT = 186.0;
BREAK;
}
2:
{
PRESSURE = 275.0;
TEMPERAT = 205.0;
BREAK;
}
}
}
}
When RECIPE A is selected the
pressure and temperature PID
block setpoint values will be set to
250 and 198 respectively.
When RECIPE B is selected
the values for the pressure
and temperature set-point
change to these new values.
5 - 33
MOD 30ML Display Guide
Application Examples
The next figure illustrates the Menus, Inputs and Formats for the Recipe Display Block.
Figure 5 .27.
Display Block
Menus, Recipe
Selection
Name of new State Table
5 - 34
MOD 30ML Display Guide
Application Examples
5.9
Example 9: Sequence Operation & Control
All the functions of the MOD 30ML Sequence Block can be accessed through the front
display. This example illustrates how to build a display that shows the active step by
name, and allows the user to issue RUN, STOP, and RESET commands to the sequence
itself. It also indicates whether the sequence is in automatic or manual mode, and allows
manual step selection by the operator.
In this example, if the sequence is reset while in the middle of a sequence, pressing the
start button (STR) puts the Sequence block into RUN status and the sequence will restart.
The resulting display is shown in the next figure:
Figure 5 .28.
Line 1 displays the tag name (in this case, SEQUENCE).
Sequence
Operation Display
Line 2 displays the Sequence block status as either RUN,
RESET or FROZEN. When in RUN the Sequence block is
ready to execute the configured sequence. When RESET is
selected the Sequence block skips directly to the step
designated as the reset step. Selecting STOP causes the
Sequence block to go to FROZEN status and hold in the
current step until status is changed to RUN.
Line 3 shows the Sequence block mode as either automatic
(AUT) or manual (MAN), selected by the AUT and MAN
keys.
Line 4 displays STR (START). Pressing the R/L key next to
this line puts the Sequence block in RUN status and the
sequence starts. As each step expression in the Sequence
block is satisfied, the sequence will advance to the next step.
The sequence will start any time the start key is pressed,
provided the sequence is at the first step.
Line 5 displays the word CMD (COMMAND), unless the
Sequence block is in manual mode, in which case Line 5 will
show STP (step) to indicate step can be manually selected.
Pressing the SCROLL key when Line 5 shows CMD changes
the Sequence block status between RUN, FROZEN or
RESET on Line 6; the UP/DOWN arrow keys are used to
make a selection. Pressing the SCROLL key again displays
the active step.
Line 6 shows the active step under normal operation.
5 - 35
MOD 30ML Display Guide
Application Examples
The script for this display is shown in the next figure:
Figure 5 .29.
Sequence Display
Script
DEFAULTS:
{
MANUAL_PRESSED:
{
MODE = 0;
#LINE2.SRC = STATUS;
#LINE3 = "MAN";
#LINE5 = "STP";
#LINE6.SRC = STEP;
}
Pressing MAN key changes sequence block
mode to Manual. Line 2 displays status, Line 3
displays MAN, Line 5 displays STP (step) and
Line 6 shows the active step that may now be
manually changed.
AUTO_PRESSED:
{
MODE = 1;
#LINE2.SRC = STATUS;
#LINE3 = "AUT";
#LINE5 = "CMD";
#LINE6.SRC = STEP;
}
RL_PRESSED:
{
START = 1;
CMD = 1;
#LINE5 = "CMD";
#LINE6.SRC = STEP;
}
RL_RELEASED:
{
START = 0;
}
Pressing the AUTO key puts the Sequence
block in automatic. Line 3 shows AUT and
Line 6 shows the active step. Because the
STEP input format requires the Sequence
block to be in manual to manually change
steps, the UP/DOWN arrows will not be lit.
The R/L key is used to start the sequence. The
input named START will be set to 1. Pressing
the R/L key also resets the Sequence block
status to RUN.
Resets the START input back to 0, ready for the
next time the start command is issued. Otherwise
the sequence would continue to cycle indefinitely.
SCROLL_PRESSED:
{
IF SCRLCNT >= 1 THEN
SCRLCNT = 0;
ELSE
SCRLCNT = SCRLCNT + 1;
CASE SCRLCNT OF
{
0:
#LINE5 = "CMD";
#LINE6.SRC = STEP;
BREAK;
1:
#LINE5 = "CMD";
#LINE6.SRC = CMDSET;
BREAK;
}
}
ACTIVE:
{
IF CMDSET && !DELTA THEN
5 - 36
Scroll key alternates between
forcing the step and setting the
sequence block status.
The ACTIVE event script sends the
selected status command to the Sequence
block’s Command input. This is necessary
because the Command input of the
Sequence block always returns a 0 after it
receives a command value. The display
would not show the actual status command
properly if this command was sent directly
from the local input CMDSET (selected
status).
MOD 30ML Display Guide
Application Examples
{
CMD = CMDSET;
DELTA = 1;
}
ELSE IF DELTA THEN
{
DELTA = 0;
CMDSET = 0;
}
Sequence Display
Script (continued)
}
}
It is also necessary to add new State Tables to display the sequence steps, status, and
mode. The next figure shows the new State Tables, which should be added to the bottom
of the existing State Table file in the ST block. The names in the State Table stepD can
be changed and expanded to fit the particular application.
Figure 5 .30.
New State Tables
for sequence
display
modeD, 3, "???"
{
0, "MAN";
1, "AUT";
}
cmdD, 8, "????????"
{
0, "NONE";
1, "RUN";
3, "STOP";
2, "RESET";
}
stepD, 8, "????????"
{
1, "READY";
2, "FILL";
3, "HEAT";
4, "COOK";
5, "COOL";
6, "DRAIN";
}
statusD, 8, "????????"
{
0, "HOLDING";
1, "RUN";
2, "RESET";
3, "FROZEN";
}
5 - 37
MOD 30ML Display Guide
Application Examples
The next figure shows the Display Block main menu entries for the sequence display:
Figure 5 .31.
Display Block menu
entries, sequence
display
The next figure illustrates the Display Inputs for the sequence display:
Figure 5 .32.
Display Block
Inputs, sequence
display
The inputs MODE, SET, CMDSET and STATUS require formats as illustrated in the next
figure:
5 - 38
MOD 30ML Display Guide
Application Examples
Figure 5 .33.
Display Block
Formats, sequence
display
Connections between the Sequence Block and the Display Block are as shown in the next
figure:
Figure 5 .34.
Block connections,
sequence display
5 - 39
MOD 30ML Display Guide
Application Examples
5.10 Example 10: Auto-Scrolling Displays
In this example, MOD 30ML is acting as a multi-point indicator with three indicationonly displays that scroll continuously. When the operator toggles the R/L key, the
scrolling stops on the current display. When the R/L key is pressed again, scrolling
resumes. (Any key not being used by the Display Blocks can be chosen for this function).
Line 4 will display STP (stop) or RES (resume) so the operator can either stop or resume
the scroll action.
In each of the Display Blocks, a count input called STOPSCRL is created. Another count
input is created called STOP. For each of these inputs the Initial Value must be 1. An
example is shown below for ONE of the display blocks with three temperature inputs.
Figure 5 .35.
Display Block
inputs (Tag 1)
The following script is added to all existing scripts in displays that will scroll. “RES”
stands for “RESume scrolling”, and “STP” stands for “SToP scrolling”.
Figure 5 .36.
Script for toggling
R/L key to halt
scrolling
RL_PRESSED:
{
IF STOPSCRL >= 1 THEN
STOPSCRL = 0;
ELSE
STOPSCRL = STOPSCRL +
1;
/* when scroll key is pressed */
CASE STOPSCRL OF
{
0:
STOP = 0;
/* based on value of STOPSCRL */
#LINE4 = “RES”;
}
5 - 40
BREAK;
1:
STOP = 1;
#LINE4 = “STP”;
BREAK;
}
/* if the input SCRLCNT is >=1 */
/* set SCRLCNT to zero */
/* otherwise add 1 to SCRLCNT
*/
/* if the value is 0 */
/* set input STOP to 0 (false) */
/* display RES on Line 4 */
/* if the value is 1 */
/* set input STOP to 1 (true) */
/* display STP on Line 4 */
MOD 30ML Display Guide
Application Examples
A connection is then made from input STOP in each of the Display Blocks to an Expression
block that controls the scrolling, as shown in the next figure.
Figure 5 .37.
Block connections,
auto scrolling
displays
In this example the Expression Block uses inputs 1 through 3, configured as Count inputs, to
detect the “stop scroll” command from the Display Blocks named TAG1, TAG2 and TAG3.
“DISPLAYS” is a count input with an initial value of 1, that increments the display index
number by 1 until it reaches 3, then resets to 1 and starts again, as long as none of the “stop
scroll” inputs is present. The result of the Expression must be connected back around to the
input DISPLAYS.
Figure 5 .38.
Expression Block
Inputs
The expression for the Expression Block is:
Figure 5 .39.
Expression to
control scrolling
IF (TAG1 == 0 || TAG2 == 0 || TAG3 == 0) THEN
DISPLAYS
ELSE IF DISPLAYS =< 2 THEN
DISPLAYS + 1
ELSE 1
5 - 41
MOD 30ML Display Guide
Application Examples
Each display block to be scrolled must have its own input to the expression block. The
highest value of DISPLAYS will be one less than the total number of displays to be scrolled.
The Result of the Expression block is configured as Count with an initial value of 1.
The result of the Expression Block is also connected to the Remote Display Input of the
Display interface (DIF) Block.
Finally, the Scan Group in the Interface Block must be set to allow a reasonable viewing
period of each display before changing to the next one. If the display blocks are in Group 1
and the Group 1 Scan Rate is set to 2 seconds, the displays will scroll at that rate.
5 - 42
The Company’s policy is one of continuous product improvement and the right
is reserved to modify the information contained herein without notice, or to
make engineering refinements that may not be reflected in this bulletin.
Micromod Automation assumes no responsibility for errors that may appear in
this manual.
© 2004 MicroMod Automation, Inc.
Printed in USA
IB-1800R-SCR, Issue 4 10/2004
MicroMod Automation, Inc.
75 Town Centre Drive
Rochester, NY USA 14623
Tel. 585-321 9200
Fax 585-321 9291
www.micromodautomation.com

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement