Professional Documents
Culture Documents
RSView32
Contents
Introduction ..................................................................................................................... 3
PLCs ............................................................................................................................... 4
Hardware......................................................................................................................... 5
SLC Rack..................................................................................................................... 5
SLC Power Supply ....................................................................................................... 5
SLC Processors ........................................................................................................... 6
SLC I/O Modules.......................................................................................................... 6
Ladder Logic ................................................................................................................... 7
The Dialect of PLCs ........................................................................................................ 7
Project Scope................................................................................................................ 11
Summarizing the Scope ................................................................................................ 19
Beginning the Project .................................................................................................... 20
Tags and the Tag Database.......................................................................................... 25
Digital Tags ................................................................................................................ 26
Timers ........................................................................................................................ 30
Analog Tags............................................................................................................... 32
Creating the Screens..................................................................................................... 36
Screen 1 System View ............................................................................................... 38
Designing the Master Layout ..................................................................................... 41
Color Blindness.......................................................................................................... 41
Designing the Header ................................................................................................ 43
The Navigation Menu ................................................................................................. 48
Screen 1 Content ....................................................................................................... 72
Pump Icons ................................................................................................................ 80
Agitator Motor ............................................................................................................ 83
Scales ........................................................................................................................ 84
Adding Piping............................................................................................................. 86
Review of the System View Display........................................................................... 88
Configuring the Menu................................................................................................. 91
Screen 2 - Agitator Process Run Time Display ............................................................. 95
Screen 3 - Valve Fault Time Delays .............................................................................. 99
Screen 4 - Maintenance Display ................................................................................. 101
Screen 5 - Alarms Display........................................................................................... 104
Alarm Setup ............................................................................................................. 109
Configuring a Tag to Trigger an Alarm..................................................................... 110
Screen 6 - Batch Log display ...................................................................................... 113
The Final Result .......................................................................................................... 118
Finishing Touches ....................................................................................................... 122
Trending ...................................................................................................................... 126
Tips and Tricks ............................................................................................................ 128
The Steps to a Successful and Profitable RSView Project.......................................... 131
Introduction
The purpose of this book is to teach you how to design and program an HMI or a
SCADA system with RSView32.
There is a sample project included that contains a Project Scope. The Project Scope (or
Functional Specification, or whatever your company might call it) defines in detail how
the system is to operate when the project is finished.
You will learn how to take a Project Scope and turn it into a working RSView program.
It will show you the keystrokes and mouse movements that you need to know to use
RSView.
Finally, it provides a number of tips that will save you a bunch of time.
This book assumes you have a little background with PLCs perhaps you have worked
with other PLCs from other manufacturers or you have helped to install and wire PLCs.
Perhaps you are a Mechanical, Chemical or Process Engineer and you need to learn
how to use RSView32.
If you need a more thorough understanding of basic PLC concepts, you might want to
consider the Beginners Guide to PLC Programming How to Program a PLC
(Programmable Logic Controller). This ebook, along with the online tutorial, provides an
example of how to automate a drill press, while explaining all the basic concepts of PLC
programming that are necessary to write a solid PLC program.
It is available from Modern Media for $9.95. Visit
http://www.engineersandtechnicians.com/ if you would like to learn more about this
book.
For now, it should be enough to say that the PLC receives signals and information from
hardwired external devices, such as the position of a limit switch, the speed of a motor
or the numeric value of a weight sensor.
This information is linked from the PLC to RSView through tags. Tags are simply
memory locations to which both the PLC and RSView have access. Some tags are
created in RSView; most are created in the PLC.
Understanding tags and the manipulation of tags is a fundamental skill required for HMI
or SCADA programming.
We will also discuss the aesthetic appeal, or looks of HMI designs. This attribute is
often underrated. For the time being, just keep in mind that an HMI that looks good,
How to Program RSView32
Copyright 2009 Modern Media
engineersandtechnicians.com
while still providing the functionality required, is easier for an operator to use. Because it
is visually appealing, screens and navigational paths will be easier to remember. Well
cover more of this later.
PLCs
Nearly all the industrial equipment that you find in a modern manufacturing facility
shares one thing in common - computer control. The most commonly used controller is
the PLC, or the Programmable Logic Controller, using a programming language called
Ladder Logic. The language was developed to make programming easy for people who
already understood how switches, relay contacts and coils work. Its format is similar to
the electrical style of drawing known as the ladder diagram.
The most popular and most widely used manufacturer of PLCs is Rockwell Automation,
who produces the Allen-Bradley SLC series of PLCs. The MicroLogix and SLC families
of processors and I/O modules are all programmed using Rockwells proprietary
software known as RSLogix.
RSLogix 500 is
the software used to
program the SLC family
of PLCs.
RSLogix 5000 is used for
the ControlLogix PLCs.
Rockwell has promised to support the SLC line until 2012, so you can expect to see
many SLCs for a few years to come.
Hardware
One of the nice things about Allen-Bradleys smaller PLCs is the relative simplicity of
assembling the hardware to create a system.
First, lets see what it takes to assemble an SLC 500 system. You only need to have a
few components: a rack, a power supply, a processor and some I/O modules.
SLC Rack
These come in four configurations, with varying capacity for installing the I/O modules.
1746-A4
1746-A7
1746-A10
1746-A13
4-Slot chassis
7-Slot chassis
10-Slot chassis
13-Slot chassis
A rack is a frame that holds the modules of an SLC 500 system. It is similar to the
motherboard and case in your personal computer. It provides a physical structure to
hold the modules that create a system, like your computers case. It also provides an
electronic back plane that allows modules to communicate and interact.
In an SLC system, the SLC 500 processor always resides in Slot 0, which is the first
slot.
SLC Power Supply
Power supplies come in varying capacities.
1746-P1
1746-P2
1746-P3
1746-P4
1746-P5
1746-P7
SLC Processors
There are five SLC 500 processors available:
SLC 5/01
SLC 5/02
SLC 5/03
SLC 5/04
SLC 5/05
The 5/01 is the most basic processor, with each succeeding model having more
capabilities. The most important difference is found in the SLC 5/05, which has the
capability of Ethernet communications.
SLC I/O Modules
There are an incredible amount of I/O (input/output) modules available for the AllenBradley SLC family. There are 4-20mA and 0-10VDC analog modules. There are digital
(also known as discrete) modules that work in a variety of voltage configurations and
capacities.
Ladder Logic
If you already understand how Allen-Bradley PLCs work, such as internal
memory addressing, hardwired I/O, data types, etc., you may skip this section.
Before we open RSLogix 500 and start programming, there are a few things you need
to know about PLCs in general. I have summarized the basic terms and techniques
required to work with ladder logic. It isnt a comprehensive summary, but if you are just
starting out, the information here book will be very helpful.
Every PLC programmer, no matter what skill level, must know the principles described
in this section and the Equivalent Logic section. There is simply no way around it.
To effectively write a program, or even edit one, the programmer must know how to
visualize the effects of the changes he will make.
In other words, you have to be able to look at the logic on paper and imagine how the
logic will work when it is entered into the PLC.
For example, an address that references an output of an SLC 500 is O:5/0. That is:
In RSLogix, the B3 (binary) file is commonly used for all the internal coils. There are
many other words in other files that have bits you can use as internal coils, but we are
going to stick with the B3 file for our application.
The address C5:0 simply refers to the counter. Each counter has bits that turn on after
the counting function is complete. You can address this bit by simply putting a /DN
after the counter address. DN stands for done.
For example, if counter C5:0 is a CTU (counter up), then the bit C5:0/DN will turn on
after the counter has reached its preset value.
--] [-- Normally Open Contact
When used with a hardwired input, this instruction is off until there is a voltage applied
to the input. The bit address then goes high, or on, and the instruction becomes true. It
works the same way when it has the same address as an internal coil, except that the
coil must be turned on by logic in the program.
Allen-Bradley calls these normally open contacts XIC, or eXamine If Closed
instruction.
An XIC instruction can reference a hardwired input, a hardwired output, an internal coil
or a timer done bit, among others.
--]/[-- Normally Closed Contact
This is an inverted normally open contact.
When used with a hardwired input, this instruction is "true" until there is a voltage
applied to the input. It then goes low, or off, and becomes false.
It also can be used with an internal coil, becoming true when the coil is off and
becoming false when the coil is on.
Allen-Bradley calls these normally closed contacts XIO, or eXamine If Open
instructions.
-( )- Output Coil
When used with a hardwired output, this function is off until the logic in the program
allows it to turn on. It then becomes true, and will energize the device that is wired to
the respective output.
If it is used as an internal coil, it will toggle the instructions associated with it. That is, it
will close a normally open instruction and open a normally closed instruction.
Allen-Bradley calls these outputs OTE, or OutpuT Energize.
An OTE may be used with a hardwired output or an internal coil.
TRUE - A state that indicates an instruction is allowing logic to flow through it.
10
Also, if the logic in a rung turns on the output of the rung, then the rung is said to be
true.
FALSE - Without stating the obvious, this is the opposite of true.
OK, that was a lot to cover and for you to understand dont worry, this will start getting
easier.
Project Scope
We will use a batching operation as an example. Batching, as you may know, is the
term that describes the mixing of assorted ingredients to make a finished product.
There are techniques that are common to batching, whether you are making soap or
cake mix. We are going assume that the PLC program has been written that mixes a
hypothetical window cleaner. This program is named HYPERCLR_RSVIEW32. You will
find a printout of the program in the form of a PDF with the attachments you
downloaded with this book.
Someone has to define the batching procedure. Usually, a process engineer or a
chemical engineer does this. If the job of defining the project is done well, a document
called a Project Scope, or something similar, is generated.
It is extremely important that you clearly understand the entire process that is defined in
the scope. If you have any questions or concerns, you need to resolve those before you
begin programming. If you dont, then the responsibility of errors and omissions, and
perhaps the blame, may be placed on you.
If you bring up questions that result in changes to the scope, ask the originator to revise
the Project Scope. In fact, it is not uncommon for a Project Scope to undergo a number
of revisions.
If there is a change that is not documented in the scope, you should document it by
getting an email from the originator that explains the change. If nothing else, you want
to make sure you understand what the change involves.
For our project, the project scope is as follows.
11
Hyper-Glass Cleaner
Batching Project Scope
1. Goal
1.1. The goal of this project is to install a new automated batching system for
Hyper-Glass Cleaner.
2. Overview
3. Three ingredients (city water, ingredient QR and ingredient KM) are added in
specified amounts by weight to the Mixing Tank. After all the ingredients have been
added to the Mixing Tank, the mixture is blended by running the agitator for a
specified time. When the blending time is complete, the finished product is pumped
to the Filling Lines for bottling and final packaging.
4. With the exception of the E-Stop pushbutton, all operator control will be
accomplished by a touchscreen HMI.
12
5. System Components
Component
Valve AV-CW
Limit Switch LS-CW1
Limit Switch LS-CW2
Pump PUMP-QR
Valve AV-QR
Limit Switch LS-QR1
Limit Switch LS-QR2
Pump PUMP-KM
Valve AV-KM
Limit Switch LS-KM1
Limit Switch LS-KM2
Scales
Agitator MTR-MTA
Pump PUMP-MT
Valve AV-MT
Limit Switch LS-MT1
Limit Switch LS-MT2
Ultrasonic Level Sensor ULS-1
Function
Supplies city water to the Mixing Tank
Indicates when valve AV-CW is closed
Indicates when valve AV-CW is open
Pumps ingredient QR to the Mixing Tank
Supplies QR to the Mixing Tank
Indicates when valve AV-QR is closed
Indicates when valve AV-QR is open
Pumps ingredient KM to the Mixing Tank
Supplies KM to the Mixing Tank
Indicates when valve AV-KM is closed
Indicates when valve AV-KM is open
Provides the current weight of the
ingredients in the tank to the PLC
Blends the ingredients in the Mixing Tank
Pumps ingredient MT from the Mixing
Tank
Supplies the finished product to the Filling
Lines
Indicates when valve AV-MT is closed
Indicates when valve AV-MT is open
Indicates the level in the Mixing tank
13
6. Electrical Specifications
6.1.
The Ultrasonic Level Sensor ULS-1 provides a 0-10VDC signal to the PLC.
6.2.
6.3.
6.4.
All output signals are 120VAC. A dry contact type of output module is
required.
7.1.1.
7.1.2.
7.1.3.
7.1.4.
7.1.5.
7.2.
To begin a new batch, the operator verifies that the system is ready and that
the Mixing Tank is ready to receive ingredients.
7.3.
The operator will then press the START BATCH pushbutton to begin the
batching process. The HMI indicates that the system is batching. No further
operator input is required.
NOTE: With the exception of the E-Stop pushbutton, all references in this
document to pushbuttons refer to pushbuttons shown on the HMI.
7.4.
7.4.1.
Automatic valve AV-CW opens. The HMI displays the text ADDING
WATER.
7.4.2.
Valve AV-CW remains open until 1275 lbs. of City Water is in the
Mixing Tank. At that point, valve AV-CV closes.
7.4.3.
The open state of AV-CW is verified by limit switch LS-CW2. If LSCW2 is not made within a specified time after the valve was told to open, a
14
fault will be generated and the system will shut down. The HMI displays the
text ALARM.
7.4.4.
LS-CW1 will verify that the valve is closed within a specified time after
the valve was told to close. If the valve closure is not verified within the
specified time, a fault will be generated, the system will shut down and the
HMI displays the text ALARM.
7.4.5.
The time delays used in the Valve Fault detection logic are individually
adjustable in the HMI from 1 to 10 seconds.
7.4.6.
NOTE: All valves and their respective limit switches work in the
manner described above.
7.4.7.
After the City Water has been added, valve AV-CW closes. The HMI
no longer displays the text ADDING WATER.
7.5. Step 2 Ingredient QR
7.5.1.
Valve AV-QR is opened. After the valve position has been verified by
LS-QR2, PUMP-QR pumps 390 lbs. of ingredient QR into the Mixing Tank.
The HMI displays the text ADDING QR.
7.5.2.
After the ingredient QR has been added to the Mixing Tank, PUMP-QR
stops, valve AV-QR closes and the HMI no longer displays the text
ADDING QR.
7.6.
Step 3 Ingredient KM
7.6.1.
Valve AV-KM is opened. After the valve position is verified by LS-KM2,
PUMP-KM pumps 173 lbs. of ingredient KM into the mixing tank. The HMI
displays the text ADDING KM. This text is displayed while the pump is
running.
7.6.2.
After the ingredient KM has been added to the Mixing Tank, valve AVKM closes. PUMP-KM stops. The HMI no longer displays the text ADDING
KM.
7.7.
Step 4 Mixing
7.7.1.
After LS-KM1 indicates the valve has been closed, the agitator motor
MTR-MTA starts. The HMI displays the text BLENDING.
7.7.2.
15
7.7.3.
After the agitator is finished, the HMI no longer displays the text
BLENDING.
7.8.
7.8.1.
Valve AV-MT will open. PUMP-MT turns on and pumps the entire
batch to the filling lines. The HMI displays the text PUMPING TO LINES.
7.8.2.
When the Ultrasonic Level Sensor ULS-1 indicates that the tank is
empty, PUMP-MT stops, valve AV-MT closes and the batching cycle is
complete. The HMI no longer displays the text PUMPING TO LINES and
the text SYSTEM READY is displayed.
8. Monitor Liquid Level
8.1.1.
During every phase of the batching process, the liquid level in the
Mixing Tank must be monitored by the PLC. If the level rises to greater than
95% of that Mixing Tanks capacity, the system will generate a fault and the
batching process must be halted. An alarm is indicated on the HMI.
9. Emergency Stop
9.1.1.
The operator may press the E-STOP pushbutton to stop the process
at any time.
10. HMI Specifications
10.1. General
10.1.1. The monitor is a touchscreen. With the exception of the E-Stop
pushbutton operator, all system control is performed with this monitor.
10.1.2.
10.1.3.
Colors
10.1.3.1. All colors used on the HMI will adhere to the following RGB (red,
green, blue) values:
10.1.3.1.1.
10.1.3.1.2.
10.1.3.1.3.
10.1.3.1.4.
10.1.3.1.5.
10.1.3.1.6.
10.1.3.1.7.
Black (0, 0, 0)
White (255, 255, 255)
Gray (192, 192, 192)
Light Gray (224, 224, 224)
Red (240, 0, 0)
Green (0, 192, 0)
Yellow (255, 255, 0)
How to Program RSView32
Copyright 2009 Modern Media
engineersandtechnicians.com
16
10.1.5. The normal screen font is Arial 12, black. The minimum screen font is
Arial 10, black.
10.1.6. The status of the system is indicated on every screen. The font is Arial
18, bold, black.
10.1.7. If an alarm occurs, a yellow graphic with the text ALARM of sufficient
size is displayed to draw the attention of the operator. The font is Arial 16,
bold, red. A separate RESET button allows the operator to reset the alarm.
10.2. Equipment Symbols
10.2.1. All equipment symbols will be 3-D, shaded, and drawn from the
Graphic Libraries within RSView. Icons will be animated using colors to
indicate the state of the equipment.
10.2.2. The position and status of all valves are indicated by the fill color of the
respective valve icon. Valve icon colors are displayed as follows:
10.2.2.1. Closed: red
10.2.2.2. Open: green
10.2.2.3. Alarm: yellow
10.2.3. The status of all pumps and motors valves are indicated by the fill color
of the respective icon pump and motor icon colors are displayed as follows:
10.2.3.1. Stopped: red
10.2.3.2. Running: green
10.2.3.3. Alarm: yellow
10.3. Screen Descriptions
10.3.1. There are 6 screens in the system, described as follows:
10.3.1.1. Screen 1 - System View
10.3.1.1.1. An overall system view is shown, similar to the example
shown in this document.
10.3.1.1.2.
17
10.3.1.5.1.3.1.
10.3.1.5.1.3.2.
10.3.1.5.1.3.3.
10.3.1.5.1.3.4.
10.3.1.5.1.3.5.
10.3.1.5.1.3.6.
10.3.1.5.2.
10.3.1.5.2.1.
The completion date and time of each batch is
recorded. This information is maintained for a minimum of 180
days.
10.3.1.5.3.
General
10.3.1.5.3.1.
The system name (Hyper-Glass Cleaner) is
displayed on each screen, using the company colors of blue
and light blue in the header. The navigation menu appears in
How to Program RSView32
Copyright 2009 Modern Media
engineersandtechnicians.com
18
this area. All screens in the system are available from this
menu.
10.3.1.5.3.2.
The current batching step is displayed from all
screens.
10.3.1.5.3.3.
The current time and date is displayed on each
screen.
19
System Monitoring
From an HMI and SCADA standpoint, we see there are 6 screens required. The screen
resolution is 1024 x 768.
The monitor is a touchscreen. It would be best to have this monitor available to you
during development.
All colors are defined in term of RGB values. This is very helpful, and will save a lot of
headaches further on in the project, as there will be no conflicts over colors as long as
we stick with the RGB values we area given.
The icons that we will use on the screens are defined.
We will need to be able to change a few registers in the PLC through the HMI for the
agitator run time, valve fault times, etc.
Make sure that you clearly understand the scope of any project that is given. If
there are questions or gray areas, present these issues to your project manager
or your client before you begin development.
and fill
20
Stretch the Project window down so that you may see more of the folders the window.
21
folder.
22
23
Click OK.
Click Node
You can name a node pretty much anything your want. In our case, we will use 410.
Discuss this with the PLC programmer. Type 410 into the Name: field.
The channel we need to use for a direct serial connection is DH-485. Select that in the
dropdown box for Channel.
The Station: field refers to the station number of the PLC to which you are connected.
If RSLinx is running, you can click on the browse
the station number is 01.
Click Close.
24
These are all the basic settings you need to begin screen development. We will go over
the other functions in the Project tree later on.
25
Digital Tags
Lets start with Bit B3:0/0, which is the System Enable bit. As shown in Rung 0001, this
bit will turn on when the E-Stop is cleared and there is no System Fault.
We can create a tag that references this bit. Click on Tag Database
the Project tree. You will see a screen like this:
in
I like to use the Address Descriptor from the PLC program as the name. By doing it that
way, when you go back and forth from the PLC program to the RSView project, you see
the same names.
Type SystemEnable in the Name: field.
Notice that there is no space in the tag name. RSView does not allow this, or most other
special characters. To play it safe, use only alphanumeric characters, the underscore
(_) and the hyphen (-). Capitalize words to make it easy to read.
Tags come in three different types; analog, digital and string.
26
An analog tag refers to a numerical value. This can be a value from an analog input
card, a scaled value from an SCP instruction, a timer preset value or a timer
accumulated value, among others.
In our program, you would use this when creating a tag for the Tank Weight (word
N7:0), for example.
A digital tag refers to a binary value. This is used with any bit address, such as our
System Enable bit. It can also refer to an output, an input, a timer done bit or a timer
enabled bit.
String tags are ASCII strings or whole words. String tags are not used frequently.
Lets continue defining the SystemEnable tag.
Choose Digital as the type.
The Security attribute of the tag is shown as a dropdown menu. The security code lets
you restrict access to the tag to only those users who have access to the code assigned
to the tag. The default code (*) allows access to the tag to all users. You can leave the
default security setting as is.
Type System Enable in the description field. Some people wouldnt bother with adding
the description for this bit; after all, the Tag Name tells you the same thing. We will,
however, add descriptions for all of the tags.
The default values of Off and On are fine for this tag, as they are for most tags.
The default for the Data Source is Memory. In most cases, you will use Device, as
this tag references an address in the PLC.
Select Device.
A new set of fields appears. Click on the browse button
by the Node Name: field.
The only option that appears is Node 410. This node name appears because we
defined it earlier. Select that and click OK.
The default Scan Class: of A is fine.
Type in the address of the bit in the Address: field. It should appear just as it does in
the PLC program. For the System Enable bit, that address is B3:0/0.
27
Click Accept.
28
The tag is now displayed as the first, and only, tag in the database.
29
If you have a tag that has the wrong name, the easiest way is to duplicate the tag,
rename it using the correct name and then delete the original tag. This can only be done
if you have not used the tag elsewhere in the project.
To do this, highlight the tag you would like to correct.
Click on the Duplicate Tag
button.
As you are entering tags in the database, make sure your tag names are correct
before you accept the tag. Double-check the tag names for accuracy and typographical
errors.
Add the tags for all of the inputs (I:x/x) and outputs (O:x/x) in the same way.
Timers
Timers offer a number of possibilities with RSView. We can create digital tags to look at
the enable bits (EN) and the done bits (DN) just like any other digital bit. However, we
can also create analog tags to look at the preset (PRE) value of the timer and the
accumulated (ACC) value of the timer.
Lets start by creating tags for the digital parts of timer T4:0. Look at the cross reference
printout and you will find that T4:0 is the timer used to determine the Agitator Run Time.
The address of the enable bit for this timer is T4:0/EN. As you will recall, this bit turns on
when the preceding logic in the rung is true and the timer is enabled.
To add this tag, click on the Insert Row
button. Type AgitatorRunTimeTimerEN in
the Tag Name field. The timer word in the tag may seem a bit redundant, but you will
see later on how important it is to identify this tag as a timer.
30
Click Accept.
Now we can create the digital tag for the done (DN) bit of the timer. The easiest way is
to duplicate the tag we just made.
Click the Duplicate Tag
button.
31
button.
32
You can limit the range of minimum and maximum values that the end user can specify.
The project scope says that the range must be adjustable from 60 seconds to 360
seconds.
Since the time base for timer T4:0 is 1.0 seconds, enter 60 for the minimum and 360
for the maximum.
Type the units in which the tag value is measured. In this case it is seconds. This text
label is for display only. It has no other effect.
The default setting for the data type can be left alone. RSView will automatically assign
a data type based on the address specified in the Data Source.
For the Data Source type, choose Device. The Node Name is 410.
Type in T4:0/PRE for the address. Your screen should look like this.
Click Accept.
Though it is not required by the scope, if we wanted to watch the timers progress when
the agitator is running, we would need a tag that shows the timers accumulated value.
33
Start by duplicating the tag we just made. Change the fields to make it look like the
screenshot below.
Click Accept.
You might wonder why the minimum value was left at 60, since the accumulated value
of the timer will certainly start at zero. That is because the minimum and maximum
values for an analog tag do not affect the value that RSView reads from the PLC. In
other words, it doesnt matter what the min/max values are; RSView will still read and
display whatever value is in the timers accumulated word.
We will set up the Valve Fault Timers in the same way. Start by duplicating the Agitator
Run Time Timer Preset tag.
Name the new tag CityWaterValveAV-CWFaultDelay.
Put City Water Valve AV-CW Fault Delay in the Description field.
Change the minimum value to 1 (as stated in the Project Scope).
Change the maximum value to 10 (again, as stated in the Project Scope).
Change the address to T4:1/PRE and click Accept.
Duplicate the tag Agitator Run Time Timer Done. Use this to create a tag for Valve
AV-CW fault timers done (DN) bit. Name this tag CityWaterValveAV-CWFault
In a similar manner, create tags for all the valve fault timers.
The last tags we have to create are the analog tags for the Mixing Tank Weight and the
Mixing Tank Liquid Level.
How to Program RSView32
Copyright 2009 Modern Media
engineersandtechnicians.com
34
Start by creating a new tag by inserting a row. Click the Insert Row
button.
Either create a new tag or duplicate the one you just made for the Liquid Level. Since
this is a percent full value, set the minimum to 0, the maximum to 100 and the units to
%.
35
The address is N7:1. It will look like this when you are done.
You have completed a major phase of this project. Entering the tags is a tedious, but
necessary, part of the process. It starts to get a little more interesting from this point on.
36
Scope Requirements
An overall system screen is shown at start
up.
Screen Name
System View
System View
Closed: red
Open: green
Alarm: yellow
Pump icon colors are displayed as follows:
System View
Stopped: red
Running: green
Alarm: yellow
The Mixing Tank weight is displayed.
System View
Maintenance
Alarms
Batch Log
(all screens)
(all screens)
(all screens)
37
38
A new window with an untitled display is created. Right-click on the new window and
select Display Settings.
This will appear:
Many of the default values are fine, but we need to set a few. Some of them you may
want to set for ease of development, such as the title bar.
Display Type:
It is less confusing for the operator if you use Replace. This keeps windows from
getting stuck behind other windows.
Allow Multiple Running Copies:
For our application, there is no need for this.
Cache After Displaying:
In large applications, this could help speed things up. It will consume extra RAM on the
PC that is running RSView, though.
39
Title Bar:
You want to leave this on during development, with the System Menu and Minimize
Buttons enabled.
However, at runtime (when RSView is actually running in a live plant environment), you
will probably disable this, as it allows more access than the operators need.
Check Size to Main Window at Runtime and Show Last Acquired Value.
Size:
Specify the correct size of the monitor.
Resize:
Check Allow Display to be Resized. This will compensate for minor hardware
variations and make sure that the screen will resize to fill the monitor.
Position:
In most cases, set this to 0, 0.
Security Code:
Leave as is for the time being.
Background Color:
Though it is not obvious, the third square from the upper left is the proper shade of gray.
40
41
There are a couple of ways to get solve this problem. We could use icons that have
different shapes, depending on whether they are on or off. In addition to being a
different color, a pump icon that is off could have a round hole cut out in the middle,
such as is shown below.
Here is what the pumps shown above might look like to a person who is colorblind.
The black dot in the middle of the pump that is off will be appreciated.
Another option is to add text. Not only does this help the person who might be
colorblind, it obviously confirms the state of the equipment to those even with true color
vision.
Since the scope states that we must use standard RSView icons, we will use text to
define the state of the equipment.
42
All the display graphics files are displayed to the right. Double-click on System View.
Click on the rectangle icon
from the toolbar. As with other Windows programs, you
may also find the same command by using the dropdown menus at the top of the
screen it is your choice.
Click and drag to form a rectangle at the top of the display. Dont worry about getting it
exactly the right size, as we will adjust it.
Right-click on the rectangle and choose Attributes > Fill Color.
43
44
By default, RSView places a border around most objects, such as rectangles, circles
and polygons. In some cases, this is undesirable. Right-click on the rectangle and
choose Attributes > Line Color
Click on the blue custom color and click OK.
Using the grid and turning on snap helps place objects accurately on the screen. From
the View dropdown menu, choose Grid Settings. The default setting is 10 pixels. This
will be fine for now. Select Snap to Grid. This limits the placement of handles to the
points of the grid.
You will find that when placing or resizing some objects, you will have to turn snap off.
45
Re-size the rectangle by using the handles on the corners and sides of the rectangle.
Click and drag until the rectangle fills the top section of the screen.
It should look something like this.
Unfortunately, RSView does not offer the option of specifying the height, width and
position of a graphic, except by using animation, which is only seen at runtime. You just
have to pull the handles around until the graphic fits.
Adding the System Name
Select the Text
button from the toolbar. The cursor changes to a horizontal bar.
Click on the blue header and type Hyper-Glass Cleaner.
Change the font color and size by clicking on the Select
on the text you just entered. Choose Attributes > Font.
46
47
That process may seem a bit convoluted, but you will find yourself rearranging elements
frequently to get them to appear properly.
The screen should look something like this.
Clearly, the text is too small. The size can be changed by selecting it and dragging the
handles. This is convenient for getting a rough idea, but I would not leave it like that. At
runtime, text that was sized this way may be displayed improperly. Stretch it and distort
it all you want, but always use the Attributes > Font menu for the final sizing.
In placing this text, you will find that the snap function is too limiting finer resolution is
needed. Also, trying to place the text with a mouse is difficult.
From the View menu, de-select Snap On.
Select the text, but leave the cursor inside the selected area. You can then use the
arrow keys to move the element a pixel at a time.
The Navigation Menu
There is certainly a wide range of options when it comes to creating navigation menus.
Navigation, or how we get from screen to screen, comes in many forms; some methods
are good and some are not so good. I have a few principles that I feel are important.
48
Navigation should be obvious. If the user has to stop his train of thought and search
for the button or element that needs to take him to where he wants to go, there is a
problem.
Multiple paths to the same destination are OK. If the user can get to the alarms
screen by clicking the alarm button, but also get to it by clicking on a valve in alarm, that
is totally acceptable. In fact, multiple navigational paths add value to an HMI, simply
because not every one thinks the same.
Always try to provide immediate feedback to the user after a navigation link is
clicked. Most times, having the cursor change to an hourglass is sufficient.
Make it immediate obvious to the user that he has reached the screen he was
seeking. For example, you might put a title on each screen.
Keep the navigation menu consistent from screen to screen. The button, or link,
that takes you to Maintenance section, for example, should always be in the same
place.
User testing is critical to creating good navigation. This is the single most important
step in designing the navigation for an HMI. When you have enough screens developed
so that the navigation is in place, grab some co-workers and ask them to individually
look at your design. Put them in front of your computer and let them poke around your
system.
Here is the key to successful user testing dont provide any instruction; just watch.
Take note of where they click, and how long it takes them to get where they want to go
Remember that it is not the users job to learn your thought process so that they
can use your system. It is your responsibility to create an HMI that
accommodates the users thought process.
For example, if you see a test user pause for more than a couple of seconds, trying to
find where to click, that is a problem. If they have to ask you how to navigate to a given
screen, that is a big problem.
Granted, our design is relatively simple. Chances are that few people will have a
problem navigating a system with only six screens. In larger systems, however, user
testing is obviously even more important.
If someone has a problem with your navigation technique, dont try to defend your
design. Just fix it. More likely than not, if one of your test users has a problem, then
somebody in your customers plant will have the same problem.
49
50
Click on the Up Appearance tab. Type System View into the text field.
Click OK.
51
Select the button and make 5 copies of it. Roughly place the buttons in a row beside the
original button.
One at a time, right-click on each button and change the text in the Up Appearance
text box to the screen names, as follows:
Agitator Process Run Time
Valve Fault Detection Time Delays
Maintenance
Alarms
Batch Log
52
We have a problem. The text wont fit in the Agitator Process Run Time and Valve
Fault Detection Time Delays buttons.
We have some options. We could make the font smaller, and perhaps make buttons
taller. We could use abbreviations in the text.
We could shorten the length of the other buttons, and lengthen the buttons in which the
text wont fit.
The only way to really solve the problem is to try these options and see which one
works out the best.
53
After working with the design for a while, you might come up with something like this:
An exception had to be made in the case of the Valve Fault Detection Time Delays
button. There simply was not enough room to include the word detection. In a real
world situation, I would make it a point to discuss this with the client or customer and get
his approval.
The background color of the pushbuttons in RSView can be specified in the Button
Configuration window for each. However, the color palette that appears does not
include the custom colors that we made earlier. To get the background color of the
button to match the blue specified in the scope, you must use a background bitmap for
the button.
First, make a bitmap of the RGB color you need. I used PhotoShop, but you can use
any image editor. The size is not too important, as RSView will scale it to fit the button.
100 pixels by 50 pixels is fine.
54
Click the Import button and find the bitmap you made. Your custom bitmap is now part
of your button.
55
Click on Tags.
A list of all the user-defined tags (the ones we created earlier) appears.
Double-click on the folder icon in the upper right to expand the folder. A system folder
appears. Open it.
56
Youll see that we could have simply typed the tag name into the Expression field.
Create a numeric display field for the date in the same way. This time, though, use the
tag system/Date. Also, select Left in the Justification area.
Align the two fields on the display.
57
A note about time and date fields: it takes some tweaking to get them to display
properly. At runtime, when you are actually connected to a PLC, make sure that
everything shows properly.
Batching Step
We have to display the batching step in which the system is currently operating.
The batching steps, including the state of the system being ready to batch, from the
scope, are:
System Ready
Add City Water
Add Ingredient QR
Add Ingredient KM
Mix the batch
Pump the batch to the filling lines
Since all of these messages will appear in the same area of the screen, it is preferable
to have the messages about the same length. Lets change Pump the batch to the
filling lines to Pump batch to filling. Chances are that the plant personnel call that area
Filling, anyway. This is another point that should be discussed with, and approved by
the client.
We will adjust the tense to the present:
System Ready
Adding City Water
Adding Ingredient QR
Adding Ingredient KM
Mixing Batch
Pumping Batch To Filling
This is the text we will use to show the status messages of the system.
Click on the Text button in the tool bar, pick a place on the screen and type System
Idle. Change the font to Arial 18 Bold Black. We can always adjust it later.
Copy and paste the text element five times. Change the text in the copies to match the
remaining states of the system.
Use the Rectangle button on the toolbar to make a rectangle that is large enough for the
longest message to fit in. In this case, that message is Pumping Batch To Filling.
Change the line color to black and the fill color to white. Again, dont worry about getting
the size exactly right we will tweak it later.
58
Our goal is to place all of the messages in the rectangle and, through the Animation
function of RSView, control the visibility of each message. Depending on the state of the
system, only one message at a time will be visible. The remainder of the messages will
not be seen.
59
Right-click on the System Ready text and choose Animation > Visibility.
The Animation window appears. As you can see, there are a number of attributes that
we can change with animation. This is a powerful function of RSView and we will use it
frequently throughout our project.
You can change the position of an element, the fill percentage (to make your own bar
graph, for example), the color, the width, the height or define a command that is
executed when the element is clicked.
You can define just a tag to initiate the animation or write a complex Boolean
expression. In this case, we will just define a tag.
60
Click OK.
61
You could amend the expression to say SystemReady = 1 and RSView would respond
the same.
Note the Expression True State section and you will see that we have a choice of
Invisible or Visible. What is checked in this box is what will happen when the
expression is true. We want our text to be visible when the SystemReady bit is on, so
we will leave Visible checked.
Click Apply and then click Close.
In a similar fashion, add animation to the remainder of the text messages. Adding City
Water is attached to the tag BatchStep1. Adding Ingredient QR is tied to
BatchStep2, and so on.
Now we have to align all of the messages and put them in the rectangle.
Select the rectangle. From the top menu, choose Arrange > Send to Back. We want to
make sure that all of the messages are in front of the box so that they are not hidden.
Click and drag the cursor so that you have selected all the messages and the rectangle.
From the top menu, choose Arrange > Align Center. This will re-position all the
elements so that all of their centers are on the same point.
62
It now appears that the rectangle is a bit too tall. Resize it to a more appropriate aspect
ratio and your screen looks like this. Also, lets move it to the upper right section of the
screen.
Yes, it looks like a mess; at runtime, though, they will sort themselves out.
Alarm Indication
If there is a fault, or alarm, we want to make it very clear to the operator. Lets add a text
box to the header in bright colors that people will be able to see from across a room.
Draw a rectangle in the header area between the Hyper-Glass Cleaner text and the
time display. Change the line color (border) of the rectangle to red. Change the fill color
to yellow.
Put the text ALARM inside of the rectangle. Change the font size to 16 and the color to
red. Select both the text and rectangle and align the centers of the elements using the
drop down menu as we did with the batch step messages.
We will use animation to make this visible when a fault is detected in the PLC. We want
the box and the text to be invisible if there is no alarm. If there is an alarm, we want
them both to be visible.
63
We could set the animation for both elements individually to accomplish that. However,
RSView will let us group objects together. That way, we only have to assign one
animation to the group.
Select both the rectangle and the text by clicking and dragging a selection box around
the two elements. From the top menu, choose Arrange > Group. You will see that now
only one set of re-sizing handles appear around the group.
Right-click on the rectangle or text and chose Animation > Visibility. Click on the Tags
button and choose SystemFault. Click Apply and then Close.
If for some reason you have to change an attribute of the group, such as the fill color of
the rectangle, you will have to Ungroup the group, edit the elements, re-group them
and re-animate it.
Here is how the alarm rectangle might look.
64
65
Select all the elements of the pushbutton and align the middles of the elements. Group
the elements.
Now we can animate the button to reset the fault logic in the PLC. Right click on the
new button and choose Animation > Touch.
66
We have the option of a Press Action, a Repeat Action and a Release Action. In
this case, all we care about is press and release.
Click on the button with the dots to the right of the Press Action box. The Command
Wizard window appears. Open the System folder. Open the Tag Database folder.
Click on the Set command, as we want to write a value to a tag.
Click next
67
Type a 1 in the Set to Value or Label field. Check the Verify box.
We have configured this pushbutton to set the ResetAlarm tag to 1 when the button is
pressed. Also, RSView will verify that the bit in the PLC was set to 1.
Since we want this to be a momentary action, we will configure the Release Action to
change the value to 0 when we release the button.
In the Release Action field, use the same method we used to configure the Press
Action, except set the value to 0.
68
69
Select the top pushbutton, and click Arrange > Ungroup from the top menu.
You will get a message saying that Un-grouping will delete animation from this group.
Do you wish to continue?
Click Yes.
Right-click on the black circle in the button. Choose Attributes > Fill Color from the
menu. Fill the circle with the specified green color.
Edit the text to say Start.
70
Select all the individual elements of the push button and align them on center (Arrange
> Align Center.
Put the elements in one group.
As we did with the Reset button, animate the group with touch. Use the StartBatch
tag. Since we also want this to be a momentary switch, set the Press Action to &Set
StartBatch 1 /V and the Release Action to be &Set StartBatch 0 /V.
Repeat the steps with the other copy of the Reset button. Use the red specified in the
scope (240,0,0,). Associate the touch animation with the StopBatch tag.
How we position and arrange our buttons is important. Typically, the stop button is
located at the lower right of any arrangement. The reset button would be placed first,
since if there is an alarm, nothing will work until the alarm is reset.
Of course, the client or customer has the final say. Here is how our display looks so far:
This completes the master layout. As we add the details of the individual screen design,
we may find that we will have to alter the master layout slightly. We wont concern
ourselves with that until a problem arises.
71
Screen 1 Content
We will use the layout provided with the scope as a guide to create the content for the
System View screen.
Lets start with the larger elements first. We need three tanks; one for ingredient QR,
one for ingredient KM and the mixing tank.
In the Project window, open the Graphics folder. Click on Library. On the right side
of the window, scroll down to Tanks and double-click on it. Choose the tank pictured
below, since this most matches the type of tanks that already exist in the system.
The graphic is going to be a bit large for our layout, so you can use the re-sizing
handles to make it smaller.
Copy the graphic and paste it twice. Re-size the copies to make them reasonably match
the basic dimensions of the existing QR and KM tanks.
Label the tanks.
72
Open the Valves display in the Library folder of the Project window and drag the
valve into the System Display window, as shown below.
We are going to add the limit switches, text and animation to one valve first. Then we
can make copies to use for the remaining valves.
Zoom in on the valve by using the Zoom In button on the toolbar. Draw a small
rectangle near the valve to use for a limit switch, as shown in the sample screen from
the scope. Set the fill color and the line color to gray.
Click the Line
button on the tool bar and draw a line from the rectangle to the
valve. Select both the rectangle and the line and make a copy. From the Arrange dropdown menu, choose Flip Horizontal. Move the copy to the right side of the valve.
Add the text that is required for valve AV-CW. The device name AV-CW is in the
normal screen font size of number 12, as defined by the scope. The limit switch names
use the smaller font size of number 10.
73
Now we need to animate the valve. Each valve will be displayed in one of 3 states;
open, closed or alarm.
The valve will be green in the open state, red in the closed and yellow in the alarm
state.
The PLC program already has tags available that we can use to determine what state
the valve is in.
Start by copying just the valve body of the graphic. Type CLOSED just below the
graphic in Arial black, size 10. Align the centers of the text and the graphic.
74
Select the graphic and change the fill color to red. You should have something like this.
75
Make two more copies. Change the color of the first copy to green and change the text
to OPEN.
Change the color of the second copy to yellow and change the text to ALARM.
Align the centers of the respective text and valve graphic, and then group the valve with
its text. This is how your screen should look.
You might wonder why we need to leave the gray icon in place, as we will only have
three states of the valve. Some valves are slow, and it takes a while for the valve to
make the transition from one state to another. That means there could be moments
where the valve is neither open, closed nor in alarm. That means that none of the red,
green or yellow icons would be shown. Well, we dont the valve to disappear from the
screen, so we will leave the gray valve graphic in place.
Some designs consider the transition from open to close, or vice versa, as another state
and use another color icon, such as orange, to indicate this state. That was not
specified in the scope, so we will just leave the gray icon in place.
76
Animate the visibility of the closed group using the tag CityWaterValveAVCWClosedLS-CW1.
When the limit switch LS-CW1 is actuated, this tag will be on and the graphic will be
visible.
Animate the open valve graphic in a similar way using the tag CityWaterValveAVCWOpenLS-CW2.
Animate the alarm valve graphic with the tag CityWaterValveAV-CWFault.
The trick now is to place all of the valve graphics exactly on top of the original gray
graphic, making sure that there is not even a pixel difference as they are aligned. Before
you start, though, make sure that the yellow alarm graphic has priority. If you look at the
logic in the PLC program, you will see that it is possible that the valve could be in alarm,
yet also be actuating the closed or open limit switch. In that case, we want to the alarm
state to be shown.
Make sure that the alarm graphic is in front by selecting it and choosing Arrange > Bring
to Front from the top menu.
77
When you are done, the valve will look like this.
At runtime, the graphics will sort themselves out and only the correct one will be shown.
78
Make three copies of the entire valve composition. These copies will become the
graphics for valves AV-QR, AV-KM and AV-MT. Change the text as appropriate. To
animate the graphics, you will have to drag the different colored valve icons off of the
gray valve icon and apply the animation. When the animation is complete, align all of
the icons as you did with valve AC-CW.
Place the new valves near the corresponding tanks. Your screen should look like this.
79
Pump Icons
Open the Pumps graphic from the standard graphics library.
Select the pump icon that matches the icon shown in the scope and drag it to your
display. It is much too large, so use the handles to resize it.
Lets start by making this the icon for the KM pump (PUMP-KM). Add the identifying text
to the pump. Add the text identifying the state of the pump (ON). Copy the graphic to
another area of the screen.
We wont need an alarm state for the pump, as the scope did not request this. We will
also not need to have a gray icon, as the pump will only be either on or off.
Change the fill color of the running pump icon (ON) to green. Make a group from the
icon and the ON text. Animate the visibility if the group to be visible when tag
RunKMPumpPUMP-KM is true.
80
Change the fill color of the stopped pump icon (OFF) to red. Make a group from the icon
and the OFF text. Animate the visibility if the group to be invisible when tag
RunKMPumpPUMP-KM is true.
Make two copies of the pump for PUMP-QR and PUMP-MT. Change the text and the
animation appropriately.
81
82
Agitator Motor
Open the Motors Reliance display from the graphics library. Select and drag the motor
that matches the icon shown in the scope. As with the pumps, create a green icon and a
red icon, label and animate as required.
83
Scales
The last primary element we need to add is a display for the scales, showing the actual
weight of the tank.
From the top menu, click Objects > Advanced Objects > Numeric Display. This is the same
type of display we used for the date and time.
Click Tags and select the tag WeightOfMixingTankPounds. Set the field length to 4.
Create a black rectangle, as is shown in the scope. Change the font color of the
numeric display to red and center in the rectangle. Adjust the font size as necessary.
84
Draw a line from the numeric display to the tank, and you screen should look like this.
85
Adding Piping
Open the Pipes 3 graphic from the library.
Use the smaller set at the bottom of the graphic. Place the pipes as necessary. You
may have to change the length, but dont try to get the pipes to mate up exactly with
the other elements. It goes much more quickly if you leave the pipes a bit long and
simply send them to the back, behind the element to which you are connecting.
86
After adding the piping, rearranging the icons and adjusting of fonts, here is what we
have.
The final decision on how the elements look is, of course, up to the client or your
supervisor.
By the way, the frame for the RESET / START / STOP buttons is actually a standard
RSView pushbutton. It was stretched to fit and then a bitmap was created. It helps to
segregate the control buttons, and give the operator a sense that he is using a
traditional pushbutton station.
87
RSView lets you simulate, to a point, what the display will look like at runtime. Click the
Test Run
As you can see, there are a number of graphic elements that are shown improperly, or
not shown at all. If we had a PLC connected, and these elements were still shown
incorrectly, we would know that these elements have some sort of problem associated
with them. Perhaps an element is associated with a tag that is improperly addressed in
the PLC. At any rate, each of these elements would need to be investigated to find the
problem.
In a case where there are many problems and we know that we should be
communicating with a PLC, the first place we would check is the primary configuration
to make sure we have any connection at all with the PLC.
This test mode is handy for checking the navigation buttons. RSView will find and
display all the screens, even if it is not connected to the PLC.
Click the Normal
88
It is a good idea to create a mock-up showing the system in normal operation, and
another mockup showing what the system looks like when there is an alarm. This helps
people to easily visualize how the screens will change.
If you dont have access to the PLC, which would allow you to show the different
conditions, then create a copy of your System View display. Save this display as
System View Review Normal. Save another as System View Review Alarm.
Do what you have to do to create a mock-up, such as deleting the date and time
numeric displays and creating a mock time and date using plain text. Put the valves and
motors in a state that is reasonable. All you need are screenshots to print and present
to the client.
In reality, this would be the first step you would take in a project, especially if you did not
have a sample screen supplied with your scope. For the purpose of this book and
learning how to program RSView, however, making a mock-up first seemed counterproductive and would have probably been confusing.
Remember, as you work with RSView in the real world, do not to go very far in your
design before you have official approval. At this point, if your client or supervisor
decides that they dont like the looks of your valve icon, for example, it would take a fair
amount of time to replace all of those.
89
90
91
92
Under the Command Categories on the left, choose the Graphics, Graphic
Displays, Navigation folder.
Click Next.
93
Now you might notice that all we really had to do was type Display System View to
configure the press action.
94
Use whichever method you like to compete the menu configuration. Just make sure that
you overwrite the other displays (that is, save as Agitator Process Run Time, Valve
Fault Time Delays, Maintenance, Alarms and Batch Log) with the properly configured
menu.
95
Click on the dotted button beside the Tag Name field. Choose
AgitatorRunTimeTimerPRE. This is the preset value of the agitator run time timer. This
is the value, in seconds, that determines how long the agitator runs.
Change the field length to 3, as 360 seconds is the maximum time allows.
Center justification will work best for this field.
Click OK.
96
We need to make sure that the operator can only enter values from 60 seconds to 360
seconds. This is called range limiting.
In the Project window, click on System, then on Tag Database. Scroll down to the
AgitatorRunTimeTimerPRE tag.
Make sure that the Minimum field is 60, and that the Maximum field is 360. At
runtime, if the operator were to try to enter a number outside of that range, RSView
would not accept it and the previously entered value would be maintained.
Close the Tag Database window.
97
Lets finish this display by putting some descriptive text around the numeric input field.
98
Right-click on the numeric input field for the city water valve. Click on the button to
see a list of the tags.
There is no tag that exists for the city water valve fault time delay, so we will create one.
We know that the timer exists by looking at the PLC program in LAD 4 FAULTS. The
timer for the city water valve fault is T4:1. We want to access and alter the PRE value of
the timer.
99
In a similar manner, create the tags for the preset values of the remaining timers.
At runtime, the current values of the timers preset value will be shown. The operator
may change the value in a range anywhere from 1 second to 10 seconds.
100
Click on the numeric display button and draw a rectangle in the square to the right in the
QR Pump row.
The Numeric Display window appears. We have not defined the tags for the motor
runtime hours, so click on the Tags button, and then the New Tag button.
Note the LAD 5 RUNTIMES file in the PLC program. Counters are used to keep track
of the total run times of the motors. The actual hours are stored in the accumulated
(ACC) register of the respective counter.
101
Click OK.
102
Create numeric displays for the remainder of the motors. Your screen should now look
like this.
103
104
Right-click on the alarm summary area. Choose Alarm Summary Object > Open.
The top menu in RSView has changed to accommodate editing the alarm summary.
Click on Insert > Tag Name and click near the upper left corner of the alarm summary
window. Your screen should look like this.
There are a number of fields we can add to the summary, as shown below:
105
We will add a few of the basics, so that our summary looks like this.
The text in the boxes above the line represents the field titles that will be shown at
runtime. You can change them to read whatever you would like.
You can also set the width of each field.
106
107
You can also specify which buttons appear in the button bar. Choose Format > Buttons
from the top menu.
Ack means that the alarm will be acknowledged when the button is pressed. To
silence the alarm means that the alarm sound made by the computer will be silenced.
Execute and identify have to do with macros; we have no use for those here. Filter
and sort allow the operator to display only certain alarms, or allow the alarms to be
sorted by any field.
108
Alarm Setup
In the Project window, open the Alarms > Alarm Setup window.
The Setup tab shown below allows you to set the path for the log file, among other
things.
109
The File Management tab lets you set some alarm file parameters.
Be aware that these files can grow very large over time. They have been known to fill a
hard drive, which of course causes other problems.
Configuring a Tag to Trigger an Alarm
The last things we need to do are select and configure the tags we want to include in
our alarm list.
110
Open the Tag Database from the project window. Scroll down to the
CityWaterValveAV-CWFault.
111
Under Alarm Type, we can select the alarm to trigger when the tag turns on, off,
changes, changes to on or changes to off. The changes types differ from a normal
on or off in that these are considered out-of-alarm immediately after the change of
state.
For our purposes, we can simply leave the default setting as they are. Click OK.
If you ever need to reconfigure the alarm parameters for a given tag, just click on the
Alarms button.
Configure the alarm parameters for the following tags, as listed in the scope.
- Valve AV-QR Discrepancy Fault
- Valve AV-KM Discrepancy Fault
- Valve AV-MT Discrepancy Fault
- Mixing Tank Hi Level (above 95% of capacity)
- Emergency Stop Activated
In the case of the Emergency Stop Activated alarm, we will use the
E-STOPClearedPB3 tag and set the alarm to trigger when the tag is off.
112
Use the Path tab to set the path to your log file.
Click on the File Management tab. We want only one file, so choose Never under the
Start New Files section.
113
Click on the Log Triggers tab. Select the On Change option, since we want the
system to record every time our chosen tags change state.
114
Select the Tag in Model tab. Click on the button to the right of the Tag(s) to Add
field. Individually select the BatchStart and BatchComplete tags. Click the Add
button so that your screen looks like this.
115
116
Click on Create from File and navigate to the file you want to use. In our case, this is
the end result.
The whole idea here is that we can create a data log file and then use the OLE feature
of RSView to display it. There is no doubt that it will take some tweaking to get it to work
properly in a real world situation.
117
118
119
120
121
Finishing Touches
We still have some configuration changes to make so that RSView will start properly.
In the Project window, open the System folder.
122
The Preferences tab provides a number of options revolving around how many
standard Windows features will be shown when RSView starts.
Typically, since most applications are on a factory floor with minimum security, nearly all
of the features are disabled, as shown above.
Title Bar
Check this box to display the name of the application in the title bar at the top of the
window. This usually isnt very important and just consumes real estate on the screen.
Menu
Check this box to display the system menu at the top of the RSView32 window at
runtime. If this is disabled (check box is cleared), the Maximize Button option in the
Display Settings - Properties tab is grayed out. In our application, there is no need for
this.
123
Activity Bar
Check this box to display the activity bar at the bottom of the screen. Again, in our
application, this is not necessary.
Minimize Button
Check this box to display a minimize button in the top right hand corner of the window.
Maximize Button
Check this box to display a maximize button in the top right corner of the window.
Control Box
Check this box to display a control menu box in the upper left corner of the window.
When this button is clicked it displays the control menu that allows the user to
manipulate the window. We dont want to give the operators access to this.
Project Manager
Check this box if you want the Project Manager to be displayed at runtime.
Disable
Ctrl-Alt-P (Project Manager)
Check this box to disable the key sequence that will turn on the display of the Project
Manager.
It is important to remember that if the Project Manager box is not checked, you can
press Ctrl-Alt-P to toggle the Project Manager at runtime if you have not disabled the
key sequence. Under some conditions, this is the only way to open the Project
Manager window. It may the only way you can edit the displays or the program
configuration.
Switch to other Apps
Checking this box will prevent users from switching to another application. Checking this
option also disables Ctrl-Alt-Esc, Alt-Tab, Alt-Esc and Alt-F4.
124
125
Trending
RSView provides a lot of flexibility with its trends. You can set up a trend in just about
any way you would like.
There is a very elaborate trend available in the Trends display of RSViews library.
This trend has three variables, with the actual values shown in the box just below the
graph. As you might expect, the red value corresponds with the red line, the green value
with the green line and yellow with yellow.
The unique part of this graph is the array of buttons and arrows below and to the right of
the graph. A trend that is created from the menu (Objects > Advanced Objects > Trend)
would only contain the graph.
126
You can right-click on the graph area and choose Edit Trend. This window appears.
127
The example above shows that the trend is graphing seconds, minutes and hours of the
system clock. We could add any tag we like, whether analog or digital. Colors, scales
and times frames can all be adjusted.
Trends, though, tend to consume a fair amount of computer memory, and may affect
the performance of your system.
128
This function:
SQRT(expression)
LOG(expression)
LOG10(expression)
SIN(expression)
COS(expression)
TAN(expression)
ARCSIN(expression)
ARCCOS(expression)
ARCTAN(expression)
SIND(expression)
COSD(expression)
TAND(expression)
ARCSIND(expression)
ARCCOSD(expression)
ARCTAND(expression)
TIME("time")
BEFORE_TIME("time")
AFTER_TIME("time")
INTERVAL("interval")
FILE_EXISTS("file")
FREE_BYTES(drive)
129
To Reposition An Object
Click the object to select it.
Use the Arrow keys to move the object to its new position:
Press an Arrow key to move the object and cursor 1 pixel in the specified direction.
Press Shift-Arrow key to move the object 10 pixels in the specified direction.
Press Ctrl-Arrow key to move the object 50 pixels in the specified direction.
To Change The Size Of An Object While Maintaining Its Proportions
Select the object.
Grab a corner of the object.
Hold down Shift and the left mouse button as you drag the handle.
When the object is the desired size, release the left mouse button and then release
Shift.
To Create A Perfect Square Or Circle
Select the rectangle or ellipse object.
Grab a handle then press and hold Ctrl.
Hold down Ctrl and the left mouse button as you drag the handle.
When the object is the correct shape and size, release the mouse button and then
release Ctrl.
130
131
Disclaimer
THE AUTHOR INTENDS THIS DOCUMENT TO BE ADVISORY ONLY. ITS USE IN INDUSTRY OR TRADE IS
STRICTLY VOLUNTARY.
THIS DOCUMENT IS PROVIDED BY THE VENDOR AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE VENDOR OR ITS CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENT, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
132