How-to-Program-RSView32.pdf

March 29, 2017 | Author: Israel | Category: N/A
Share Embed Donate


Short Description

Download How-to-Program-RSView32.pdf...

Description

How To Program

RSView32

How to Program an HMI and SCADA System with Rockwell Automation’s RSView32 By Neal Babcock www.engineersandtechnicians.com Copyright 2009 Modern Media

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

2

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 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, How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

3

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.

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 Rockwell’s proprietary software known as RSLogix.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

4

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.

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-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 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 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 Power supplies come in varying capacities.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

5

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

6

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

The Dialect of PLCs 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] How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

7

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

8

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

9

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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 – don’t 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 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. For our project, the project scope is as follows.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

13

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. 7.1.2. 7.1.3. 7.1.4. 7.1.5.

Add City Water Add Ingredient QR Add Ingredient KM Mix the batch 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 LS-CW2. If LSCW2 is not made within a specified time after the valve was told to open, a

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

The agitator runs for 3 minutes.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

15

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. 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.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. 10.3.1.1.2.

The Mixing Tank Weight is displayed numerically.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

17

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

Valve AV-CW Discrepancy Fault 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

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

END OF HYPER-GLASS CLEANER BATCHING PROJECT SCOPE

Summarizing the Scope 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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

Beginning the Project 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 in the fields. Click “Open”. How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

and fill 20

This screen will appear.

Stretch the Project window down so that you may see more of the folders the window.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

21

Double-click on the “System”

folder.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

22

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

23

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 the station number is 01.

button to find the PLC. In our case,

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:

Click “Close”.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

Tags and the Tag Database 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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

25

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

27

The screen should look like this:

Click “Accept”.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

28

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

Type in the correct name and click “Accept”. Highlight the tag with the wrong name and click on the “Delete Tag” button with caution – there is no “Undo”.

button. Use this

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” remainder of the internal bits (B3:x/x).

button. Enter all the tags for the

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

30

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”. How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

31

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. Choose “Analog” as the type. You will see some new options appear.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

Creating the Screens 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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

36

Scope Requirements An overall system screen is shown at start up.

Screen Name System View

Valve icon colors are displayed as follows:

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

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.

(all screens)

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

37

Screen 1 – System View In the Project window, expand the “Graphics” folder. Double-click on “Display”.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

40

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. How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

42

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. Right-click on the rectangle and choose Attributes > Fill Color.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

43

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”

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

button and right-clicking

The standard Windows font selector window appears.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

46

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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 – 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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

49

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

50

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

Click “OK”.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

51

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

52

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

54

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

55

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

56

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. Align the two fields on the display.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

58

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

60

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. How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

64

Resetting the Alarm Since the “SystemFault” bit is latched on in the PLC when there is an alarm, we need a way to clear the alarm. In looking at the PLC program, we see that the “ResetAlarm” bit will accomplish that. We can make an object to do just that. In an effort to use objects from the standard RSView library, we will use a pushbutton from there. In the “Project” window, open the “Graphics” folder. Click on the “Library” icon. In the right side of the window, scroll down to the “Buttons – Industrial” display and open it. This display appears.

Let’s use the style in the lower left hand corner. Simply click and drag the “Stop” button onto your “System View” display. We will need to change the color of the button and the text, so the object will have to be ungrouped. Select it and use the top menu (Arrange > Ungroup) to achieve this. Select the red circle and change it to black, which is the typical standard color of a reset button. Edit the text to say “RESET”.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

66

This window appears.

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

68

The window looks like this.

If we were to have chosen a normal RSView pushbutton instead of a graphic, we could have used the built-in “Momentary On (Press 1, Release 0)” function of the “Button Configuration” window. Graphic elements don’t provide such a direct option, though the end result is the same.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

69

Start Batch and Stop Batch Pushbuttons We will use the same method to create the Start and Stop pushbuttons for the system. Select the “Reset” pushbutton, copy it and paste it twice.

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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 won’t concern ourselves with that until a problem arises.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

74

Select the graphic and change the fill color to red. You should have something like this.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

81

Your screen should now look something like this.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

84

Draw a line from the numeric display to the tank, and you screen should look like this.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

87

RSView lets you simulate, to a point, what the display will look like at runtime. Click the “Test Run”

button and the display looks like this.

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”

button to return to the normal editing mode.

Review of the System View Display Now it is a good time to get some feedback from the client. How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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 don’t 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 don’t like the looks of your valve icon, for example, it would take a fair amount of time to replace all of those.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

89

Here is how a mock-up showing normal operation might look.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

90

Here is a mock-up with the system in alarm.

Configuring the Menu After your client, customer or supervisor approves of the mock-ups, work can begin on the other displays. First, however, we will configure the display menu. To be efficient, we want to do this just once. There are a couple of ways to do this. First, let’s look at the foolproof, guided method. Open the “System View” display and save it as “Agitator Process Run Time”. Save this display as “Valve Fault Time Delays”. Save this display as “Maintenance”. Save this display as “Alarms”. Save this display as “Batch Log”. Now we have files for all of the displays we will have in our system. This is necessary to complete the configuration for the menu using the guided method.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

91

Close the “Batch Log” display and open “System View”. Right-click on the “System View” button and choose “Edit Button”. After the button configuration window appears, click on the “Action” tab.

Click the “Command” radio button. Click the “…” button to the right of “Press Action”.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

92

Under the “Command Categories” on the left, choose the “Graphics”, “Graphic Displays”, “Navigation” folder.

Click “Next”.

Click on “System View” and then click “Finish”.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

93

Now you might notice that all we really had to do was type “Display System View” to configure the press action.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

Screen 2 - Agitator Process Run Time Display The scope says that the “agitator process run time is adjustable from 60 seconds to 360 seconds”. Open the “Agitator Process Run Time” display. Clean off all of the graphics that applied to the system view so that the display looks like this.

Click on the “Numeric Input” button on the toolbar. Draw a rectangle on the display. When you release the mouse, the “Numeric Input” window appears.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

97

Let’s finish this display by putting some descriptive text around the numeric input field.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

98

Screen 3 - Valve Fault Time Delays Open the “Valve Fault Time Delays” display. To save some time and maintain consistency, copy the numeric input field and the associated text from the “Agitator Process Run Time” display. Copy the numeric display so that there are a total of 4 fields. Arrange them in a table to your liking. It might look something like this.

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

99

Click the “New Tag” button in the “Tags” window.

Type in the information as follows:

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

100

Screen 4 - Maintenance Display Create a table copying and pasting the table from the “Valve Fault Time Delays” display. Change the text appropriately so that the table looks like this.

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

101

Define the new tag for the QR pump as shown below.

Click “OK”.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

102

Create numeric displays for the remainder of the motors. Your screen should now look like this.

Close the “Maintenance” display.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

103

Screen 5 - Alarms Display From the “Project” window, open the “Alarms” display. From the top menu, click “Objects > Advanced Objects > Alarm Summary”. Draw a rectangle that fills the screen as much as possible without overlapping any existing graphic elements.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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:

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

106

We are going to alter these to suit our needs.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

110

Open the “Tag Database” from the project window. Scroll down to the “CityWaterValveAV-CWFault”.

Click on the checkbox beside the “Alarm” button.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

112

Screen 6 - Batch Log display The scope says that the “completion date and time of each batch is recorded. This information is maintained for a minimum of 180 days”. The first thing we have to do it setup our data log. In the “Project” window, open the “Data Log” folder and click on “Data Log Setup”. After this window opens, type “Batch Log” in the description.

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

Click “OK” and save the file. We are going to take a shortcut here. To create the data log file, we actually have to connect to a PLC and put RSView in runtime. However, during development, you may not have that option. We will use a file that was created in another project and modified in Excel to make it match our current batching project.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

115

Open the “Batch Log” display. Click on the “OLE” button. Click and drag until you get a window that is as large as possible. When you release the mouse button, this screen appears.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

117

The Final Result Let’s take a look at how the screens look in actual operation.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

118

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

119

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

120

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

122

Click on the “Startup” icon.

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

124

Click the “Startup” tab.

Set the parameters as shown for our project. The “Initial Graphic” field determines which graphic will appear when RSView first starts with runtime. Automatically Starting RSView on Bootup Usually, a computer is dedicated solely to RSView. With that being the case, you can start the RSView project with the command line like the following: "C:\Program Files\Rockwell Software\RSView\rsview32.exe" "c:\hyperclr\hyperclr.rsv" /R Make a shortcut with the appropriate path and project name for your computer and put the command line in the “Target” field of the shortcut’s properties. Then, add the shortcut to your Windows startup folder.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

126

You can right-click on the graph area and choose “Edit Trend”. This window appears.

The “Pen Configuration” tab shows these options.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

Tips and Tricks Leave the Control in the PLC Keep in mind, that although you can change bits and control the process with RSView, avoid that if you can. If the PC that is running RSView fails, the whole process could be halted. Copy and Paste First When you need a new piece of text, or a new graphic such as a rectangle, look to see if you can copy an existing object. It is almost always much faster to copy something and then change it to make it what you need, as opposed to going to the toolbar and “starting from scratch”. Make Sure You Know The Screen Resolution Of The Display On Which The Project Will Be Shown, And That It Is Documented RSView will adapt to minor changes in screen resolution, but big variations can cause problems. Don’t Expect To See Rapid Changes To Be Visible In RSView Due to the communication speed, sometimes bits in the PLC turn on and off so quickly that RSView is not able to catch them. Sometimes, there can be a lag of 2 or 3 seconds. Formulas can be included in expressions For example, we could animate the color of the text in the “Scales” display of our “System View” graphic. Put this expression in the “Color” section of the “Animation” window. LiquidLevelOfMixingTankPercent > 90 Select a color, such as yellow, and the text will change to yellow when the tag value is greater than 90. Expressions can use logical operators, arithmetic operator and a variety of functions. Here is the list of functions available in RSView: How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

128

This function: SQRT(expression)

returns this value: the square root of the expression

LOG(expression)

the natural log of the expression

LOG10(expression)

the base ten log of the expression

SIN(expression)

the sine of the expression in radians

COS(expression)

the cosine of the expression in radians

TAN(expression)

the tangent of the expression in radians

ARCSIN(expression)

the arc sine of the expression in radians

ARCCOS(expression)

the arc cosine of the expression in radians

ARCTAN(expression)

the arc tangent of the expression in radians

SIND(expression)

the sine of the expression in degrees

COSD(expression)

the cosine of the expression in degrees

TAND(expression)

the tangent of the expression in degrees

ARCSIND(expression)

the arc sine of the expression in degrees

ARCCOSD(expression)

the arc cosine of the expression in degrees

ARCTAND(expression)

the arc tangent of the expression in degrees

TIME("time")

1 (true) if the time specified is the current time.

BEFORE_TIME("time")

1 (true) if the expression is evaluated before the specified time. 1 (true) if the expression is evaluated after the specified time.

AFTER_TIME("time") INTERVAL("interval")

1 (true) if the specified time interval has elapsed.

FILE_EXISTS("file")

1 (true) if the specified file exists.

FREE_BYTES(drive)

the number of bytes free on the specified drive

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

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.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

130

The Steps to a Successful and Profitable RSView Project We all want to create a project as accurately and efficiently as possible. If the steps shown below are followed, then an RSView program can be completed with maximum accuracy and minimum cost. Of course, the real world will throw curveballs and changes to you. As a result, you will have to go back and re-work certain aspects of your design. Ideally, though, this is how things should work: 1. Get a clear and concise scope that defines the project in as much detail as necessary. 2. If the scope is not clear, write emails and document any clarifications or changes to the scope. 3. Understand the scope fully. Get your head inside the process that you will be representing with RSView. 4. Make sure that the PLC program is finished and that all necessary tags have been defined by the programmer. 5. Create mock-ups of your screens and get client or supervisor approval before you do any real programming or configuration. 6. Test your navigation on your co-workers. Humbly accept their input and make any changes necessary. 7. Test your design on the actual PLC that will be used in the project before you take it into the field. I wish you the best of luck in your endeavors.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

131

THE FOLLOWING ARE TRADEMARKS OF ROCKWELL AUTOMATION, INC. Allen-Bradley® ControlLogix™ CompactLogix™ MicroLogix™ PanelView™ RSLinx® RSLogix™ RSView32™ RSLogix™ 5000 SLC™ 500 THE AUTHOR OR THE PUBLISHER OF THIS BOOK IS IN NO WAY AFFILIATED WITH ROCKWELL AUTOMATION, INC.

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.

Courtesy of Rockwell Automation, Inc.

How to Program RSView32 Copyright  2009 Modern Media engineersandtechnicians.com

132

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF