• No results found

How to Program RSView32

N/A
N/A
Protected

Academic year: 2021

Share "How to Program RSView32"

Copied!
132
0
0

Loading.... (view fulltext now)

Full text

(1)

H

H

o

o

w

w

T

T

o

o

P

P

r

r

o

o

g

g

r

r

a

a

m

m

R

R

S

S

V

V

i

i

e

e

w

w

3

3

2

2

How to Program an HMI and SCADA System with

Rockwell Automation’s RSView32

By Neal Babcock

www.engineersandtechnicians.com

(2)

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

(3)

I

I

n

n

t

t

r

r

o

o

d

d

u

u

c

c

t

t

i

i

o

o

n

n

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 Beginner’s 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,

(4)

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. We’ll cover more of this later.

Rockwell Automation Technical Support

Unfortunately, we can’t anticipate all the problems you might face as you are

troubleshooting a program on the factory floor. There are just too many variables. This is why you must establish a relationship with your local Rockwell Automation technical support team. Get to know them before you are in the final stages of a start-up and you run into a problem. They are very helpful and they can save you hours of frustration. Mnay Rockwell reps are not just technical support personnel; they are skilled engineers that are responsible for running their own projects and writing and troubleshooting their own programs. If you run into a problem, more than likely they have already seen it and have come up with a solution.

Software

There are demos available for both RSView32 and RSLogix 500. Talk to your Rockwell rep or visit rockwellautomation.com.

Installing the software and getting it to run can sometimes be an adventure in itself, but once you have it running, it is usually stable.

P

P

L

L

C

C

s

s

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 Rockwell’s proprietary

(5)

RSLogix 500 is thesoftware used to program the SLC family of PLCs.

RSLogix 5000 is used for the ControlLogix PLCs. The SLCs are an older generation of Allen-Bradley

PLCs. They are being slowly replaced by the

ControlLogix and CompactLogix lines. However, the SLCs are still very popular, as they are powerful PLCs that still have many applications. In addition, there are many plants that use SLCs that don’t want to upgrade to ControlLogix processors, because of training issues and the higher initial cost.

Rockwell has promised to support the SLC line until 2012, so you can expect to see many SLCs for a few years to come.

H

H

a

a

r

r

d

d

w

w

a

a

r

r

e

e

One of the nice things about Allen-Bradley’s smaller PLCs is the relative simplicity of assembling the hardware to create a system.

First, let’s 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 4-Slot chassis

1746-A7 7-Slot chassis 1746-A10 10-Slot chassis 1746-A13 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 computer’s 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

(6)

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 Allen-Bradley 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.

(7)

L

L

a

a

d

d

d

d

e

e

r

r

L

L

o

o

g

g

i

i

c

c

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 isn’t 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.

T

T

h

h

e

e

D

D

i

i

a

a

l

l

e

e

c

c

t

t

o

o

f

f

P

P

L

L

C

C

s

s

Lets' define some terms and symbols:

INSTRUCTION – RSLogix’s command language is comprised of “instructions”. An XIC

(it looks like a normally open contact --] [-- ) is an instruction. A timer is an instruction. A few of the most common instructions are described below.

BIT - an address within the PLC. It can be an input, output or internal coil, among

others.

In RSLogix 500, there are a couple of ways to show the address of a bit. The default is: [type]:[word]/[bit]

(8)

For example, an address that references an output of an SLC 500 is O:5/0. That is:

O

:5/0 means that it is a physical output.

O:

5

/0 means that it uses Slot 5 (the 6th physical slot) in the rack. O:5/

0

means that it is the first output on the card.

Remember that the first slot in an SLC 500 rack is Slot 0. That means a card that is installed in the 6th physical slot is addressed as Slot 5.

Allen-Bradley PLCs, like many computers, always start with 0. By the way, don’t get the capital “O’s” confused with zeroes.

RUNG - A section of the PLC ladder program that terminates in an output function of

some type. Just like in an electrical ladder diagram, a rung has some type of output that is turned on or turned off by the preceding entities in the rung. The first rung in a ladder program is always 0000.

HARDWIRED INPUT - a physical connection to the PLC from an input device (switch or

sensor, etc.).

Allen-Bradley uses the capital letter “I” to designate a hardwired input. An address that describes an input on an SLC 500 is I:4/0.

Similar to the output structure,

I

:4/0 means that it is a physical input.

I:

4

/0 means that it uses Slot 4 (the 5th slot in the rack). I:4/

0

means that it is the first input on the card.

Don’t get the capital “I’s” confused with ones.

HARDWIRED OUTPUT - a physical connection from the PLC to an output device (relay

or pilot light, etc.) As was said above, an address that references an output of an SLC 500 is O:5/0.

INTERNAL COIL

This is a programmable bit used to simulate a relay within the PLC. The internal coil has no connection to the outside world. It does not connect to an output card. Internal coils are used to store information. The “contacts” of this “relay” can then be used multiple times in other parts of the program.

(9)

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.

B3

:0/0 means that it references an internal Binary file B3:

0

/0 means that it uses the first word in the table B3:0/

0

means that it is the first bit in the word.

Note that, unlike the Output and Input files, you have to use the file number in the address. In this case, the default file number is 3.

TIMER

A timer is a programmable instruction that lets you turn on or turn off bits after a preset time.

The two primary types of timers are TON for “timer on delay” and TOF for “timer off delay”.

Timers in A-B SLC and MicroLogix processors use file 4 for their timers.

T4

:0 means that it references an internal Timer file T4:

0

means that it uses the first timer in the table

The address T4:0 simply refers to the timer. Each timer has bits that turn on after the timing function is complete. You can address this bit by simply putting a “/DN” after the timer address. DN stands for “done”.

For example, if timer T4:0 is a TON (timer on delay), then the bit T4:0/DN will turn on after the timer has reached its preset value.

COUNTER

A counter is a programmable instruction that lets you turn on or turn off bits after a preset count has been reached.

There are different types of counters available in the RSLogix, but the CTU (counter up) instruction covers everything we will talk about here.

Counters in A-B SLC and MicroLogix processors use file 5.

C5

:0 means that it references an internal Counter file C5:

0

means that it uses the first counter in the table

(10)

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.

(11)

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 – don’t worry, this will start getting easier.

P

P

r

r

o

o

j

j

e

e

c

c

t

t

S

S

c

c

o

o

p

p

e

e

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 don’t, 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.

(12)

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.

(13)

5. System Components

Component Function Valve AV-CW Supplies city water to the Mixing Tank Limit Switch LS-CW1 Indicates when valve AV-CW is closed Limit Switch LS-CW2 Indicates when valve AV-CW is open Pump PUMP-QR Pumps ingredient QR to the Mixing Tank

Valve AV-QR Supplies QR to the Mixing Tank

Limit Switch LS-QR1 Indicates when valve AV-QR is closed Limit Switch LS-QR2 Indicates when valve AV-QR is open Pump PUMP-KM Pumps ingredient KM to the Mixing Tank

Valve AV-KM Supplies KM to the Mixing Tank

Limit Switch LS-KM1 Indicates when valve AV-KM is closed Limit Switch LS-KM2 Indicates when valve AV-KM is open

Scales Provides the current weight of the

ingredients in the tank to the PLC

Agitator MTR-MTA Blends the ingredients in the Mixing Tank

Pump PUMP-MT Pumps ingredient MT from the Mixing

Tank

Valve AV-MT Supplies the finished product to the Filling Lines

Limit Switch LS-MT1 Indicates when valve AV-MT is closed Limit Switch LS-MT2 Indicates when valve AV-MT is open Ultrasonic Level Sensor ULS-1 Indicates the level in the Mixing tank

(14)

6. Electrical Specifications

6.1. The Ultrasonic Level Sensor ULS-1 provides a 0-10VDC signal to the PLC. 6.2. The Scales provide a 0-10VDC signal to the PLC.

6.3. All other input signals are 120VAC.

6.4. All output signals are 120VAC. A “dry contact” type of output module is required.

7. Detailed Sequence of Operations

7.1. There are 5 steps in the Batching process: 7.1.1. Add City Water

7.1.2. Add Ingredient QR 7.1.3. Add Ingredient KM 7.1.4. Mix the batch

7.1.5. Pump the batch to the filling lines

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. Step 1 – City Water

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 CW2. If LS-CW2 is not made within a specified time after the valve was told to open, a

(15)

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 AV-KM closes. PUMP-AV-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”.

(16)

7.7.3. After the agitator is finished, the HMI no longer displays the text “BLENDING”.

7.8. Step 5 – Pump to filling lines

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 Tank’s 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. The screens are to be designed to run at a resolution of 1024 x 768. 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. Black (0, 0, 0) 10.1.3.1.2. White (255, 255, 255) 10.1.3.1.3. Gray (192, 192, 192) 10.1.3.1.4. Light Gray (224, 224, 224) 10.1.3.1.5. Red (240, 0, 0) 10.1.3.1.6. Green (0, 192, 0) 10.1.3.1.7. Yellow (255, 255, 0)

(17)

10.1.3.1.8. Blue (0, 102, 255)

10.1.3.1.9. Light Blue (102, 153, 255) 10.1.3.1.10. Teal (0, 255, 255)

10.1.4. The screen background color is light gray.

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.

(18)

10.3.1.2. Screen 2 – Agitator Process Run Time

10.3.1.2.1.1. The agitator process run time is adjustable from 60 seconds to 360 seconds.

10.3.1.3. Screen 3 – Valve Fault Detection Time Delays

10.3.1.3.1.1.1. The time delays used in the Valve Fault detection logic are individually adjustable from 1 to 10 seconds.

10.3.1.4. Screen 4 – Maintenance

10.3.1.4.1.1. Total runtime (in hours) for all motors is displayed. 10.3.1.5. Screen 5 – Alarms

10.3.1.5.1.1. An Alarm Screen is available to view all alarms. All alarms and the status of each alarm are displayed. All alarm events are logged and viewable for a period of 90 days. 10.3.1.5.1.2. Valves are monitored for discrepancies. A

discrepancy occurs when a valve is commanded to open or close, but the respective limit switch is not activated within the specified time frame.

10.3.1.5.1.3. The list of alarms is as follows:

10.3.1.5.1.3.1. Valve AV-CW Discrepancy Fault 10.3.1.5.1.3.2. Valve AV-QR Discrepancy Fault 10.3.1.5.1.3.3. Valve AV-KM Discrepancy Fault 10.3.1.5.1.3.4. Valve AV-MT Discrepancy Fault

10.3.1.5.1.3.5. Mixing Tank Hi Level (above 95% of capacity) 10.3.1.5.1.3.6. Emergency Stop Activated

10.3.1.5.2. Screen 6 – Batch Log

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

(19)

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.

END OF HYPER-GLASS CLEANER BATCHING PROJECT SCOPE

S

S

u

u

m

m

m

m

a

a

r

r

i

i

z

z

i

i

n

n

g

g

t

t

h

h

e

e

S

S

c

c

o

o

p

p

e

e

So, what did we get from the scope? Let’s summarize:

System Control

From an operational and programming standpoint, 1275 lbs. of water will be added to the Mixing Tank. Then, 390 lbs. of QR will be added. The last ingredient is KM, of which we will add 173 lbs.

After all the ingredients are in the Mixing Tank, we have to blend it.

After the batch is blended, we will the pump the finished product in the tank to the filling lines.

We have to make sure all the valves open or close as commanded. If they do not, then we need to shut down the process.

We need to make sure the level in the Mixing Tank doesn’t get too high. If it does, we must shut down everything.

We need to make sure that the respective valves for the pumps are open before we turn on the pumps.

Though you may not do the PLC programming, it behooves you to understand the process.

(20)

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.

B

B

e

e

g

g

i

i

n

n

n

n

i

i

n

n

g

g

t

t

h

h

e

e

P

P

r

r

o

o

j

j

e

e

c

c

t

t

Before you start working on the HMI, you will need an electronic copy or a printed copy of the PLC program, including a list of all of the data files and the list of tags.

The first thing we must do is to create the project.

It is also best if you are connected to the PLC already. The screens below assume that. However, if you are not connected, you can skip some of these steps until later.

Begin by opening RSView32.

Click Start > All Programs > Rockwell Software > RSView32 > RSView32 Works

After RSView32 opens, click File > New

A dialog box will open. Make sure you choose your folder well; sometimes, you will run into problems if you decide to mode the folder after you have started a project. There are relative paths that RSView defines, so plan ahead. To be safe, you might want to create a folder in your root directory that is dedicated to your project.

In this case, we will call our project “hyperclr”. Click on the “New Folder” icon and fill in the fields. Click “Open”.

(21)

This screen will appear.

(22)
(23)

Double click on “Channel”.

Choose “Network Type”

These settings are dependant on how RSLinx is set up. In our case, the network type is a DH-485. The Primary Communications Driver is AB_DF-1.

The default value of Channel 1 on the left is correct for our case. Also, this driver is the Primary driver, so make sure “Primary” is checked in the “Active Driver” section.

(24)

Click “OK”.

Click “Node” in the Project tree.

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 button to find the PLC. In our case, the station number is 01.

Select “SLC 5 (Enhanced)” for the processor in the “Type” field. The default timeout value of 3.000 seconds is fine as is.

Click “Accept” and your screen should look like this:

(25)

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.

T

T

a

a

g

g

s

s

a

a

n

n

d

d

t

t

h

h

e

e

T

T

a

a

g

g

D

D

a

a

t

t

a

a

b

b

a

a

s

s

e

e

This is a very important section of this book. To fully understand how RSView functions with a PLC, you must understand how tags work and how to manage and edit the tag database.

There is a list of the tags used in this project in Excel format included with this book called hyperclr-Tags.xls. Take a moment to look over this spreadsheet and understand the attributes of each tag.

Tags are the links that connect RSView with the PLC; the tags are common to both the PLC and RSView. The PLC and RSView have access to the values held by the tags.

The value of the tag in RSView reads or writes the value of the bit (or the word) in the PLC, and vice-versa.

When you define a tag that references a bit in the PLC, every time the bit in the PLC turns on the tag value in RSView will change from 0 to 1.

Conversely, every time the bit in the PLC turns off, the tag value in RSView will change from 1 to 0.

If you define an analog tag, such as the weight of the mixing tank in our example, as the value of the word in the PLC changes, the value of the associated tag in RSView will change.

You can also use RSView to send values to the PLC.

However, if the ladder logic is such that the value of the bit or word is determined by the ladder logic, the value you send to the PLC will be overwritten. The PLC has priority. We will cover this aspect later in the book.

Let’s see how to create a tag and tie it to a bit in the PLC.

Look at the RSLogix printout for the Batching project. Find the section called “RSLogix 500 Cross Reference Report - Sorted by Address”. This section shows all the outputs, inputs, internal bits, timers and words that we want to use to create tags in RSView.

(26)

Digital Tags

Let’s 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” in the Project tree. You will see a screen like this:

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.

(27)

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.

Let’s 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 wouldn’t 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.

(28)

The screen should look like this:

(29)

The tag is now displayed as the first, and only, tag in the database.

Click “Next” and you may continue adding tags.

I would like to note that it is possible export the Documentation Database from RSLogix and import it into RSView.

However, this is a complex process and requires Excel to manipulate the file that is exported from RSLogix. It is a time consuming process that is beyond the scope of this book. Depending on the number of tags that you have to import, it could be worthwhile to go through that process.

For the time being, we will simply add the remaining tags manually. If you have an electronic copy of the Cross Reference, use copy and paste (CTRL-C and CTRL-V) to enter the information into the tag database. This will speed up the process and eliminate typographical errors.

RSView32 is a bit stubborn with tags that have already been defined. Once you have accepted a tag, you cannot go back and change its name.

(30)

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.

Type in the correct name and click “Accept”.

Highlight the tag with the wrong name and click on the “Delete Tag” button. Use this button with caution – there is no “Undo”.

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.

To add a new tag, click on the “Insert Row” button. Enter all the tags for the remainder of the internal bits (B3:x/x).

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.

Let’s 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.

(31)

Choose “Digital” as the type.

Type “Agitator Run Time Timer Enabled” in the description field. The default labels of “Off” and “On” are fine for this tag.

In the Data Source section, choose “Device” as the type. The Node Name is 410, as it is for all the tags in this project. The default value of A in the scan class is fine.

Type “T4:0/EN” in the address field. Your screen should look like this.

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.

Change the tag name to read “AgitatorRunTimeTimerDN”. Change the description to read “Agitator Run Time Timer Done”.

(32)

Change the address to “T4:0/DN” and click “Accept”.

Analog Tags

We can now create our first analog tag.

We want to look at the preset (PRE) value of timer T4:0. As you may recall, the preset value is the value that the timer must reach before the done bit turns on.

This is the value that, according to the scope, we have to make available in the HMI so that it can be adjusted.

By creating a tag now, later on we can set up a field in one of our RSView screens that references this tag. That allows someone to change how long the agitator motor will run. Start by duplicating the tag we just made. Click the “Duplicate Tag” button.

Type “AgitatorRunTimeTimerPRE” in the “Name” field. Type “Agitator Run Time Timer Preset” for the description.

(33)

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 timer’s progress when the agitator is running, we would need a tag that shows the timer’s accumulated value.

(34)

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 doesn’t matter what the min/max values are; RSView will still read and display whatever value is in the timer’s 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 timer’s 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.

(35)

Start by creating a new tag by inserting a row. Click the “Insert Row” button. Name the tag “WeightOfMixingTankPounds”.

Choose “Analog” for the type.

Enter the description “Weight of Mixing Tank (lbs.)”.

Use 0 for a minimum value and 2200 for a maximum value, since the maximum capacity of the tank is 2200 lbs.

The default value for “Scaling”, “Offset” and “Data Type” are appropriate. Units are “pounds”.

Choose “Device” for the Data Source type. The Node Name is “410” and the Scan Class is “A”.

The address we want to use is the result word of the SCP instruction we used in the SLC program. That address is N7:0.

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 “%”.

(36)

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.

C

C

r

r

e

e

a

a

t

t

i

i

n

n

g

g

t

t

h

h

e

e

S

S

c

c

r

r

e

e

e

e

n

n

s

s

Before you start creating screens in RSView, you will need to have a general idea of what will be on each screen. Spend a few minutes sketching out the screens on a full size note pad – this will help you visualize the entire project and save time as you generate the screens in RSView.

As you develop the screens, it is much faster if you set your monitor resolution higher than the resolution required by the project. This lets you see the whole window of the screen you are developing, without having to constantly use the scroll bars.

Let’s review the HMI Screens section of the scope to find out how many screens we will need. I have created a table the shows the scope requirements on the left and the required RSView screen on the right. This is another way of dissecting the scope to make sure we catch everything.

(37)

Scope Requirements Screen Name

An overall system screen is shown at start up.

System View Valve icon colors are displayed as follows:

Closed: red Open: green Alarm: yellow

System View

Pump icon colors are displayed as follows: Stopped: red

Running: green Alarm: yellow

System View

The Mixing Tank weight is displayed. System View The agitator run time is adjustable from 60

seconds to 360 seconds.

Agitator Process Run Time Adjust the time delays used in the Valve

Fault detection logic, from1 to 10 seconds.

Valve Fault Detection Time Delays Total runtime for all motors is displayed. Maintenance

An Alarm Screen is available to view all alarms and alarm history.

Alarms A log screen will show the completion time

of each batch. Batch Log

The current batching step is displayed

from all screens. (all screens)

A navigation menu, located at the top, is available on every screen.

(all screens) The current time and date is displayed on

each screen.

(38)

S

S

c

c

r

r

e

e

e

e

n

n

1

1

S

S

y

y

s

s

t

t

e

e

m

m

V

V

i

i

e

e

w

w

(39)

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.

(40)

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.

It would be beneficial to you have a good graphics editor, such as a lite version of PhotoShop. Become proficient enough to sample colors so that you can verify the RGB values of the colors you use.

Click “OK” to close accept the values and close the window. Save the display as “System View”.

(41)

Designing the Master Layout

There are certain screen elements that will be common to every screen, as indicated by the scope. These are the batching step, the current date and time and the navigation menu.

You have to consider a number of factors when designing the master layout.

Elements of the master layout must be consistent from screen to screen. For example, if you have decided on a header size of 1024 x 128, originating from coordinates 0, 0, then each screen needs to conform to that size and position. That appears obvious, but I am amazed at how many times this is ignored.

RSView32 uses a modified Cartesian coordinate system to define position. The origin (0, 0) is located in the top, left corner of the screen.

As you go to the right, the X value increases. As you go down, the Y value increases.

For example, a stated position of (100, 250) is 100 pixels to the right and 250 pixels down from the origin.

Even if a header is misplaced by one pixel, it will appear to “jump” when you are going from screen to screen. This is undesirable and certainly not very professional.

The overall size of the header is important, usually with smaller being better. Don’t let it overwhelm a screen. Besides, a large header will make things difficult as you try to add content (valve icons, pump icons, etc.) to your screen. You will run out of room.

It may be useful to talk with a graphic designer during this process. They have studied graphic layouts and designs, and may offer some good advice.

However, on the other hand, realize that sometimes graphics designers focus too much on looks and sacrifice functionality. Dark gray text on a light gray background may be artistically appealing, but it is much more important for the operator to be able to read the display from 10 feet away. Use your good judgment.

Color Blindness

Before we get too far into our master layout, let’s think about color blindness, as it is prevalent among many men. Though our project scope did not address this, as designers we must take this into consideration.

(42)

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.

(43)

Designing the Header

The scope says, “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 this area. All screens in the system are available from this menu. If the “System View” display is not open, click on the “Project” window, open the

“Graphics” folder and click once on “Display” (double-clicking will create a new, untitled display).

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. Don’t worry about getting it exactly the right size, as we will adjust it.

(44)

The basic color palette appears.

Click on “Define Custom Colors >> “.

Type the RGB values specified in the scope for blue (Red 0, Green 102, Blue 255) into the RGB fields. Click “Add to Custom Colors”

(45)

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.

(46)

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” button and right-clicking on the text you just entered. Choose Attributes > Font.

(47)

Let’s try Bold 12 to start.

To add the light blue company color, select the blue header graphic. Copy and paste it by pressing CTRL-C, then CTRL-V. Of course, you can also use any other Windows technique for cutting and pasting.

Drag it down and change the fill color. Create a new custom color with the RGB value of 102, 153, 255. Select the next blank square under the “Custom Colors” area and click “Add to Custom Colors”. Do this carefully, as you may inadvertently overwrite existing custom colors.

Also, change the line color to light blue.

Adjust the height of your new light blue rectangle to be about half the existing height. Move it to the top of the display.

In the process, you probably covered the text “Hyper-Glass Cleaner”. The text is not showing because it is “behind” your new light blue rectangle.

Select the light blue rectangle. From the drop-down menu, choose Arrange > Send to Back.

Now the text should appear, but the light blue rectangle is gone. Select the original blue rectangle and send it to the back.

(48)

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.

(49)

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 – don’t 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 user’s job to learn your thought process so that they can use your system. It is your responsibility to create an HMI that

accommodates the user’s 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, don’t 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 customer’s plant will have the same problem.

(50)

Using Pushbuttons for Navigation

This application will run on a touch screen. Since we have just a few screens, a row of pushbuttons in the header should be appropriate.

We have six screens, so we need six pushbuttons positioned in the header. Click on the “Button” icon in the toolbar. Click and drag in the header. When the button size is about right, release the mouse button and the “Button Configuration” window appears.

The “General” tab lets us decide what style of button to use.

Checking the “Capture cursor” box keeps the cursor on the button after the mouse button has been pressed. Leaving the box unchecked allows the user to “change his mind” and move the cursor off of the button with the mouse button still pressed. The “Highlight” features places a rectangle around the button at runtime when it has focus. Leaving it checked is usually desirable.

The “Index” number indicates the order that this button will be selected when the user is using the Tab key. This won’t be an issue for us.

The “Action” tab is the section that defines the programming behind the button; that is, what we want to happen when the button is pressed. We will come back and address that later. Right now, we need to concentrate on getting the layout finished.

(51)

Click on the “Up Appearance” tab. Type “System View” into the text field.

(52)

The screen should look like this.

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

(53)

The screen looks like this.

We have a problem. The text won’t 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 won’t fit.

The only way to really solve the problem is to try these options and see which one works out the best.

(54)

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.

(55)

Click the “Import” button and find the bitmap you made. Your custom bitmap is now part of your button.

(56)

Time and Date

The current batching step, the time and the date has to be displayed on each screen. RSView has a special function to display the time and date.

Click on the “Numeric Display” button. Click and drag to form rectangle in the upper right corner of the “System View” display.

This window appears.

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.

(57)

Scroll in the list of system tags until you find “system\Time”.

Highlight it and click “OK”.

We are taken back to the “Numeric Display” window.

You’ll 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.

(58)

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. Let’s 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, don’t worry about getting the size exactly right – we will tweak it later.

(59)

Your screen should look something like this.

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.

(60)

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.

(61)

Click on the “Tags” button. Scroll to the “SystemReady” tag.

Click “OK”.

The tag “SystemReady” appears in the “Expression” box.

When a tag appears just by itself, as it does in this case, it really forms the expression “SystemReady = 1”. In other words, the expression is true when the bit in the PLC that is assigned to “SystemReady” is on.

(62)

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.

References

Related documents

In this cohort of medical school graduates from 1988 to 1997, primary care physicians continue to be more likely to enter rural practice than are specialty physicians.. Again,

A dose is given EVERY TIME you eat any carbs AND/OR have a high blood sugar that requires insulin.. Delivered just as if you were taking a shot of Humalog, Novolog

An analogy can be drawn between income inequality and income convergence and dynamics of prices across locations (cities, regions within a country, countries, etc.).. Interpreting

SUCCUBUS , prevent bewitchment of man and beast, protect crops from being blasted by witches, and force vampires to fl ee. During the Middle Ages, inquisitors often wore crosses

Studies that include parallel mea- surement of peripheral and cerebral blood flow in the sheep fetus during acute hypoxia in the presence of antiox- idant treatment in doses that

If the line items that still have to be settled can no longer be settled in previous years due to closed fiscal years in FI/FI-AA, it is necessary to settle these line items in

premiums from policyholders. Under the Financial Control Plan, described in Appendix D, the WYO companies must keep NFIP funds separate from the rest of their accounts. In

We amend the real EF data by generating a certain number of papers by author X and linking each of them with 35 randomly chosen users (35 is the average paper degree in the