tstent-gr001_-en-p

187
Getting Results Guide Doc ID TSTENT -GR001A-EN-P

Upload: xandy-tka

Post on 04-Dec-2014

28 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: tstent-gr001_-en-p

Getting Results Guide

Doc ID TSTENT-GR001A-EN-P

TSTENT-GR001A-EN-P_Ttlpg.qxd 9/8/04 11:36 AM Page 1

Page 2: tstent-gr001_-en-p

ContactingRockwell Software

Technical Support Telephone—1-440-646-5800Technical Support Fax—1-440-646-5801World Wide Web—www.software.rockwell.com

Copyright Notice Rockwell Software Inc. All rights reserved. Printed in the USA.

This manual and any accompanying Rockwell Software products are copyrighted by Rockwell Software Inc. Any reproduction and/or distribution without prior written consent from Rockwell Software Inc. is strictly prohibited. Please refer to the license agreement for details.

Trademark Notice The Rockwell Software logo, RSTestSTand Enterprise, RSTestStand, PLC, PLC-2, PLC-3, PLC-5, PLC-5/250, PLC-5/20E, PLC-5/40E, PLC-5/80E, SLC, SLC 5/01, SLC 5/02, SLC 5/03, SLC 5/04, SLC 5/05, and SLC 500 are registered trademarks of Rockwell Automation.

Microsoft, MS-DOS, Windows, Windows NT, Visual Basic, and Visual SourceSafe are registered trademarks of the Microsoft Corporation.

ControlNet is a registered trademark of ControlNet International.

DeviceNet is a registered trademark of the Open DeviceNet Vendors Association.

Ethernet is a registered trademark of Digital Equipment Corporation, Intel, and Xerox Corporation.

SolidWorks 3D Modeling Software is a trademark of SolidWorks.

Pentium is a registered trademark of the Intel Corporation.

Adobe and Acrobat are trademarks of Adobe Systems Incorporated.

AIX, PowerPC, Power Series, RISC System/6000 are trademarks and IBM is a registered trademark of International Business Machines Corporation.

UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Limited.

AutoCAD is a registered trademark of Autodesk, Inc.

All other trademarks and registered trademarks are the property of their respective holders and are hereby acknowledged.

Warranty This Rockwell Software product is warranted in accord with the product license. The product’s performance will be affected by system configuration, the application being performed, operator control, and other related factors.

This product’s implementation may vary among users.

This manual is as up-to-date as possible at the time of printing; however, the accompanying software may have changed since that time. Rockwell Software reserves the right to change any information contained in this manual or the software at anytime without prior notice.

The instructions in this manual do not claim to cover all the details or variations in the equipment, procedure, or process described, nor to provide directions for meeting every possible contingency during installation, operation, or maintenance.

RSTestStand.book Page ii Friday, September 10, 2004 3:22 PM

Page 3: tstent-gr001_-en-p

i

New features of RSTestStand Enterprise version 3.10

Control Planner/Simulator (CPS) has been renamed RSTestStand Enterprise. Extending the proven value of RSTestStand as a control modeling and simulation software, RSTestStand Enterprise offers these additional solutions to your process and discrete applications:

System-level simulation that provides the ability to import individual RSTestStand projects and to design a macro model of the smaller cells.

Process and/or application modeling tools to provide the ability to develop the model of the actual physical process. These tools increase the fidelity and scope of the control systems model.

Debugging and optimization tools to aid in the validation process.

Upstream connectivity to 3D modeling systems, such as SolidWorks.

RSTestStand Enterprise has these new features:

The Data Scope allows you to graph Boolean and analog data values in a variety of formats. The functionality of the Data Scope is similar to a digital storage oscilloscope.

RSTestStand Enterprise can now coordinate and control time among multiple RSEmulate 5000 controllers in a single virtual backplane. See “Controlling execution speeds of an RSEmulate 5000 processor” on page 110.

Conveyors, multiplexers, and buffers have been added to the Part Flow diagram. See “Part Flow objects” on page 103.

RSTestStand.book Page i Friday, September 10, 2004 3:22 PM

Page 4: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

ii

• •

• •

Features introduced in version 2.10:

Arrays are now supported as data types for variables.

Integration into RSAutomation Desktop.

A new graphics subsystem that makes developing 3D animations simpler and faster. See “Creating 3D models” on page 43.

Graphic libraries in which you can save and reuse your animation elements. See “Graphics Library” on page 92.

Expanded search and replace so that you can find instances throughout the system. You can also search and replace variables from within a flowchart or its variables list. See “Searching your Project Model” on page 16.

Library elements can now be parameterized to create multiple copies when they are dragged into a project. You can now use the “Multiple instantiation” feature to greatly increase the flexibility of your libraries by allowing you to have a single parent and a user requested number of children (including zero). By developing library elements that take advantage of this feature, you can selectively add and remove features when you build your project. See “Parameterizing your library resource definitions” on page 96.

Addition of a code module editor with a Visual Basic Script Editor look and feel.

Import and export to an ASCII delimited file. See “Importing and exporting your project variables” on page 17.

New functions in the System Procedures for the Flowchart editor:

DoWhile and DoUntil functions that allow you to reset a flowchart on a change of condition.

GetPercentComplete returns the current value of the capability referenced.

New WaitUntil function blocks the execution of a flowchart until the specified condition goes true.

Selection, on a resource by resource basis, of whether a duplex variable’s initial value is written to the OPC link during the power-up scan.

RSTestStand.book Page ii Friday, September 10, 2004 3:22 PM

Page 5: tstent-gr001_-en-p

iii

1 • Welcome to RSTestStand Enterprise 1Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2How does this document fit with other Rockwell Software product documentation?. . 2Document conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 • Installing RSTestStand Enterprise 3System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Hardware requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Installing RSTestStand Enterprise software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Starting the RSTestStand Enterprise software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 • Creating the Project Model 7Developing your project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Analyze your application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Test the model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Develop your system logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Run the logic, any electronic HMI, and your RSTestStand Enterprise application

concurrently . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8About the Project Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Creating a new Project Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Populating your Project Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Modifying your Project Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Searching your Project Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Importing and exporting your project variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Importing project variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Exporting data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Field descriptions for csv file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4 • Resources 21Adding user-defined resources to the Project Model . . . . . . . . . . . . . . . . . . . . . . . . . . 22Setting attributes, variables, and capabilities for resources . . . . . . . . . . . . . . . . . . . . . 22

Setting resource attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Setting resource variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Initial Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Connecting an array variable to an OPC array . . . . . . . . . . . . . . . . . . . . . . . 31

Setting resource capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Contents

RSTestStand.book Page iii Friday, September 10, 2004 3:22 PM

Page 6: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

iv

• •

• •

5 • Operator Consoles 35Adding an Operator Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Configuring Operator Consoles device resource properties . . . . . . . . . . . . . . . . . . . . 38Merging Operator Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Operator Console devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Emergency stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Indicator lamp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39LED display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Message display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Meter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Push button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Selector switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Slider. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Strip chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Text box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Thumb wheel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Toggle switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422-state feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

6 • Creating 3D models 43Building a 3D animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Adding an object to the scene. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Adding paths and frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Working with multiple assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Connecting resource variables to animation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Importing animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Working with scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Helpful hints for working with components and assemblies . . . . . . . . . . . . . . . . . . . . 55

7 • Using the Data Scope feature 57Setting up a data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Setting up a view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Setting up a Trace View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Using the Trace View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Setting up a Rule View and Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Setting up individual rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Using the Rule View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Viewing a Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Recording normal values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Save Data to File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

RSTestStand.book Page iv Friday, September 10, 2004 3:22 PM

Page 7: tstent-gr001_-en-p

CONTENTS

v

• • • • •

8 • Simulation 73Starting a simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Simulation modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Interacting with a simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Placing a Watch Window on a resource, component, or assembly . . . . . . . . . . . 75Forcing resource variable values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Using the Output Message Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Hints for setting up and running simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78Exporting and importing runtime simulation data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Exporting runtime simulation data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Importing runtime simulation data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Using the Run-Only option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

9 • Flowchart Editor 81Opening the Flowchart Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Flowchart Editor elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

Start Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Decision Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Process Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83End Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Comment Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Local VBScript Module Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Connection Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Visual Basic Script operator syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Printing a flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

10 • Connection Diagrams 87Creating a Connection Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Adding resources to a Connection Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87OPC tag connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Printing a Connection Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Connection Diagram palette. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

Options tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Connecting variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Connection Diagram context menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

RSTestStand.book Page v Friday, September 10, 2004 3:22 PM

Page 8: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

vi

• •

• •

11 • Creating and using libraries 91Standard Resource library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Op Console Devices library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Graphics Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Creating your own library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Adding a resource definition to a Resource Library . . . . . . . . . . . . . . . . . . . . . . . . . . 95Parameterizing your library resource definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96Removing a resource definition from a library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Using a library resource definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Attaching or detaching a library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Attaching a Resource Library to a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Detaching a Resource Library from a project . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Saving a library file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

12 • Part flow models 99About the part flow model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Creating a part flow model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Laying out a part flow model diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Adding behavior to the diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Controlling the action using capabilities and set points. . . . . . . . . . . . . . . . . . . . . . . 102Running the Part Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Part Flow objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Generators, parts, and part names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Part Movers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Multiplexer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Conveyor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Part Disposer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Part sensor switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

13 • Controllers 109Using a controller in your project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Controlling execution speeds of an RSEmulate 5000 processor . . . . . . . . . . . . . . . . 110Controlling the execution speed of multiple RSEmulate 5000 processors . . . . . . . . 112Controller Property dialog box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

Attribute tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

RSTestStand.book Page vi Friday, September 10, 2004 3:22 PM

Page 9: tstent-gr001_-en-p

CONTENTS

vii

• • • • •

Variables tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Public . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Initial Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116Add Variables using OPC Browser button . . . . . . . . . . . . . . . . . . . . . . . . . 117

14 • Local VBScript Modules 119Creating a Local VBScript Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Subroutines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

15 • Importing and exporting projects 121Importing and merging XML files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121Exporting files using XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122Importing and merging RSTestStand projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

16 • Developing and using TestScripts 123Creating a new TestScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Editing TestScripts using Visual Basic Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Setting up and using a manual TestScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Running TestScripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125The Log File for TestScripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Configuration of standard Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

Manual Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Random Fault Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127Snapshot Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Interlock Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

17 • Communications using OPC 131Connecting to another server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Topic names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Groups and items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Poll rates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Variable updates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Initial or powerup scan using OPC connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Search and replace OPC tag addresses and variable names. . . . . . . . . . . . . . . . . . . . 134

RSTestStand.book Page vii Friday, September 10, 2004 3:22 PM

Page 10: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

viii

• •

• •

18 • Troubleshooting 135Debugging flowchart logic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135Communication problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

No error codes, but variables are not updating . . . . . . . . . . . . . . . . . . . . . . . . . . 137No topic configured in RSLinx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Controller problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Incorrect update rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Polled Messages is not selected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Time to expand the Tag Browser is too long . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

Interacting with the PLC logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Problems with 3D graphics and OpenGL compatibility . . . . . . . . . . . . . . . . . . . . . . 140

19 • Getting the information you need 141Online help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141Technical support services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

When you call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

A • Activation 143Protecting your activation files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Activating RSTestStand Enterprise software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144Running the activation utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145Finding more information about activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145Some common questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

My activation files were damaged. What should I do? . . . . . . . . . . . . . . . . . . . 145I accidentally deleted the software directory on my hard drive. Do I need to call

Rockwell Software for replacement activation files? . . . . . . . . . . . . . . . . . . . 146Why can’t I move activation to a new floppy disk on a Windows NT system? 146

B • Output Window messages and error codes 147

C • System procedures for the Flowchart Editor 153

D • Built-in procedures for the TestScript Editor 159TestScript Editor and Flowchart Editor procedures. . . . . . . . . . . . . . . . . . . . . . . . . . 159TestScript Editor procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Class forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161Class controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161Class form. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162Class control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

E • Glossary 165

RSTestStand.book Page viii Friday, September 10, 2004 3:22 PM

Page 11: tstent-gr001_-en-p

1

1 1 • Welcom

e to RSTestStand Enterprise

Welcome to RSTestStand EnterpriseRSTestStand Enterprise is a design tool that lets you describe the process to be controlled, test pieces of it, and run an acceptance test using automated test procedures. It is part of the Design Automation product family from Rockwell Software Inc.

RSTestStand, also part of the Design Automation suite, supports a unit, or module, testing philosophy. As such, it provides the controls engineer with an interactive development environment for his or her logic. RSTestStand Enterprise, on the other hand, provides you with a much broader set of capabilities that both allows incrementally larger and more complex projects to be tested and brings automation to the testing process. RSTestStand Enterprise lets you import and concatenate multiple RSTestStand files. The large amount of reuse from unit testing allows you to focus on what is important: the verification of your system design.

RSTestStand Enterprise includes these features:Data Scope, which lets you analyze existing applications, synthesize important operational parameters, and use them in your model.

Import and merge of RSTestStand files to reuse unit, or module, testing.

TestScripts to automate scripting your test procedures and recording the results.

Connection Diagrams to better visualize more complex models.

Controller resources to allow you to build models that can be incrementally substituted with real components.

RSTestStand.book Page 1 Friday, September 10, 2004 3:22 PM

Page 12: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

2

• •

• •

XML import and export to create Project Models from upstream design systems.

3D graphics to allow connection to visually sophisticated representations.

Part Flow Model to let you build line simulations.

Integration into RSAutomation Desktop.

AudienceWe assume that you are familiar with:

IBM-compliant personal computers

Microsoft® Windows® operating systems

OLE for Process Control® (OPC) communications

Allen-Bradley programmable logic controllers (PLC™)

Rockwell Software’s PLC programming tools

How does this document fit with other Rockwell Software product documentation?

This guide is intended to be the entry point into our documentation set, which includes the RSTestStand Enterprise Getting Results Guide and online help.

The online help includes all overview, procedure, screen, and reference information for the software. It contains overview topics, tutorial topics, step-by-step procedures, and screen element descriptions (for example, text boxes, drop-down lists, and option buttons). Help is context-sensitive and provides you with immediate access to application and screen element descriptions.

Document conventionsThe conventions used throughout this document comply with those recommended by Microsoft. If you are not familiar with the Microsoft Windows user interface, we recommend that you read the documentation supplied with the operating system you are using before attempting to use this software.

RSTestStand.book Page 2 Friday, September 10, 2004 3:22 PM

Page 13: tstent-gr001_-en-p

3

2

2 • Installing RSTestStand Enterprise

Installing RSTestStand EnterpriseThis chapter describes:

The minimum system requirements

How to install the software

System requirementsTo effectively use the software, your personal computer must meet the following hardware and software requirements.

Hardware requirementsA Pentium III compatible or better personal computer rated at least 800 MHz (1 GHz preferred)

256 MB of RAM minimum (512 MB of RAM preferred)

20 MB of available hard drive space

CD-ROM drive

3.5-inch 1.44 MB diskette drive

Video graphics adapter (VGA) with OpenGL support (recommended for 3D animations)

Monitor that supports 1024x768 resolution. Use of lower resolutions might impact the size of dialog boxes so that they will not fit on the screen

Software requirementsMicrosoft Windows 2000 operating system

Microsoft Internet Explorer 5.5 (or higher)

Drivers to support the OpenGL card

RSLinx 2.40 or higher (if you will be using the high speed data source in the RSTestStand Enterprise Data Scope, you must use RSLinx 2.42.00)

RSTestStand.book Page 3 Friday, September 10, 2004 3:22 PM

Page 14: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

4

• •

• •

Installing RSTestStand Enterprise softwareBe sure to read the RSTestStand Enterprise_RelNotes.html file included on the CD-ROM. It may contain specific information relating to the installation of the latest release of this software.

To install the software:

1. Insert the CD-ROM into the CD-ROM drive.

2. Select Install RSTestStand Enterprise.

3. Follow the instructions on the screen.

a. On the Welcome dialog box: Read the information, and then click Next.

b. On the Software License Agreement dialog box: Read the entire Software License Agreement. Click to accept and continue installation, or click to decline and exit installation.

c. On the Customer Information dialog box: Type your name, the name of your company, and the serial number of your RSTestStand Enterprise software. Click Next.

d. On the Choose Setup Type dialog box: Choose Standard or Custom. Click Next.

If autorun is: Then:

enabled The Installer program starts automatically. Go to step 2.disabled a. Click Start.

b. Click Run. The Run dialog box is displayed.c. In the Open field, type x:\autorun.exe.d. Click OK. The Installer dialog box is displayed. Go to step 2.

If the Program Maintenance dialog box is displayed, a previous version of RSTestStand Enterprise is installed. To uninstall:

1. Open RSTestStand Enterprise.

2. Close all windows and toolbars.

3. Close RSTestStand Enterprise.

4. Return to Control Panel. Select Remove and click Next to uninstall the previous version.

The serial number is on the product box label or on the Master Diskette.

RSTestStand.book Page 4 Friday, September 10, 2004 3:22 PM

Page 15: tstent-gr001_-en-p

2 • Installing RSTestStand Enterprise

5

• • • • •

2 • Installing RSTestStand Enterprise

e. On the Ready to Install dialog box: Click Install. The program features you selected will be installed on your system.

f. On the Install Activation dialog box: Leave “Yes, install Activation now” selected and insert the Master disk into the drive. Click Finish.

g. On the EvMove Select Drives dialog box: Click OK to install the activation files to the default settings or use the list to install the activation files to another drive.

h. On the EvMove dialog box: Click Move to install your activation files. Follow the instructions on the screen to activate the software.

i. On the EvMove Move Summary dialog box: Click OK to move the activation files.

j. On the Setup Installation Complete dialog box: Installation is complete. Click Finish.

4. If Show Release Notes was selected, the Release Notes are launched.

5. When you are finished installing the software, remove the CD-ROM from the CD-ROM drive and the Master disk from the disk drive. Store them in a safe place.

6. Click Exit to exit from the Installation Menu.

Starting the RSTestStand Enterprise softwareTo start the software:

1. Open the Windows Start Menu.

2. Select Program Files > Rockwell Software > RSTestStand Enterprise > RSTestStand Enterprise. The software starts.

3. You can open a sample application by selecting File > Open. Select the Sample Applications directory. Open one of the sample files.

When the software starts, the Library and the Project Model windows are displayed in the main window, along with the main toolbar and the status bar. These items can be detached, moved, or closed at any time during your session. You can reopen editor windows by choosing the View menu and selecting the window that you want to display.

If you do not install your activation, you will get a message warning you that you will not be able to save. For more information on activation, see “Activation” on page 143.

RSTestStand.book Page 5 Friday, September 10, 2004 3:22 PM

Page 16: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

6

• •

• •

RSTestStand.book Page 6 Friday, September 10, 2004 3:22 PM

Page 17: tstent-gr001_-en-p

7

3

3 • Creating the Project Model

Creating the Project ModelThe Project Model is a model of the machinery or process being described through RSTestStand Enterprise. In the Project Model, the machinery and processes are represented through resources.

The Project Model is organized in a project tree that consists of folders that contain resources, operator consoles, and data scope sources and views. It also contains connection diagrams, part flow models, and Testscripts. These features are described in separate chapters later in this manual.

This chapter describes some background material about developing your project, followed by detail about the Project Model, including how to populate it with folders, resources, and operator consoles, and how to import information into and out of the Project Model.

Developing your projectThis RSTestStand Enterprise Getting Results Guide leads you through developing your application. Before you begin, though, you might want to consider how to approach your problem. Some suggestions for developing your project are presented in the following.

Analyze your applicationYou need to perform this step to develop the control system. In fact, in many ways, building a dynamic model of the process to be controlled is simpler and faster than developing extensive documentation. You can use the model to unambiguously define the process and get early customer agreement. Use the visualization tools to refine the presentation of the model so that the design is obvious. You should be able to draw on the set of elements supplied in the libraries or in the various applications examples.

Typically, you will find that your model can be decomposed into chunks of functionality. Resources can then be applied to implement those chunks. We recommend that you keep the amount of interaction among chunks to a minimum. You should connect or wire variables between chunks, rather than try to reference a variable directly from another chunk in a flowchart.

Pay particular attention to implementing the boundary conditions for your application. If a tank can only hold 1000 gallons, you want to make sure your model has limits that test for 1000 gallons. You can use a Halt instruction to stop the simulation at that point and check what happened in the logic to cause the condition to occur.

RSTestStand.book Page 7 Friday, September 10, 2004 3:22 PM

Page 18: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

8

• •

• •

Test the modelThe model will have a series of connection points to the PLC — inputs and outputs to and from the model. Build a temporary Operator Console that can provide input into the model. For example, if you expect a Boolean value from the PLC to cause some motion in the model so that the PLC gets the appropriate feedback, you can use an Op Console button to manually stimulate the model. You can observe the model response using Watch Windows.

You should try and test each chunk of functionality separately. Typically, the PLC logic implements the overall sequencing of the application.

If you want to fully develop the application offline, you should consider using the Controllers feature. It allows incremental development and replacement of modular units of your process as broken down by areas of control.

You may also want to implement a unit testing philosophy. If so, you will find that a cost-effective solution is to use RSTestStand as your unit test environment and then use RSTestStand Enterprise to fully test the integrated system.

Develop your system logicReturn to your model and disconnect any manual debug devices that you used to test the model. Using the OPC tag browser, wire the model to your PLC logic or other devices. You can also import large segments of the OPC tag database using the Add Variables from the OPC link functionality.

Run the logic, any electronic HMI, and your RSTestStand Enterprise application concurrentlyRun through whatever checkout procedures you do normally to test for various error conditions and system responses. While you cannot solve wiring or other hardware problems, you can catch many programming errors, especially ones that involve interaction between the PLC and other systems such as the HMI. Test for system error response by forcing values using the Watch Windows.

RSTestStand.book Page 8 Friday, September 10, 2004 3:22 PM

Page 19: tstent-gr001_-en-p

3 • Creating the Project Model

9

• • • • •

3 • Creating the Project Model

About the Project ModelOnce components have been added to a Project Model, the Project Model window provides you with a hierarchic representation of all the elements in your system (except for Project Properties). The Project Model window displays these types of elements organized in a tree structure:

Folders

Resources

Operator Consoles

Data Scope folder

Connection Diagrams

TestScripts

Controllers

Folders graphically organize your project and act as a placeholders for part flows in the project tree (if the part flow folder contains object, the folder has a “P” on it). Folders can only be added below other folders (they cannot be added below resources).

Resources define the characteristics of the equipment or process. The Standard Resource Library contains resources you can use to start your project. You can also create your own resources (see “Adding user-defined resources to the Project Model” on page 22). Resources in the Project Model can be dragged anywhere in the tree. Children of the resource move with the parent. If you delete a parent resource, all children will be deleted. Note that you cannot move folders.

Operator Consoles model physical panels and allow you to interact with your Project Model during simulation. The devices you can place on the Operator Console have properties such as variables and capabilities and can have flowcharts associated with them to set their behavior.

The Data Scope folder contains the data sources and views that you set up for the Data Scope. See “Using the Data Scope feature” on page 57 for more information.

You can print a listing of the Project Model and its resources, the resource variables, capabilities, connections, and what their connections are by selecting File > Print XREF and using the standard print dialog box.

Your Project Model initially contains a root folder called Equipment. Although you cannot delete the Equipment folder, you can rename it by right-clicking it and selecting Rename.

RSTestStand.book Page 9 Friday, September 10, 2004 3:22 PM

Page 20: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

10

• •

• •

Connection Diagrams provide another method of viewing Project Model data. Instead of a hierarchic view, they allow you to view the behavioral relationship among the various resources. Once you have created a connection diagram, you can drag resources into it and add or delete connections. The connection diagram is live when RSTestStand Enterprise is running its simulation, so it is a good way to demonstrate the data flow in the system. See “Connection Diagrams” on page 87 for more information.

The Part Flow Model provides realistic feedback to the control system for part-in-place detection and is also useful for conceptualizing the initial control system design, where different types of resources work together to accomplish some task. See “Part flow models” on page 99 for information.

TestScripts are a method of checking out your control system in an organized and repeatable way. See “Developing and using TestScripts” on page 123 for information.

The New Inactive Resources features allows you to add placeholders in the project tree. Inactive Resources only contain Attribute properties, and therefore cannot have any behavior (logic or variables). They are typically used when you import an XML file and you want to preserve the structure of the file without impacting performance or memory. Inactive resources are marked with the structural icon ( ).

Creating a new Project ModelTo create a new project:1. Start RSTestStand Enterprise.2. Select File > New.

The Create New Workspace dialog box is displayed.

3. Type a name for your project file.

View > Hide Inactive Resources allows you to collapse the Project Model tree by hiding inactive resources. However, if a project tree branch has active resources at the end of the branch, all resources will be displayed along that branch.

RSTestStand.book Page 10 Friday, September 10, 2004 3:22 PM

Page 21: tstent-gr001_-en-p

3 • Creating the Project Model

11

• • • • •

3 • Creating the Project Model

4. Click Save.The Project Properties dialog box is displayed.

Project Properties dialog box

5. Complete the boxes in this dialog box. Note that the version number is simply a text box. RSTestStand Enterprise does not update this field automatically.

The defaults for the other tabs are acceptable for most applications. If you need to change them, see the online help for detail.

6. Click OK when changes are complete. The Project Model, Resource Libraries, and the Scenes panes open.

To change your project properties later, select View > Project Properties from the menu.

RSTestStand.book Page 11 Friday, September 10, 2004 3:22 PM

Page 22: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

12

• •

• •

Populating your Project ModelYou build your Project Model by adding folders, resources, and operator consoles, and connecting these components.

This section takes you through the basic steps of creating your Project Model. For more detail, see the chapters on the specific components and the online help. The online help also provides a Tutorial using a detailed example.

To populate your Project Model:

1. Right-click and select New Folder.

2. Type in a name for the folder.

3. Add resources to the folder by dragging resources from the Standard Resource Library into a folder.

Drag resources from the library to a folder in the Project Model

Operator Console devices cannot be used in standard resource folders. Resources from the Standard Resource Library cannot be used in Operator Consoles.

RSTestStand.book Page 12 Friday, September 10, 2004 3:22 PM

Page 23: tstent-gr001_-en-p

3 • Creating the Project Model

13

• • • • •

3 • Creating the Project Model

4. The User Input dialog box might be displayed. Rename the resource and check the values of the variables in this dialog box.

Check values of the variables in this dialog box

5. Click Done.

6. Add an Operator Console by selecting the folder or resource under which the Operator Console will be placed, right-clicking, and selecting New Operator Console.

Add a new Operator Console

New Operator Console

RSTestStand.book Page 13 Friday, September 10, 2004 3:22 PM

Page 24: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

14

• •

• •

7. Rename the Operator Console as needed. Right-click and select Rename.

8. Double-click the operator console to open the Operator Console Editor.

9. Add devices to the operator console by dragging them from the Op Console Devices folder of the Resource Library onto the Operator Console editor. As devices are added in the editor, they are also added in the Project Model under the Op Console.

Adding a device to an Operator Console

10. To wire an Operator Console device to an appropriate variable, double-click a device. The Properties dialog box is displayed.

A dialog box is displayed that says you are not using hardware acceleration. If you have OpenGL hardware acceleration, use the View Menu > 3D Rendering Properties menu to turn on hardware acceleration.

You can select the option to stop displaying the dialog box if you are using software emulation for OpenGL.

Operator Console Editor

Resource library showing Op Console devices

RSTestStand.book Page 14 Friday, September 10, 2004 3:22 PM

Page 25: tstent-gr001_-en-p

3 • Creating the Project Model

15

• • • • •

3 • Creating the Project Model

11. Select the Variables tab. Operator Console devices have pre-defined variables as appropriate for the device.

Resource Properties dialog box for Operator Console device

12. Double-click the Connections cell of the variable you want to wire.

13. The Browse Resources dialog box is displayed. Select the variable to be connected to the Operator Console variable.

14. Click OK.

15. Click OK on the Property dialog box.

You have now wired one internal variable to the state of another.

Modifying your Project ModelRight-click a Project Model resource to modify or to save your Project Model resources using these options:

Remove and Rename: Remove or rename the selected folder or resource.

Properties: Displays the Properties dialog box for the selected folder, resource, or Operator Console.

Communications Properties: Displays the OPC Server Information dialog box. If you want to make communications settings that are specific to this resource, click Communications button on the Attributes tab of the Resource Properties screen. The Resource Properties dialog box is shown on Page 23.

Disable Resource Flowchart: Turns off the execution of the flowchart for the selected resource. This feature is typically used for troubleshooting.

Save to Library: Opens a dialog box that allows you to choose a target library for the selected resource and name the resource for use in the resource library.

RSTestStand.book Page 15 Friday, September 10, 2004 3:22 PM

Page 26: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

16

• •

• •

Searching your Project ModelDepending on your filter selection, Search allows you to find and replace strings as they are used in a variety of contexts, such as resource names, variable names, and other uses throughout the project. To search:

1. Right-click an item in the Project Model and select Search. The Project Search/Replace Tool dialog box is displayed.

The Project Search/Replace Tool dialog box

2. Select the Search Filters. These are the objects that will be searched.

3. Enter a string in the Search Text box.

RSTestStand.book Page 16 Friday, September 10, 2004 3:22 PM

Page 27: tstent-gr001_-en-p

3 • Creating the Project Model

17

• • • • •

3 • Creating the Project Model

4. Click Search. Any items that are found are shown in the Search Results box.

Using the Search/Replace feature

Importing and exporting your project variablesRSTestStand Enterprise uses a configuration tool that allows you to import text data from a delimited file and export the project variables to a comma–separated variable (csv) file.

The source of imported data can be programs such as Microsoft Excel or Microsoft Word that can export text-based data. This allows you to easily develop your Project Model from sources such as a bill of materials spreadsheet or a CAD project tree. For example, by exporting and re-importing, you can add OPC addresses while the table of variables is in Microsoft Excel.

You can also import and export Project Models using XML. See “Importing and exporting projects” on page 121.

Select these boxes to choose the instances that should be replaced. Click Replace With to enter the replacement text

Double-click an item to open the Properties dialog box for that item

Click Select All if you want to replace all instances

RSTestStand.book Page 17 Friday, September 10, 2004 3:22 PM

Page 28: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

18

• •

• •

Importing project variables

1. Select File > Import. The Import Formatted Text File dialog box is displayed.

2. Select the file to be imported.

3. Click Open.

An exported RSTestStand Enterprise project uses a record identifier in its first column. Three types of records are used: (–) for the Header record, (V) for the variable record, and (F) for a folder record. If you want the importer to use these identifiers, make sure the “Use 1st Column to Autodetect Component” option is selected.

Import dialog box

4. Right-click the headers and select the appropriate field definitions. See the table below for header descriptions. Fields that are set to Ignore will not be imported.

5. Parent and Name must be selected in order to merge with existing variables. They identify the specific target resource and its path in the project tree.

Save a backup of your existing Project Model before importing. Imports cannot be undone.

Right-click to set header definitions

Click an item in the tree…

…and see its values here

RSTestStand.book Page 18 Friday, September 10, 2004 3:22 PM

Page 29: tstent-gr001_-en-p

3 • Creating the Project Model

19

• • • • •

3 • Creating the Project Model

6. Review which records (rows) you want to import. To skip an individual record, right-click the record and select Ignore. (Note that Ignore is only available if the “Use 1st Column to Autodetect Component” option is cleared.)

7. You can review the effect of your choices in the Pending Workspace box. Click an item in the tree to display the details for that item in the table below the tree.

8. Click OK to complete the import.

Exporting dataExporting data generates a comma separated variable (csv) file. To export a file:1. Select File > Export.2. Select a file or enter the name of the file.3. Click Save.4. When the export is complete, the message “Export Successful” is displayed.

Click OK to close the dialog box.The first row of the export is a header that contains descriptions of the fields. See the table that follows for field descriptions.

For more detail on the merge process, see the online help.

RSTestStand.book Page 19 Friday, September 10, 2004 3:22 PM

Page 30: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

20

• •

• •

Field descriptions for csv fileField Description

Record type V: The record is keyed as a variable.F: The record is a folder.—: A header row.

Template type The name of the library element that will create the instance in the Project Model. Import only.

Parent The name of the resource to which the variable belongs (if the record is a variable.) The name of the resource can be the full path, which identifies the path of the resource in the project tree, or a truncated name. In general, keep the full path.For import, the full path must be selected to merge with existing variables.

Name The name of the variable as it appears in the resource property dialog box. Selected by default.For import, this must be selected to merge with existing variables.

Variable type Boolean, real, integer, double integer, or string.Is there connection to this variable?

True indicates there are connections; False indicates there are not.

Is this variable Public?

True is yes.

Initial value – 1 for a Boolean-typed variable means that the initial state is true.Mode Source, duplex, or sink.Tag The OPC tag address.Force present True means that a force is applied to this variable.Force value If a force is applied, this is the value that the variable will take when it

goes into run mode.

RSTestStand.book Page 20 Friday, September 10, 2004 3:22 PM

Page 31: tstent-gr001_-en-p

21

4

4 • Resources

ResourcesIn the RSTestStand Enterprise Project Model, the machinery and processes are represented through resources. Resources define the characteristics of the equipment or process and consist of:

A logic view, which contains a group of flowcharts that control the way a resource behaves. See “Flowchart Editor” on page 81 for more information.

Variables that interact with the flowchart, other resources, and the PLC

Capabilities, which define the actions that resources can do

After creating a Project Model, you need to populate the model’s folders with resources. You can add resources to the model by:

Creating new user-defined resources

Dragging resources from the Standard Resource libraries or user libraries

After they have been added to the Project Model, you can set attributes, variables, and capabilities for the resources.

You also need to connect the resource to another resource or to a PLC, which is referred to as wiring resources.

Resources can be inserted into folders or grouped together to form parent-child orderings. A parent-child ordering is an aggregation of resources, or a resource assembly. They are created by dragging a resource from the Resource Library onto another resource, which creates the parent-child relationship.

Resources and groups of resources can be saved as library elements and reused in other places in your current Project Model or in other projects. See “Creating and using libraries” on page 91.

RSTestStand.book Page 21 Friday, September 10, 2004 3:22 PM

Page 32: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

22

• •

• •

Adding user-defined resources to the Project ModelUser-defined resources are resources that have no pre-defined attributes, such as variables, capabilities, or flowchart logic.

To create a new user-defined resource:

1. In the Project Model, right-click the folder or resource where you want the resource to be stored.

2. Select New Resource.

3. The new resource is completely empty. Use the resource’s property dialog box to add variables and capabilities and flowchart logic where necessary.

Setting attributes, variables, and capabilities for resourcesAfter you have added a resource to the Project model, you can change its attributes, variables, and behavior to customize its behavior or better model a component.

Setting resource attributesAttributes are general information about the resource. You can also change communications options through this tab.

To change a resource:

1. Right-click the resource in the Project Model

The simplest way to add resources to the Project Model is by dragging resource definitions from Standard Resource libraries into your Project Model. See “Populating your Project Model” on page 12 for detail on this method.

Resources can inherit behavior from a library element. Hold down the Ctrl key and drag a library element onto a resource. The target resource keeps its name, but all other properties, such as variables, flowchart, and capabilities, are replaced by the source library element.

RSTestStand.book Page 22 Friday, September 10, 2004 3:22 PM

Page 33: tstent-gr001_-en-p

4 • Resources

23

• • • • •

4 • Resources

2. Select Properties. The Resource Properties dialog box is displayed.

Resource Properties dialog box with the Attributes tab displayed

3. Type a Resource Name. This is the name that will be in the Project Model.

4. Select a Category. This is the icon that is displayed for the resource in the Project model. Resource categories are also used to populate the Role field in the EDX schema. Icons are shown here.

5. Type a Description. This is a 250-character descriptor that allows you to document your resource.

Generic Mechanical Continuous Process

Structural Control

RSTestStand.book Page 23 Friday, September 10, 2004 3:22 PM

Page 34: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

24

• •

• •

6. If you want to make communications settings that are specific to this resource, click Communications. The Communications dialog box is displayed.

Communications dialog box

Communications dialog box options are described in the following table:

Option Description

Server Name The value you set in the View > Project Properties dialog box.

Is Using Server Select this if you select any OPC tag addresses in the Variable tab Tag box. To disable connections for this resource only, clear this.

Desired Update Rate (ms)

The value that you set in the View > Project Propertiesdialog box (if no value was set, the default is 50 msec). If you want to tune system performance by allowing some tag groups to scan faster than others for reads, change the update time. The allowed range is 1 to 10,000 msec, but values less than what the communications link can support might not be practical and will be increased as necessary by the OPC server.

RSTestStand.book Page 24 Friday, September 10, 2004 3:22 PM

Page 35: tstent-gr001_-en-p

4 • Resources

25

• • • • •

4 • Resources

Setting resource variablesVariables store values during program execution and are used in a resource flowchart.

The Variables tab is also used to wire resources. There are two types of variable connections that you can make to wire your model in RSTestStand Enterprise. You can connect resource variables to other resource variables in your model (internal variable connections) or connect resource variables to tags through OLE for Process Controls (OPC). OPC connections are made using tags. Tags can represent anything that can be connected through OPC, including PLC data tables.

Send duplex variables’ initial values to server during startup

By default, the initial value of duplex variables is not written to the PLC at startup. In general, you should use source variables to control the initial value in the PLC logic. However, if you want to have the initial value of the duplex variable written during the pre-scan of the software, select this option.

If a source variable is connected to a duplex variable that has an OPC tag address, the second scan causes the source variable value to be written to the PLC. Since the software will always write a source value to a connected duplex variable if it is different than the connected variable, the connected source value will always be enforced in the PLC.

Update server information in child resources too

This allows you to selectively disable portions of the Project Model from a particular resource down.

Update Server Information in all other resources (project wide)

Allows you to update the communication properties of all resources in the Project Model. Use this to turn the OPC connections on or off in an entire project.

For OPC connections, you must have release 2.4 or greater of RSLinx for integration into your software. Open RSLinx and make sure the appropriate drivers are configured. For RSEmulate 5, the “PLC5 (DH+) Emulator Driver” must be selected. Create a topic for your project and link it to your controller. For detail on how to configure RSLinx, see the RSLinx documentation.

Option Description

RSTestStand.book Page 25 Friday, September 10, 2004 3:22 PM

Page 36: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

26

• •

• •

To set variables for your resources:

1. Click the Variables tab. The dialog box shown here is displayed.

Variables tab of the Resource Properties dialog box

2. The Name column contains name of the variable. Names must start with a letter and can be alphanumeric. They must be less than 80 characters long with no spaces. Underscores are allowed.

3. Select a Type from the list in the Type column. This defines how the variable is represented when it is connected to a PLC using OPC. For variables that will be connected to a PLC, make sure they match the type of the variable to which they are connected.

RSTestStand.book Page 26 Friday, September 10, 2004 3:22 PM

Page 37: tstent-gr001_-en-p

4 • Resources

27

• • • • •

4 • Resources

The types are:

bool: 0 or 1, true or false

dint: 32-bit integer

int: 16-bit integer

double: 8-byte floating point real number

real: 4-byte floating point real number

string: text

arrays: bool, int, double int, real, double (real), and string. See Initial Value for dimensioning the arrays.

4. If you are connecting this variable to another internal variable (including Operator Console variables):

a. Double-click the Connections column. The Browse Resources dialog box is displayed.

b. Select the variables you want to connect to. When variables are connected, it is as if there is a wire transferring the contents of one variable to the other variables.

5. In the Mode column, select how the variable value should be resolved if there are competing points of connection. For example, if a variable is connected to another variable, whether internally or through OPC, and both connections can modify the variable, you can select Source to tell the system that this variable is write-only.

Multiple variables can be connected using the browser tree (fan out). If a variable is connected to the one you are looking at, the field is filled in with the name of the variable. If multiple variables are connected, the outline of the field is changed from black to red dashes. Variables do not have to be the same type to be able to transfer values, but we recommend that you keep the types the same for troubleshooting purposes.

RSTestStand.book Page 27 Friday, September 10, 2004 3:22 PM

Page 38: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

28

• •

• •

The choices are:

Source: The variable and its tag are write only. It is controlled only by the initial value and the flowchart. When a source mode variable is connected to a duplex variable, and the value of the duplex variable is different than the source, the source mode variable will always write its value to the duplex variable. Use Source when the tag is a PLC input and you do not want any other variable to influence it.

Duplex: The variable and its tag are read and write. The OPC link updates the value in the variable by reading from the tag address, as well as writing to the tag address. If a duplex variable is connected to other variables, and the values of these variables are changing, and you are also controlling the value locally through a flowchart, the value of the duplex variable is determined by the last update from whatever location. For this reason, be careful of how you connect duplex variables.

Sink: The variable and its tag are read only. If the variable is connected through OPC to a PLC, Sink means that the initial value of the variable will not be written to the PLC at startup.

6. Select Public to have the variable be displayed in the Variable browser list.

7. In the Initial Value column, select the value that will be loaded into the variable when the system goes into Run mode. See “Initial Value” on page 30 for more detail.

There are some unique considerations regarding source and duplex variables when the variables are using the OPC link. For additional information, see the online help topic “Application Considerations using OPC.”

RSTestStand.book Page 28 Friday, September 10, 2004 3:22 PM

Page 39: tstent-gr001_-en-p

4 • Resources

29

• • • • •

4 • Resources

8. To connect variables to OPC tags, click the button to the right of the Tag column.

Opening the Browse Tags dialog box

Browse Tags dialog box

Click here to display the Browse Tags dialog box

The OPC tag is the address the system uses to communicate to a PLC. If you cannot find your target address in this list, be sure that the Topic is configured in RSLinx.

You can also type in tag addresses. The format is:[Topic_name]File:Word.bit

RSTestStand.book Page 29 Friday, September 10, 2004 3:22 PM

Page 40: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

30

• •

• •

9. The first time you select a value for the Tag field, the message “Using OPC tag is off — turn it on?” is displayed. Generally, you should select Yes. If it is off, the OPC connection client does not create a group. If you want to selectively disable communications for troubleshooting purposes, select No.

10. Select the tags and click OK.

11. Click OK.

INITIAL VALUE

Initial values can be used to determine the state of the model at startup. For example, you may want to set the Returned limit switch to True on an axis so that it appears that the mechanism is retracted when power is turned on.

If your variable has an OPC tag address, this value will be written to the PLC on the first scan unless Sink is selected.

By default, the initial value of duplex variables is not written to the PLC at startup. In general, you should use source variables to control the initial value in the PLC logic. However, under certain circumstances, you may want to have the initial value of the duplex variable written during the pre-scan of the software. You can change the default by going to the Resource Property Communication dialog and selecting “Send Duplex variables’ initial value to server during startup.”

If you have selected an array data type in the Type column:

1. Right-click the Initial Value field and select Configure Array.

2. Click Resize to set the size of the array. The array defaults to eight elements.

You cannot directly connect array elements to other variables in the system. If you wish to make array elements available to other resources, you must equate an array element in the flowchart to another defined variable in the variable table.

To turn this flag on or off later, select the Attributes tab, click the Communications button, and select or clear the Is Using Server option.

The Add Variables using OPC Browser button lets you import the name of a variable and its OPC tag address from the OPC tag browser. You can multi-select as many tags as you want to import. This allows you to both quickly populate the variable name field and easily switch over control of the simulation from an internal flowchart to a live controller. The RSTestStand Enterprise controller is now a proxy to the live controller.

RSTestStand.book Page 30 Friday, September 10, 2004 3:22 PM

Page 41: tstent-gr001_-en-p

4 • Resources

31

• • • • •

4 • Resources

CONNECTING AN ARRAY VARIABLE TO AN OPC ARRAY

You can connect an array variable to an OPC array using the following syntax:

[topic]base_address<,L##>

You can browse for the base address and then type the comma, L, and a number to indicate the number of elements to be transferred. A valid OPC address would be: [mytopic]N7:0,L5, which would read five words of data starting at N7:0.

RSTestStand Enterprise does not require the variable array to match the length of the OPC tag array.

Setting resource capabilitiesCapabilities represent a time-based function that a resource can perform. Capabilities interact with the resource program through the system functions for the Flowchart Editor, and are invoked from the flowchart of the resource.

Resources from the Standard Library use a variable to point to the resource capability, so you do not have to configure a capability if you are using Standard Library resources.

For an example of using Variables in the Duration field of a capability, see the capability “Time_On” in the Duty Cycle Timer under FC Program Examples of the Standard Resource Library.

Capabilities are integral to how the Part Flow model works. Setpoints of actions that are bound to capabilities can also be modified.

You can monitor the values of capabilities during runtime using the Output Message Window.

If you remove a capability, make sure all references to it in the resource’s flowchart are also removed. If the flowchart tries to execute a non-defined capability while running, it will display an error message. You can use the Find feature to do this. See “Searching your Project Model” on page 16 for more information.

RSTestStand.book Page 31 Friday, September 10, 2004 3:22 PM

Page 42: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

32

• •

• •

To set up capabilities for a resource:

1. Select the Capabilities tab. This dialog box is displayed.

Resource Properties dialog box with Capabilities tab displayed

2. Click Add to add a new capability.

3. Enter a name for the capability. This is the name that is used in the flowchart.

4. Set the duration for the capability in seconds. Duration can be a constant, a variable that stores a number, or a VBS expression.

The resultant value in this field is passed to the functions that use Capabilities as a parameter to indicate the length of time to traverse a hundred units of distance. We recommend that durations be more than 0.25 seconds (250 msec) for performance considerations.

RSTestStand.book Page 32 Friday, September 10, 2004 3:22 PM

Page 43: tstent-gr001_-en-p

4 • Resources

33

• • • • •

4 • Resources

You can enter a value, or right-click the Duration field and select the Function Picker, which replaces the constant in the field with a VBS expression. The options available through Function Picker are:

More information on the statistical functions above can be found in the Visual Basic reference guide. You can also type in your own expression in the field.

5. Set when the function is evaluated. Operation of the selected function depends on when the function is evaluated. Set Evaluation by selecting an option from the Evaluate list:

Every scan: The duration changes while the move is happening. Select this if your duration field references a variable in the resource’s variable list and you want the duration to change depending on flowchart logic.

At zero: Distribution is random and every cycle should be different, according to the selected function. The expression is evaluated when the capability returns to zero.

At Startup: The capability’s duration is seeded with a different number when you begin simulating, and does not change thereafter.

Function Description

EXPO VBS Exponential Distribution function. The function only needs a mean value. Each time it is evaluated, it returns a new random value based on the mean.

NORM Normal. Requires a mean and a standard distribution. Each time it is evaluated, it returns a value that fits the “bell curve” pattern.

TRIA Triangular. Requires minimum and maximum values and a mode value. Mode is the value that is most likely to occur in the pattern. Use this distribution to emulate most mechanical processes.

UNIF Uniform. Requires minimum and maximum values. Each occurrence of the event will have an equal probability of occurring in this range. Use this distribution to simulate processes that have statistical independence from previous events.

VAR Variable. Lets you reference a variable in the resource’s variable list so you can dynamically change the duration value through the flowchart or connection to other variables.

If you enter a fixed number in the duration field, leave the selection at the default.

RSTestStand.book Page 33 Friday, September 10, 2004 3:22 PM

Page 44: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

34

• •

• •

RSTestStand.book Page 34 Friday, September 10, 2004 3:22 PM

Page 45: tstent-gr001_-en-p

35

5

5 • Operator Consoles

Operator ConsolesRSTestStand Enterprise lets you create operator consoles as your primary runtime interface to the application. An operator console is a model of a physical panel equipped with buttons, selector switches, and pilot lights that is used by an operator to initiate motion, change operational modes, or receive notification of important conditions.

In RSTestStand Enterprise, Operator Consoles are treated as a special type of resource. Like other resources, they can have properties such as variables and capabilities that interact with a flowchart and can be saved to user-defined libraries. They are associated with an Operator Console View, which invokes the Operator Console Editor.

The Operator Console Editor let you configure the look and feel of the Operator Console and the position of the devices used on the Operator Console. RSTestStand Enterprise provides a variety of different devices with which you can create your console.

The devices on the Operator Console are child resources that are obtained from the Op Console Devices library. They mimic typical user interface devices, such as pushbuttons, toggle switches, and indicator lamps. Note that Operator Console devices can only be used on Operator Consoles.

Operator Console devices can be configured like any other resources, and you can change their behavior by writing a flowchart program that uses the resource variables and conditions them through your program. Devices are usually coupled to the application through PLC I/O, although they may have indirect behavior, such as an emergency stop, that only connect to internal parts of the model. For example, if you want a flashing hardware light, you can add a variable for an input, create a capability with a one-second duration, and write a flowchart that uses the capability in an Invoke function to periodically turn the Coil variable on and off.

You can merge an existing Op Console with another Op Console. The target Op Console will contain all of the children of the source. See “Merging Operator Consoles” on page 39.

Operator Console child resources cannot have children.

RSTestStand.book Page 35 Friday, September 10, 2004 3:22 PM

Page 46: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

36

• •

• •

Adding an Operator ConsoleTo create an Operator Console:

1. In the Project Model window, select the folder or resource under which the console will be placed.

2. Right-click.

3. Select New Operator Console. An operator console resource is created under the folder or resource.

New Operator Console in the Project Model

4. Rename the resource (the default is Op Console).

5. Double-click the operator console to open the Operator Console Editor.

New Operator Console

RSTestStand.book Page 36 Friday, September 10, 2004 3:22 PM

Page 47: tstent-gr001_-en-p

5 • Operator Consoles

37

• • • • •

5 • Operator Consoles

6. Add devices to the operator console by dragging them from the Op Console Devices folder of the Resource Library onto the Operator Console view.

Adding devices to the Operator Console Editor

7. To automatically arrange the console devices, select Layout > Auto Arrange. After using Auto Arrange, you might need to resize the view to see all of the devices.

8. Add wallpaper to the Operator Console by dragging a bitmap from the Textures folder of the Graphics Library to the Operator Console. To remove the wallpaper, open the Resource property dialog box of the Operator Console and click Remove Wallpaper.

To add new textures to your Project Model, right-click the Textures folder in the Graphics Library and select Import Textures. You can import a variety of file formats, including .bmp and .jpg. The new texture will appear under the Texture folder. The file that was selected is now part of the project file (.rsm) and is automatically included in any save or restore operation. You can move or delete the original file.

Drag devices from the Op Console Devices Library to the Op Console Editor

RSTestStand.book Page 37 Friday, September 10, 2004 3:22 PM

Page 48: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

38

• •

• •

Operator Console with devices

Configuring Operator Consoles device resource propertiesTo display the resource properties for a device, double-click the device. You can add and remove variables through the property dialog box.Note that you cannot access the special purpose functionality of Operator Console devices if you modify or delete variables that are created when the resource is created. For example, all push buttons have normally open contacts and normally closed contacts modeled as variables. Deleting the normally open contact variable means that you can no longer use that function in your project.Devices and Op Consoles can be renamed or removed from the project through the Resource dialog box or from the Project Model window.See “Resources” on page 21 for more information on working with resource properties.

RSTestStand.book Page 38 Friday, September 10, 2004 3:22 PM

Page 49: tstent-gr001_-en-p

5 • Operator Consoles

39

• • • • •

5 • Operator Consoles

Merging Operator ConsolesYou can merge an existing Op Console with another Op Console. The target Op Console will contain all of the children of the source. Existing attributes of the target remain unchanged, including the wallpaper. The source Op Console is deleted when the consoles are merged.

1. Select an Op Console with its children.

2. Identify the target Op Console.

3. Drag the selected Op Console onto the target. The cursor changes to an M when it is on top of a possible Op Console target.

4. Release the selection. A confirmation dialog box is displayed.

5. Select Yes.

Operator Console devicesThe Operator Console lets you mimic the behavior of operator console devices that might be assembled onto a panel next to a machine. The operator console devices provided in the Op Console Devices library are described below.

Emergency stopThe Emergency Stop device behaves like a maintained push button, except that the contacts are wired such that they open when the button is pushed. The button illuminates whenever it is pushed. Clicking the button restores normal operation.

Indicator lampCreated with a single variable called Coil. When Coil is true, the lamp lights. Color can be selected on the Style tab of the resource property dialog box.

LED displayThe corresponding output operator console device for integer and real values. You select the number of digits and the number of decimal places from the Style tab. (The Style tab choices change based on whether the Value variable is typed as a real or as an integer.) The decimal point counts as a digit when you specify the number of digits. The device displays whatever value is connected to its Value variable.

RSTestStand.book Page 39 Friday, September 10, 2004 3:22 PM

Page 50: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

40

• •

• •

Message displayThe message display has one variable, a string called Msg, that works as follows:

By default, it has 20 columns (characters across) and 2 lines (rows). This can be modified by going to the Style tab of the Resource Property dialog box.The value of Msg is displayed when simulating. If the length of a line is greater than the columns, line breaks are added. You can insert the characters \n into the display string to force new lines.In Edit mode, each line is filled with the text X: Line, where X is the line number. This is to aid the designer when sizing the device.

MeterThe output display device for reals. The bar moves based on default values between the low and high range. Change the meter orientation and the scale range on the Style tab. You can also change the style to a needle or a bar.

Push buttonMimics either a momentary or maintained pushbutton. To use a maintained pushbutton:1. Right-click the pushbutton.2. Choose Properties from the menu.3. Select the Style tab.4. Select Maintain State.You can also select the color of the lens from the Style tab.

The operator console device now works at runtime. Click the button once to hold it down, and click again to release it.

Open the Variables tab to set the variables for the push button. Variables include:

Normally open and normally closed Boolean variables that are automatically created.A coil variable that is automatically created to mimic an illuminated pushbutton. To mimic illumination, wire the variable so its state is controlled through the simulation.

Click Add to create additional contacts. Write a corresponding flowchart to control them.Since you will typically be using pushbuttons as inputs to the PLC, we recommend that you select Is Source (producer) when you create your connection to the PLC through the OPC Browse Tags dialog box.You can also emulate buttons that require an operator to press two buttons at a time to activate machinery. At runtime, press Ctrl while pushing a momentary button to make it temporarily behave as if it is a maintained button. Click the button again to release it and return it to momentary action.

RSTestStand.book Page 40 Friday, September 10, 2004 3:22 PM

Page 51: tstent-gr001_-en-p

5 • Operator Consoles

41

• • • • •

5 • Operator Consoles

Selector switchA multi-state operator console device that allows you to mimic behavior such as mode control on the operator station. You can configure the number of states the switch has through the Style tab. The default number of switch positions is four.

Nine variables are created for the switch based on the four positions: one integer variable that returns a 0-3 corresponding to the position, and four pairs of contacts, one pair per position. When you change the number of switch positions on the Style tab, the software modifies the number of variables. For example, a 3-position setting changes the number of variables to seven: one integer with a 0-2 range, and three pairs of Boolean contact variables.

Positions can be labeled by populating the description field on the Attributes tab and selecting “Use Description as Label.”

SliderThe input device for reals. You can change the operating range and orientation of the slider on the Style tab. The default range is 0 to 100.

Strip chartMimics a panel-mounted strip chart recorder. It can display up to four pens moving across the viewing area at a user-defined speed. It is typically used for comparing relative signal values over time, either analog or digital. Unlike a strip chart recorder, there is no logging capability, so once the signal moves off the viewing area, you can no longer retrieve it. If you need logging, we recommend you use RSView32’s trend feature.

The strip chart has four variables, one for each pen. By connecting a variable, either to other variables in the system or directly to a PLC, you can control the action of the respective pen on the screen.

On the Style tab, you can set:

Low and High Range: The full travel of the pens vertically corresponds to these low and high values. Most ranges in the software use a 0 to 100 scale, which is the default.Scroll Rate: Determines how quickly the graph moves across the screen.Update Rate: Determines how often a new point is graphed on the display. The more frequently a point is graphed, the more computer resources RSTestStand Enterprise is using.Boolean: The display is reconfigured so that the pens are mapped on separate spaces on the display. This lets you see the relationship of one Boolean value to another, similar to a logic scope. Since Boolean values usually change rapidly, we recommend a more frequent Update Rate. The default Update Rate is changed to 0.1 sec when Boolean is selected.

RSTestStand.book Page 41 Friday, September 10, 2004 3:22 PM

Page 52: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

42

• •

• •

Text boxAllows you to comment operations on your operator console and create custom labels for devices. The field auto-sizes to amount of text in the box, up to a maximum of 255 characters. The type face is not adjustable.

To configure a text box:

1. Drag the Text Box from the Op Console library to your Op Console.

2. Double-click the box to begin editing the text. Press Enter to stop the line and start a new one.

3. Click anywhere outside the box to end the editing session.

Thumb wheelAllows you to enter an integer value into your simulation or directly to the PLC. The number of digits for a thumb wheel is configured on the Style tab. You can change values at runtime by clicking individual digits. Similar to a real thumb wheel, changes in digits are entered immediately.

To strobe a value into your PLC program, use a combination of a thumb wheel and pushbutton.

Toggle switchMimics a SPST switch. Its Normally Open variable (Contact_NO) is true when the switch is toggled in the up position.

2-state feedbackA simple model of valves, cylinders, and other two-state devices.

Enable is the input to the device. State 0 and State 1 are controlled by the device. Delay time is configured by you in seconds.

When Enable turns on, State_0 turns off, and State_1 turns on some Delay_time later. Turning Enable off reverses the action.

You can modify the logic of the device by changing the flowchart of the device resource. Right-click the 2-State Feedback device and select Edit Logic.

Enable AmberState_0 RedState_1 Green

RSTestStand.book Page 42 Friday, September 10, 2004 3:22 PM

Page 53: tstent-gr001_-en-p

43

6 6 • Creating 3D models

Creating 3D modelsRSTestStand Enterprise provides the Animation Editor for adding 3D models. These animations are 3D graphic representations of underlying dynamic data components in your model. They help you visualize the behavior of many different model elements.

Through the Animation Editor, you can create, animate, and control 3D models, or scenes. Each scene is a collection of assemblies with an associated view and 3D coordinate system.

This chapter provides information on building and working with scenes.

Building a 3D animationTo develop an animation, you need to:

Create an object in the 3D view, or scene

Give it some animation behavior, such as linear movement, by adding paths and frames

Bind the animation property to a variable in your project model

Adding an object to the scene1. Maximize RSTestStand Enterprise to make it easier to see the Scene View.

2. Select Scenes > New Scene.

3. Type the name of the scene and press Enter.

RSTestStand.book Page 43 Friday, September 10, 2004 3:22 PM

Page 54: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

44

• •

• •

4. Double-click the name of the new scene. A blank Scene View is displayed.

Blank Scene View

5. Open the Graphics Library by selecting View > Library Palette and selecting GraphicsLib.

RSTestStand.book Page 44 Friday, September 10, 2004 3:22 PM

Page 55: tstent-gr001_-en-p

6 • Creating 3D models

45

• • • • •

6 • Creating 3D models

6. Drag an assembly from the Graphics Library onto the Scene View.

Adding an object to the Scene View

Whenever an assembly is dragged into a scene, it is placed at the current center of the view.

You can change the center by panning with the Pan Floor button, .

Drag assembly from the Graphics Library onto the Scene View

The new object is also added to the Scenes window

RSTestStand.book Page 45 Friday, September 10, 2004 3:22 PM

Page 56: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

46

• •

• •

7. If necessary, move the assembly to the appropriate location. To:

Move the assembly: Click the Move button, , from the toolbar.

Rotate: Click the Rotate button, , and rotate the assembly relative to its position in the scene.

Scale: Click one of the Scale buttons, or , and size the assembly as needed. Asymmetric scale changes the size along the selected axis. Uniform scale changes the size proportionately along all three axes.

Change the Pivot point: Click the Move Pivot button, , and drag the pivot point to the new location.

Align objects: Open the Animation Controls dialog boxes for the object you want

to align. Select the objects using Ctrl+click, then click .

You can also manually set the location using the Properties dialog box. Right-click the assembly and select Properties.

8. Add texture by dragging a texture from the Graphics Library to the selected object. The texture is displayed when you click another object.

The rotation and the scale options are always up or down (not side-to-side) for single axes.

Click an angle and drag to move along two axes

Click an arrow and drag to move along an axis (Move selected)

Click and drag vertically to rotate around the axis (Rotate selected)

RSTestStand.book Page 46 Friday, September 10, 2004 3:22 PM

Page 57: tstent-gr001_-en-p

6 • Creating 3D models

47

• • • • •

6 • Creating 3D models

Adding paths and framesA path is any kind of motion, or transformation, that an object can have. Components and assemblies can have multiple paths.

A path is made up of beginning and end points, or key frames, that record the position, orientation, and size of an object at that point. At each key frame, the object can move to a new position, rotate, or be scaled. RSTestStand Enterprise analyzes the key frames and determines the best path to take to move from one key frame to the next. If you need a different path, you can add additional key frames to force movement in a particular direction. Note that when rotation is added, RSTestStand Enterprise will automatically add additional key frames to accomplish rotation.

To add paths and frames:

1. Select the assembly or component.

2. From the toolbar, select . The Animation Controls dialog box is displayed for the selected object.

Animation Control dialog box

3. Click Add Path. Once a path is added, one frame is automatically created at the 100 percent marker (the end of the path). The beginning frame is automatically created at the location of the component when it was first put into record mode. It is not shown in the Controls box.

4. Assign a name to the path.

5. Click OK.

Animation Controls dialog box after path selected

Frame added

RSTestStand.book Page 47 Friday, September 10, 2004 3:22 PM

Page 58: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

48

• •

• •

6. Click the green slider on the scale. This turns on record mode and displays a red box around the scene. Any position, rotation, or sizing commands will be recorded.

7. Drag the animation along a path. You can change the type of motion using the buttons

on the toolbar (for example, Move or Rotate ).

8. Click the red slider to stop recording.

9. Test the motion by sliding the yellow slider. You can also use this slider to position a component anywhere along the animation path.

10. You can refine movement by adding segments to the path:

a. Add another key frame by clicking a location on the scale. Right-click and select Insert frame at xx.xx.

b. Click the new key frame to start record mode.

c. Drag the object to the next position.

d. Click the red slider to stop recording.

e. Test the path with the slider.

11. To adjust the speed or re-order frames, click the square above the green slider to move the frame location. The closer frames are to each other, or the closer they are to zero, the faster the motion.

12. To add additional frames to this path, right-click the scale and select Insert Frame. Click the slider for the new frame and record motion as needed.

13. Test the animation by selecting Test Animation, .

When you click an existing frame and enter record mode, the object moves to the location and orientation of what was recorded at that frame. This allows you to adjust the contents of that frame by recording a new position or orientation for the frame.

Test Animation tests the first path for each object. To test another path, select the path you want to test from the list in the Animation Controls dialog box.

To use one Animation Controls dialog box for several objects, click the object in the Scene View and then click Set Caret on the Animation Controls dialog box. Check the title bar of the Animation Controls dialog box to make sure the correct object is selected.

RSTestStand.book Page 48 Friday, September 10, 2004 3:22 PM

Page 59: tstent-gr001_-en-p

6 • Creating 3D models

49

• • • • •

6 • Creating 3D models

Working with multiple assembliesYou can open multiple Animation Controls dialog boxes. This allows you to set up multiple assemblies to work with one another.

1. Select the assemblies and set up paths and frames as described above. Leave the Animation Controls dialog boxes open.

2. Use the yellow slider to place the animations at the locations where they need to be for correct operation of another assembly’s animation.

3. Record frames for the assemblies as needed.

4. Continue adjusting the yellow sliders for each assembly and recording actions as needed.

Connecting resource variables to animationYou create a 3D model to represent the behavior of the equipment you are simulating. To do this, you must connect the behaviors of the components and assemblies with the resource that the component or assembly represents. For example, the “Output” variable of a resource may represent the position of that resource along an axis of motion. For an animation to move according to how the resource is moving, you would connect the “Output” variable to the behavior of the assembly.

Components and assemblies can have variables connected to their animation attributes. In the Scenes list, these behaviors are listed under the Attributes folder of the animation object.

To connect image behavior to a resource variable:

1. Right-click an assembly or component.

RSTestStand.book Page 49 Friday, September 10, 2004 3:22 PM

Page 60: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

50

• •

• •

2. Select Object > Variable Controls. The Connect Resource Variables To Image Behavior dialog box is displayed.

Connect Variables to Image Behavior dialog box

3. Drag resource variables onto image behaviors or to the Path Selector.

If a variable is not connected to the Path Selector, the last path in the list will control the animation.

If there are multiple paths available for the same assembly, connect to the Path Selector. The value of the variable connected to the Path Selector determines which path is active during simulation. Paths are indexed, starting with 0, in the order in which they appear in the Connect Resource Variables To Image Behavior dialog box.

4. If you want to set the variable for all components of a parent assembly, select Parent Mode. Note that there will be only one path selector and it will be assigned to all children of the parent.

You can also open this dialog box by dragging a resource from the Project Model tree to a component or assembly on the Scenes tree or Scenes list.

You can display all of the components that belong to the original component together using Parent Mode. When in Parent Mode, only one set of additional behaviors are displayed. If a variable is connected to a behavior in Parent Mode, the variable is connected to this behavior for every component in the assembly.

Drag resource variables onto image behaviors

RSTestStand.book Page 50 Friday, September 10, 2004 3:22 PM

Page 61: tstent-gr001_-en-p

6 • Creating 3D models

51

• • • • •

6 • Creating 3D models

Importing animationsIn RSTestStand Enterprise, you can import graphic elements from certain 3D CAD packages. To import:

1. Select Import Model.

2. Select which .mgs file you want to use.

Working with scenesTo display the tree, select View > Scenes.

Double-click the icon for a Scene to display that scene in the Scene View. You can display multiple scenes. Use the Window menu on the menu bar to switch between them. Note that if the Scene View is not open, you cannot edit items in the Scene Tree.

During simulation, you can add Watch Windows to scene to monitor behaviors and the state of variables associated with a specific component or assembly. See “Placing a Watch Window on a resource, component, or assembly” on page 75.

The toolbar buttons for working with the Scene View are listed here and on the next page.

A file with the .mgs extension is not the CAD file itself but one that is generated by the plug-in to the CAD package.

Button Tool Description

Select Selects assemblies and components in the view.

Rotate Scene Rotates the view of the scene.

Pan Floor Pans along the floor. Click and drag the visible floor area to pan.

Vertical Pan Pans the view vertically.

Zoom Zooms in and out

Reset to Origin Resets the view to the original viewing location.

RSTestStand.book Page 51 Friday, September 10, 2004 3:22 PM

Page 62: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

52

• •

• •

You can also use hot keys to switch between navigational tools more quickly. Assign hot keys using Scenes > Preferences. To use a hot key, hold down the key assigned to a navigational tool and use the mouse as you normally would with this tool.

Zoom to Fit Moves and zooms to the assembly selected in the Animation Controls dialog box so that it best fits in the viewing area. If nothing is selected, all the assemblies are fit into the viewing area.

Walk Mode Changes the perspective of the view so that the point of view is the view target center.

Assembly Select Mode

Causes an assembly to be selected when any component of the assembly is selected. This allows you to manipulate all items in the assembly as a group.

Wireframe Renders all components in wire frame. This is the fastest rendering.

Shadows Renders components with shadows. Rendering will be slower than with wire frames.

Hide Selected Hides selected objects.

Show Hidden Shows all objects.

Button Tool Description

RSTestStand.book Page 52 Friday, September 10, 2004 3:22 PM

Page 63: tstent-gr001_-en-p

6 • Creating 3D models

53

• • • • •

6 • Creating 3D models

Additional right-click menu options for working with assemblies and components are described in the following table.

Right-click Object Menu Description

Watch Window During Simulation, opens a Watch Window for the object.

Animation Controls Opens the Animation Controls dialog box.

Variable Controls Opens the Connect Resource Variables To Image Behavior dialog box.

Hide Hides the selected object.

Auto Lightweight Items that are a defined distance from the point of view are rendered using a basic representation of the object. This speeds up rendering.

Lightweight Renders the selected object as its bounding box. This allows the system to draw the object with the fewest numbers of vertices, increasing rendering speed.

Show Paths Turns the show path options on or off.

Move To Floor Resets the object to Y=0.

Bring to Front Changes the order of objects so that the selected object is moved to the front of the view.

Send to Back Changes the order of objects so that the selected object is moved to the back of the view.

Locate in Scenes Window

Opens the path in the Scenes tree for the selected object and highlights it. The Scenes tree must be open.

Cut, Copy, Paste Standard cut, copy, and paste options for the selected object.

Save in Graphics Library

Saves the selected component or assembly to the Graphics Library so you can re-use the graphics object.

Remove Removes the selected object.

RSTestStand.book Page 53 Friday, September 10, 2004 3:22 PM

Page 64: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

54

• •

• •

Right-click Object Handles Menu Description

MoveRotateScale – AsymmetricScale – UniformMove Pivot

These options select the same action as the corresponding toolbar button.

Preferences Opens the Scene View Preferences dialog box.

Right-Click Navigation Menu Description

Pan FloorRotateSelectVertical PanZoomFit SelectedReset to OriginView Settings

Select the same action as the corresponding toolbar button.

View Settings Opens the Scene Properties dialog box.

RSTestStand.book Page 54 Friday, September 10, 2004 3:22 PM

Page 65: tstent-gr001_-en-p

6 • Creating 3D models

55

• • • • •

6 • Creating 3D models

Helpful hints for working with components and assembliesYou can work with either components or assemblies in the Scene View when the

Select tool, , is active.

To work with assemblies, click Assembly Select Mode, , then click the items. When Assembly Select Mode is on, any settings you make for the assembly will be set for all components of that assembly.

Whenever you select an object, the object’s Object Handles appear at the object’s pivot location. The Object Handles form the 3D axis (X,Y,Z) and the corners of a box. To use the object handles, click and drag with the mouse on either an axis handle or one of the box corners. When an axis is selected, editing takes place along the selected axis. When a box corner is selected, editing takes place along the two axes represented at that corner.

Objects often overlap. To make it easier to select objects that overlap on the screen, click the objects to toggle through all overlapping objects each time you click.

You can select multiple objects by holding down the Shift or Ctrl key while clicking objects. Note that only one object can be the caret for an Animation Controls dialog box at one time.

You can manually enter values for location, orientation, and style options for components and assemblies. Right-click a component or assembly and select Properties. See the online help for detail on the options in this dialog box.

The high fidelity graphics in the Sample folder of the Graphics Library have been imported from Solidworks using a plug-in module developed by Rockwell Software. You can import your own graphics from Solidworks using RSTestStand Enterprise, which include the plug-in module.

RSTestStand.book Page 55 Friday, September 10, 2004 3:22 PM

Page 66: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

56

• •

• •

RSTestStand.book Page 56 Friday, September 10, 2004 3:22 PM

Page 67: tstent-gr001_-en-p

57

7

7 • Using the Data Scope feature

Using the Data Scope featureThe Data Scope feature provides functions similar to a digital oscilloscope, allowing you to graph both Boolean and analog data values in a variety of formats. It gives you a dynamic view into your process by graphing multiple variables on the same timebase, or scale, with a high degree of accuracy. Timebases can be continuous, time periodic, or event periodic.

With the Data Scope, you can also do X-Y plots where the values on the X axis are selected to illustrate specific functional relationships. For example, you might want to see pressure as a function of position rather than time for systems that make decisions based on position information.

To use the data scope feature, you need to set up a data source and a view.

Setting up a data sourceYou can have either a simulation or high speed data source. A simulation data source allows you to use data that are generally available from the rest of the application, including live data from an OPC server such as RSLinx. A high-speed data source is a special connection to a ControlLogix-family controller that allows highly accurate sampling at up to 1 KHz (one sample per millisecond).

To set up a data source:

1. In the Project Model, open the Data Source folder.

2. Right-click the Data Source folder and select either New High Speed Data Source or New Simulation Data Source. The Data Source Properties dialog box is displayed.

To use the high speed data source, you must use RSLinx version 2.42.00 or above. It is also recommended that you use version 12 or better of the ControlLogix controller firmware.

RSTestStand.book Page 57 Friday, September 10, 2004 3:22 PM

Page 68: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

58

• •

• •

3. Type a Name for the data source. Names cannot contain spaces or special characters.

Data Source Properties dialog box

4. In the Sample Rate box, enter an update rate in milliseconds. This update rate will be common to all items created under this data source. Care should be taken in choosing update rates that affect system performance — including the ability of the target controller to properly control the process.

5. The Wrap Buffer option allows you to choose how the buffer wraps. If you:Select Wrap Buffer: The buffer continues to collect data when the buffer fills up, overwriting the oldest data.Clear Wrap Buffer: Data collection stops when the buffer is filled up.

The buffer clears every time the data source transitions from not running to running.6. Select the Items tab.

High speed data sources have restrictions on how many items can be entered at certain update rates. For every msec, eight items are allowed. For example, with an update rate of 4 msec, 32 items are allowed. Above 50 msec, an unlimited number of items is allowed. However, this check is performed only on a given data source. You can set up multiple data sources that exceed these values. Bypassing this check is not recommended.

The High Speed Data Source uses the Trend Object in the ControlLogix firmware. The Trend Object runs as the second highest priority task in the ControlLogix controller’s operating system (after the Motion Planner). If too many Trend Objects are configured, your application task’s bandwidth could be reduced and the control application could perform poorly. Keep this in mind if you are running RSLogix 5000 and Trend Objects in addition to RSTestStand Enterprise.

RSTestStand.book Page 58 Friday, September 10, 2004 3:22 PM

Page 69: tstent-gr001_-en-p

7 • Using the Data Scope feature

59

• • • • •

7 • Using the Data Scope feature

7. Click Add Item.8. Name the item.

9. Right-click on the Address field and select Pick Variable or Pick OPC Tag. Browse for the variable or tag.

10. Click OK.

11. Right-click the data source and select Validate Items.

Setting up a viewYou can select one of two views for your Data Source: Trace or Rule.

The Trace view is modeled on the functionality of a digital storage oscilloscope. By definition, all traces used in this view share a common timebase and therefore can be graphed on a common X axis. This allows you to compare the behavior of a variety of signals, whether they are analog or digital. You can change the timebase parameters (see online topic “Trace View Timebase”).

The Rule view is a unique presentation of action-reaction data so that you can easily see timing relationships and potential variations in them. The Rule view gives you a way of monitoring elapsed time between two events and, by reporting through a histogram, the historic variation in time as the events occur repetitively in a machine cycle. This information can be used for machine analysis and diagnostics.

Each view is defined primarily by its common timebase. You can organize a variety of different signals into a specific view, but each signal will be displayed by how the timebase draws or redraws the signal.

Once the views are configured, they can operate independently of the state of the simulation. In general, if your view data use the Simulation Source, you will want to slave the view off the Simulation states. Operation of each view type is covered independently. If your data source is the high speed data source, there is no interaction with the rest of the system and the view can operate separately from the state of the simulation.

Although the software will validate items after going into run mode, it typically takes 5 to 10 seconds during which time data can be lost, it is better to check them before running.

RSTestStand.book Page 59 Friday, September 10, 2004 3:22 PM

Page 70: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

60

• •

• •

Data sources are started and stopped automatically by the views. You can examine a data source while it is running by double-clicking the data source to bring up its Watch Window. Running data sources are bolded in the Project Tree.

Setting up a Trace ViewTo set up a Trace View:

1. In the Project Model, right-click the RTD Views folder.

2. Select New Trace View. The Trace View Setup dialog box is displayed.

Trace View Setup dialog box

Data, regardless of which type of Data Source generates the data, is timestamped in the system. If a High Speed Data Source is combined with a Simulation Source, and since a Simulation Source derives its clock from the Simulation time, it is possible that the presentation of the data in a single view could look like the high speed data is running considerably slower than you would expect. Views are updated at the rate of the slowest data source.

This might occur if the simulation is heavily burdened with graphics or a large tag count ( >2000 tags). It is good practice to use views that have similar data sources.

RSTestStand.book Page 60 Friday, September 10, 2004 3:22 PM

Page 71: tstent-gr001_-en-p

7 • Using the Data Scope feature

61

• • • • •

7 • Using the Data Scope feature

3. Type a name for the view.

4. Select the Time Control Data Source. The view synchronizes with this Data Source.

5. Select a Trigger. The options are:

Continuous: The view behaves like a strip chart recorder, displaying data moving across the screen. If you click Pause, you can examine historic data by scrolling or paging back.

Periodic: The view executes similar to an oscilloscope. By entering a number in the box (in milliseconds), you are telling the software to redraw the screen at a rate of 1/T. You can use this mode to determine the frequency of a repetitive waveform. You can dynamically adjust this value from the view itself by selecting the blue box at the bottom of the screen and moving it right or left until your signal stabilizes.

Event: The trace turns on and off based on evaluation of the expressions in the respective expression boxes. You must enter expressions that evaluate to true or false, as shown here:

As with other settings on this dialog box, this on and off control applies to all traces configured in the view.

Expression in Expr box evaluates: Trace in the display:

On Expr box evaluates false to true turns on

Off Expr box evaluates false to true turns off

On Expr box evaluates false to true (no entry in Off Expr box)

redraws

RSTestStand.book Page 61 Friday, September 10, 2004 3:22 PM

Page 72: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

62

• •

• •

6. Select the Traces tab.

The individual traces on a view represent the Y values on the graph. Traces can be digital or analog, and they can be combined on the same view by using partitions. The number of traces is limited by the effective viewing area of the screen.

Trace View Setup dialog box with Traces tab selected

7. Click New Partition and enter a name (spaces are not allowed). You must configure at least one partition to run a Trace view. The configuration of a partition sets up a common Y axis for the individual traces in a partition.

8. Select whether the data displayed in the partition will be digital or analog.

9. Analog only: Enter the Y axis range values and the increment size of the display.

RSTestStand.book Page 62 Friday, September 10, 2004 3:22 PM

Page 73: tstent-gr001_-en-p

7 • Using the Data Scope feature

63

• • • • •

7 • Using the Data Scope feature

10. Click New and enter a name (no spaces allowed). Each trace represents a signal or a combination of signals. You must configure at least one trace to have a graph display data on the view.

11. Right-click in the Expression box and select Pick Item. Browse for the signal from the items configured in your Data Sources. You can build an expression out of multiple items using standard operators, as long as the result evaluates to a number for an analog partition and to a Boolean for a digital expression.

12. Select the appropriate pen color.

13. You can modify pre-recorded Normal values or you can enter them manually by clicking Configure Normal Values. The values that are displayed are based on the timebase selections you have made for the view. Normal values are based on individual traces.

For additional detail about the options for the Trace View, see the online help.

Using the Trace View1. Double-click the view name in the Project Tree.

2. Start simulation.

3. Click .

Toolbar commands for the Trace view are described in the following table.

Once a data source is stopped and restarted, historic data are lost because the buffer is cleared. A data source will stop if all views that use that data source are closed or put in Stop mode. When data sources are running, their names in the project tree are in bold.

Icon Name Operation

Record Normal Records the Normal values for the selected trace. This option is

not available if Continuous is selected for the timebase. See “Recording normal values” on page 69.

Start from File Opens a file as the Data Source for the View.

Start Display Runs the view and starts the respective Data Sources.

Pause Display Pauses the view without shutting down the Data Source.

RSTestStand.book Page 63 Friday, September 10, 2004 3:22 PM

Page 74: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

64

• •

• •

Pause has a special function in Continuous mode: If you Pause while running a Trace view in Continuous mode, a slider will appear at the bottom of the screen and you can move the slider back to view historical data (as far back as the buffer allows.)

You can also view a Value Table to see Y values from a common scroll point on the X axis. Use the Value Table to examine relative data at a common point in time. To display the value table, right-click the view and select Show Value Table.

The Start/Stop With Simulation option allows you to slave the Run mode off the Simulation mode. This choice is active only when you are not running the view. Right-click the view to see this option.

You can adjust the X and Y axes while the Trace View is running by either bringing up the properties or by clicking in the bottom right or the upper left corner (when the hand cursor is visible).

In Periodic mode, you can adjust the timebase by sliding the blue button along the time axis, as shown here.

Periodic mode timebase adjustment

Moving the button lets you see dynamically the effect of changing the timebase. You can use this to visually calculate the size of the period of a time repetitive signal. Note that this option is not available if a variable value is used for the X axis values.

Stop Display Stops the View.

Value Table Displays the value table for the active Trace View.

Icon Name Operation

Timebase adjustment

RSTestStand.book Page 64 Friday, September 10, 2004 3:22 PM

Page 75: tstent-gr001_-en-p

7 • Using the Data Scope feature

65

• • • • •

7 • Using the Data Scope feature

Setting up a Rule View and HistogramWhen you set up a Rule View, you also set up the Histogram for the Rule View. The Histogram graphs the occurrence of an event in relation to its target time. The X axis of the Histogram is a display of the possible elapsed time of a given rule. The time domain is divided into intervals.

The values displayed on the Histogram are saved if you change from Run to Stop to Run. However, they are discarded when you close the project.

To set up a Rule View and Histogram:

1. In the Project Model, right-click the RTD Views folder.

2. Select New Rule View. The Rule View Properties dialog box is displayed.

Rule View Properties dialog box

3. Type in the name. Names cannot contain spaces.

4. In the Sample Rate MS box, enter a sample rate in milliseconds. Note that the Sample rate should not be any faster than the update rate of your data sources. Make sure the sample rate is long enough to catch the events of interest.

5. Enter the Screen Update rate. Most applications need an update that is faster than 100 to 200 milliseconds.

6. Select the Time Control Data Source.

Although there are individual histograms for each rule, these settings apply to the collection of rules in the Rule View. To set up an individual rule, see “Setting up individual rules” on page 66.

RSTestStand.book Page 65 Friday, September 10, 2004 3:22 PM

Page 76: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

66

• •

• •

7. Set the Histogram span. This is the total number of units that will be displayed in the Histogram.

8. Set the Histogram intervals. This is the number of intervals per unit span. The total number of intervals equals the Span value times the Interval value. For example, if you entered a span of 6, you will have three major units graphed from –3 to +3 around the zero marker. If you entered 2 for the interval field (2 per unit span), each major unit will be subdivided into two.

9. Click OK.

Setting up individual rulesA rule is a way of measuring and visualizing the time between an action and a reaction. You can use it monitor everything from the repeatability of a cylinder firing on a packaging line to cycle times on a milling machine.

To set up individual rules:

1. In the Project Model, double-click the Rule View to display the blank Rules page.

2. Click Create Rule from the toolbar. The Rule Properties dialog box is

displayed.

Rule Properties dialog box

3. Type in a name.

4. Right-click the Start Expression box and select Pick Items. You can build a Boolean expression by using different items and Boolean operators. The expression must evaluate to true or false.

5. Repeat the process for the Done Expression.

RSTestStand.book Page 66 Friday, September 10, 2004 3:22 PM

Page 77: tstent-gr001_-en-p

7 • Using the Data Scope feature

67

• • • • •

7 • Using the Data Scope feature

6. Enter a nominal Delay and Tolerance value in milliseconds. Tolerance is size of the window in which the target delay is centered.

7. Click OK.

Using the Rule ViewTo use the Rule View:1. Run the simulation.

2. Click to start the Rule View.

3. As soon as the next start event goes true, the Rule will update. You will notice that it turns red, indicating that the done event occurred outside the target window (which is originally set using the Rule property).

An individual rule provides you with the following information:

The rule target window. Click for Properties

Click for Histogram

Name

Iterations are the number of times the rule has executed since entering run mode.

The current time in the Rule. If 0, the Rule is waiting for the Start event. The time holds after the Done event and resets at the next Start event.

Previous is the outcome of the last rule.

The time delay ± the tolerance determines the rule’s target window

The address of the Start event is at the bottom left; the address of the Done event is at the bottom right.

RSTestStand.book Page 67 Friday, September 10, 2004 3:22 PM

Page 78: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

68

• •

• •

When the rule view is running, each rule waits for its Start event. Once a Start event occurs, the rule bar moves across the screen in green. It turns red and the rule is marked as over or under the target value if the rule Done event occurs outside the target window. Note that a double trigger (two or more Start events before the rule sees a Done event) aborts the rule. This is also captured on the Histogram dialog box.

Rule View while running

You can change the Rule target window by double-clicking the rule, which opens the Rule Property dialog box.

Toolbar commands for the Rule View are described in the following table.

Icon Name Operation

Create Rule Adds a new Rule to the view.

Remove Rule Deletes the selected Rule.

Record Normal Records the Normal values for the selected Rule. See

“Recording normal values” on page 69.

Start from File Opens a file as the Data Source for the View.

Run Rule View Runs the view and starts the respective Data Sources.

Pause Display Pauses the view without shutting down the Data Source.

Stop Display Stops the Rule View.

Rule bar when start event has occurred

Rule bar when Done event is outside the target window

RSTestStand.book Page 68 Friday, September 10, 2004 3:22 PM

Page 79: tstent-gr001_-en-p

7 • Using the Data Scope feature

69

• • • • •

7 • Using the Data Scope feature

Viewing a HistogramTo view a Histogram:

1. From the Rule View, click . A histogram of the timing distribution for previous occurrences of the rule is displayed. Each time of occurrence is mapped to the X axis.

Histogram window

2. Click Clear to clear the display.

The values displayed on the Histogram are kept until the project is closed.

Recording normal valuesThe Normal graph is an average value of each data point (as seen from the Trace or Rule View) taken over a number of iterations of the function being observed. If taken over a sufficiently large number of samples, the display of the normal graph gives you a diagnostic indicator of what is expected, and allows you to dynamically compare the “known good” with the current actual value. You control how many samples are taken by when you stop the recording process.

You can only record normals for periodic or event based views. You can record more than one normal at a time by repeating the process described below for a different trace.

To record normals:

1. Make sure the view is running.

2. Select the partition from which to record.

3. Select the trace or rule to record. Select traces from the list. Select a rule by clicking it, or select multiple rules using Shift+select.

RSTestStand.book Page 69 Friday, September 10, 2004 3:22 PM

Page 80: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

70

• •

• •

4. Click to start recording values.

Options when recording Normal values

The number of recorded observations is shown next to the trace or rule being recorded.

5. Click to stop recording. The normals are immediately displayed on the graph.

6. Click the button again after 10 cycles. A dialog box is displayed that asks you to either accept or modify the recorded values.

7. Once you accept them, they become the new values for the trace or rule.

Save Data to FileYou can save data to a file from the Trace View or Rule View. RSTestStand Enterprise does not automatically save data from the Data Scope views. You must do it manually. The buffer is cleared whenever the Data Source transitions from not running to running.

Save Data to File lets you save the contents of the buffer to a file for replay at some later time. It will not save the actual data stream simultaneous to viewing — to replay the data, you must save the view.

To save data to file:

1. Right-click the view (Rule or Trace).

2. Select Data to File.

3. Enter the start and end times for the data.

To turn the Normals on or off on the graph, right-click the graph and select or clear Show Normals.

Select the partition from which you want to record Select the trace to record

RSTestStand.book Page 70 Friday, September 10, 2004 3:22 PM

Page 81: tstent-gr001_-en-p

7 • Using the Data Scope feature

71

• • • • •

7 • Using the Data Scope feature

4. Select or create a file using the browse button. If you select an existing file, the data in the file will be overwritten. You can specify a new file name in the dialog box and the file will be created. The file uses the .dat extension.

To replay the data saved to a file, select Start from File, , on the toolbar. Once opened, you can run the file as if it is live data.

RSTestStand.book Page 71 Friday, September 10, 2004 3:22 PM

Page 82: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

72

• •

• •

RSTestStand.book Page 72 Friday, September 10, 2004 3:22 PM

Page 83: tstent-gr001_-en-p

73

8

8 • Simulation

SimulationSimulation allows you to test and verify your program’s behavior without having to connect your program to physical machinery of any kind.

The simulation model is a reactive system that responds primarily to external events to provide feedback to the originating system (typically your PLC). It also works in continuous time, allowing the system to use fixed time intervals as part of rate-of-change equations.

This chapter describes how to:

Start and interact with a simulation

Use output message windows to monitor the simulation

Export and import runtime simulation data

Starting a simulationOnce you have created a Project Model and made the appropriate variable connections, you can start simulating.

To start a simulation:

1. Select Start or Start Paused from the toolbar. (If you do not see these buttons, select View > Toolbar to display the toolbar.)

2. If you selected Start Paused, click Pause to toggle Pause off.

3. The Operator Console is displayed, the simulation clock in the status bar turns green, and your flowcharts start executing. The communication link becomes active and new data are acquired from the PLC and written back to it.

4. Use the Operator Console to activate the equipment.

5. Select Stop to stop the simulation.

There are sample applications provided in the directory Program Files > Rockwell Software > RSTestStand Enterprise > Sample Applications.

Using the Start Paused button is a good way to get RSTestStand Enterprise into simulation mode without starting the simulation clock. This allows you to force variable values, set up monitor windows, and position Op Consoles before the action begins.

RSTestStand.book Page 73 Friday, September 10, 2004 3:22 PM

Page 84: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

74

• •

• •

Simulation modes

Option Description

Start Pause Runs the current project without advancing any time on the simulation clock. This lets you position items on the screen such as Operator Consoles and Watch Windows that appear only when the simulation is in Run mode. You can also set up Force values before the simulation clock starts. Click Pause to run the simulation.

Start Runs the current project. Once a project is started:

The selected Operator Console appears as a floating window and can be positioned anywhere on the screen.

The animation changes to a 3D view and starts running.

All variables are initialized according to their Initial State.

The Output Window is displayed at the bottom of the screen and can be sized to fit your needs. It will display whatever you select on the tabs. You can use the Output Window to display and force variables.

The current simulation time is displayed in the status bar at the bottom right of the screen. This simulation time is elapsed time and represents the internal clock of your software and does not necessarily equal wall time.

Pause Freezes the simulation without changing any stored or executing value. Flowchart execution is stopped wherever it was in its execution cycle.

Clicking Pause again continues execution from where it left off.

Pause can also happen with the flowchart verb Halt. Clicking Pause will cause the simulation to start running again after a Halt command is encountered.

Stop Halts the simulation and restores all the windows that are open to their edit modes. It also resets the simulation clock and all part counters to their zero positions. On the next Start, all variables are reinitialized.

RSTestStand.book Page 74 Friday, September 10, 2004 3:22 PM

Page 85: tstent-gr001_-en-p

8 • Simulation

75

• • • • •

8 • Simulation

Interacting with a simulationRSTestStand Enterprise offers a variety of ways to interact with your model during simulation. You can:

Change OPC tags to affect the resources if your resources are connected to OPC tags via their variables.

Use the RSTestStand Enterprise operator consoles to affect your model and to receive feedback in the form of lights, strip charts, meters, and gauges.

Place a Watch Window on any type of resource or on any animation component or assembly.

Force variable values using Watch Windows.

Use 3D animated models of your simulations to provide valuable information for diagnosing potential problems in your program.

Use the Output Message Window.

Check the status bar for runtime information.

Placing a Watch Window on a resource, component, or assemblyThe Watch Window is a way to monitor and force the state of variables associated with a specific resource, component, or assembly. It shows you the variables for the item and their current values during simulation. For 3D animations, they also will display the behaviors. Multiple Watch Windows can be placed anywhere on the screen during simulation or for running 3D animation objects. You can right-click a Watch Window to configure the display. Watch Windows are only displayed while running the simulation.

Watch Windows also display the address of the OPC tag, if one is entered for the variable. If the tag is red, the address could not be created. The tag is also red if the “Is Using Server” flag is turned off. Note that it does not guarantee the health of the data. Data is only checked when going into run mode, not while the system is running.

Resource Watch Window

RSTestStand.book Page 75 Friday, September 10, 2004 3:22 PM

Page 86: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

76

• •

• •

Assembly Watch Window

Component Watch Window

To display a Watch Window:

1. Run the simulation.

2. Right-click the resource, component, or assembly you want to monitor from the Project Model, Operator Console, or Scene View.

3. Select Watch Window or Object > Watch Window from the menu.

4. To limit the number of variables displayed, right-click the title bar and select Add/Remove Variables.

To close a Watch Window, right-click the title bar and select Close.

You can also resize the Watch Window to display all or some of the variables.

Forcing resource variable valuesWatch Windows allow you to force the value of variables for resources. This is useful if you are trying to check out system response to error conditions or process upsets. For example, you might want to see what the diagnostic response is to a stuck level sensor. By selecting the level sensor variable in a tank resource and clicking the force box, control over the value of the variable is now entirely manual. You can enter new values or leave it as is.

To force the value of a variable, in the Watch Window, select the Force checkbox in the table of variables. The force is active in the simulation and the Forces box on the status bar turns red.

To select an assembly, make sure Assembly Select mode is selected first ( ).

RSTestStand.book Page 76 Friday, September 10, 2004 3:22 PM

Page 87: tstent-gr001_-en-p

8 • Simulation

77

• • • • •

8 • Simulation

If a variable is forced, the value that you enter in the Current Value field in the Watch Window will override any value coming from other parts of the Project Model. A change of value takes place when you exit the box you are typing in, either by pressing Enter or selecting a new field with the mouse.

To clear a force, do one of the following:

Clear the Force checkbox.

Right-click the Force status box on the status bar and select Clear All Forces.

Select Simulate > Clear All Forces from the menu.

Using the Output Message WindowThe Output Message Window gives you feedback from the running simulation about components that are not resource-based.

The Messages tab displays:

Normal operating status: Items such as “(Simulation clock time)” Simulation Started.

Error Codes: All error codes are fully described in the text of the window. In addition, if the error originated with the Visual Basic Script interpreter, RSTestStand Enterprise will highlight in red the source of the error in your flowchart as well as giving the location in the text. A typical error message will relate to the OPC subsystem and tell you an item cannot be created. This is a message that is being returned from RSLinx and means that the software cannot find the tag address that you specified in the Variables tab of the Resource properties. For more information on error messages, see “Output Window messages and error codes” on page 147.

OutputMsg: Text that originated from your flowchart application because you used the system-defined function OutputMsg.

The Parts tab allows you to view the type and change the number of parts at any location or mover. To view an item, select the location or mover in the diagram and click the Parts tab in the Output Message Window. To change the part count of the selected item to zero, click the Drop button.

Using the Image Variables button on the Output Message Window, you can display relevant data about an animation object and the state of things that are controlling it. From a connected, running animation:

1. Click Image Variables in the Output Message Window.

2. Click the animation object. You will see the animation behavior associated with that object. The remaining fields show which variable of a connected resource is controlling a given behavior and the state of that variable.

RSTestStand.book Page 77 Friday, September 10, 2004 3:22 PM

Page 88: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

78

• •

• •

You can use the Capabilities tab on the Output Message Window to monitor the progress of capabilities of a selected resource. To display a capability:

1. Click Capabilities.

2. Go to the Project Model tree and click a resource. If capabilities are used in that resource, you will see the name of the capability, its maximum value (or duration), the current value, and the percent done.

Hints for setting up and running simulationSizing Operator Consoles. The primary runtime windows will be one or more Operator Consoles. Typically, you will always want an Operator Console to be visible, regardless of what application is on top. We recommend that you size and position the Operator Console for optimal viewing while the simulation is running.

Turn off Float Window for multiple Operator Consoles. The default is for Operator Consoles to float. However, if you have multiple Operator Consoles, it might be useful to have only one float during simulation. To turn float off, right-click the green pointer in the upper left corner of the Operator Console and clear “Float Window when Simulating.”

Use Watch Windows. Watch Windows contain a list of variables of a resource and their current values. They only appear when running the simulation and can be sized and positioned according to your needs. To display a Watch Window, right-click a resource in the Project Model and select Watch Window.

Disable external communications. To disable the OPC scan during runtime, stop the simulation, right-click a resource, and select Communication Properties. Clear the Is Using Server box. If child resources are selected, you can selectively disable portions of the Project Model from a particular resource on down. To turn OPC communications on or off for an entire branch of the tree, select Update Children Resources.

Disable flowcharts for resources when debugging. Right-click in the flowchart window and select Disable Resource Flowchart. Disabling flowcharts allows you to isolate certain sections of logic by restricting what is being executed at any given time.

Reposition or close the Output Message Window. The Output Message Window is displayed at the bottom of the application when starting the simulation, but it can be detached, resized, moved, or closed at any time during the simulation. The window control buttons are in the upper left corner of the Output Message Window. To re-open an Output Message Window, select View > Output Window from the menu.

Reposition or close the Project Model and Library windows. You can detach, resize, move, or close the Project Model and Library windows. To re-open the Project Model, select View > Project Model. To re-open the Library window, select View > Library Palette.

RSTestStand.book Page 78 Friday, September 10, 2004 3:22 PM

Page 89: tstent-gr001_-en-p

8 • Simulation

79

• • • • •

8 • Simulation

Control the execution speed of an RSEmulate 5000 process. You can do this by setting up a controller in the RSTestStand Enterprise project tree. Once the system is properly configured, the Emulate processor will stay in sync with the RSTestStand application, including running, pausing, and running at a percentage of simulation time. See “Controlling the execution speed of multiple RSEmulate 5000 processors” on page 112.

Use Scan Once. This option allows you to closely monitor the evolution of your model by limiting the interpreter to a single scan and then pausing. Typically, Scan Once is used to debug the model so that you can follow the flowchart logic as control is moved from block to block. To use scan once:1. Click Pause to pause, or use Start Paused when starting the simulation.

2. Select Simulate > Scan Once. The Simulation scans once and returns to Pause mode.

3. Continue this procedure until you are satisfied with your results.

4. Click Pause again to return the simulation to Run mode.

Exporting and importing runtime simulation dataIf you are interested in events that take place in a simulation some time after the simulation is started, you can take a snapshot of your model during simulation. You can then restore the runtime data so that the simulation begins from the point at which the data was captured. This lets you run a model once, capture all its relevant data, including variable values and the simulation time clock, and start future runs from that point.

When you capture data, they are exported to a CSV file (comma separated variables, which is a Microsoft Excel compatible format) so you can also manipulate the data to create unique runtime scenarios.

The following data are exported. Each record has an identifier so that you can identify its function in the model.

P (Project name).

T (Simulation clock time in seconds). The value that is exported is accurate to a tenth of a second.

V (Variable Name). The long name that uniquely identifies it in the application. The value is exported as Unicode.

S (Script position). The first number identifies the flowchart in a resource. The second number identifies the block that was active at the time of the snapshot.

B (Basic values). This record type is used with two system-defined functions: Resource_Export and Resource_Import. Certain Standard Resources use them to save VBScript array variables so that you can accurately restart your model with array variables correctly populated.

RSTestStand.book Page 79 Friday, September 10, 2004 3:22 PM

Page 90: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

80

• •

• •

Exporting runtime simulation dataTo export runtime simulation data:

1. From a running simulation, click Pause to pause the simulation at the point at which you want to export.

2. Select Simulate > Export Simulation Data.

3. You are prompted to enter a file name to save this data. You can also select a previously created file.

4. Press Enter to export the data.

5. Release Pause to continue the simulation.

Importing runtime simulation data

To import runtime simulation data:

1. Select Simulate > Use Imported Simulation Data from the menu.

When this option is selected, the File Open dialog box is displayed every time you go into Run mode.

2. Select the appropriate file to import.

Once the data are imported, the simulation is placed in Pause mode. If an error is encountered during the import, RSTestStand Enterprise halts the simulation.

3. Click Pause to allow the software to run. The model will continue from the point of the imported simulation data.

Using the Run-Only optionWhen the application is final, the run-only option is ideal for creating training applications for the plant floor operator. The run-only file cannot be edited again and all edit features are blocked. To set up a project as run-only:

1. Select File > Save As.

2. Select RSM_RO from the list in the Save File dialog box.

A new file is created with a .rsm_ro file extension. This file cannot be edited again.

Opening the run-only file brings the application up in run mode.

The software does not compatibility check the imported data to the structure of the existing model. It discards any values that do not match a variable in an existing resource. If resources are added from the time of the snapshot, their variable values will be unchanged by the import.

RSTestStand.book Page 80 Friday, September 10, 2004 3:22 PM

Page 91: tstent-gr001_-en-p

81

9

9 • Flowchart Editor

Flowchart EditorThe Flowchart Editor provides a graphic interface for developing flowchart logic. The Flowchart Editor has six basic elements that you can assemble on a workspace.

Each resource and controller has a logic workspace you can open from a context menu. Each resource has only one logic workspace, but multiple flowcharts can be created in a given workspace.

This chapter tells you how to open the Flowchart Editor and provides descriptions of the Flowchart Editor elements. It allows tells you how to print a flowchart. For sample flowcharts, see the online help topic “Flow Chart Program examples.”

Opening the Flowchart EditorTo open the Flowchart Editor:1. Right-click a resource in the Project Model.2. Select Logic View to display the Flowchart Editor.3. Click an element icon from the Flowchart Editor toolbar. The cursor changes to a

cross-hair.4. Click in the logic workspace to place one or more of the items.

Each of the boxes is created with a default value that can be edited. Note that you cannot edit the End Block element. A sample flowchart is shown here.

Sample Flowchart in the Flowchart Editor

RSTestStand.book Page 81 Friday, September 10, 2004 3:22 PM

Page 92: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

82

• •

• •

You can select and copy boxes and entire charts to replicate operations.

All variables that are defined through the resource properties, or are defined using the Local VBScript Module, are scoped locally. To use a variable from another resource:

1. Right-click the resource on the flowchart.

2. Select Pick Variable.

3. Click Global. The variable will be inserted with its full path name.

Flowchart Editor elementsThe Flowchart Editor elements are:

Start Block

Decision Block

Process Block

End Block

Comment Block

Local VBScript Module Block

You can understand in detail the behavior of a resource by examining its resource logic and reviewing the comments included on the logic workspace.

Resources can be saved and reused by creating your own libraries. See “Creating your own library” on page 94.

Start Block

Contains a condition expression that must be able to be evaluated as True or False. If the statement evaluates to True, the rest of the chart is scanned. Every scan evaluates the next block until an End statement is encountered and control is returned to the Start Block. The default expression of the Start Block is True, which means that the rest of the chart will be continuously evaluated. The MoveLinear function depends on correct use of the Start Block.

Dimensioning arrays is not directly supported in the flowchart process block. However, you can dimension an array in a Local VBScript Module. Array variables then can be freely used in the local flowchart.

RSTestStand.book Page 82 Friday, September 10, 2004 3:22 PM

Page 93: tstent-gr001_-en-p

9 • Flowchart Editor

83

• • • • •

9 • Flowchart Editor

Decision Block

Contains a condition expression with two exit points — one for the statement evaluating True, the other for the statement evaluating False. You use Decision Blocks to test variable values in your program. As with any other VBScript condition expressions, you can build compound expressions using Boolean operators.

You can loop either a No branch or Yes branch back to the block by clicking once inside the block and a second time inside the block while using the connection tool. The effect of this construction is to block the evolution of the flowchart until the expression inside the Decision block evaluates to either True or False (depending on whether you use a Yes or No loop).

Process Block

Holds the statements of the program. Any allowable VBScript statement can be executed in a Process Block. You can choose to have it contain as many lines of program code as you wish. For example, you might create your own For … Next loop to iterate on a variable, or embed a conditional statement such as If … Then … Else.

Remember that the flowchart controls program flow and Process Blocks only get executed based on the logic of the flowchart. For example, if you indicate that ProxSwitch101= True, the value will stay True until you say ProxSwitch101=False. You can also change the value by:

linking an external variable to the value using OPC

setting the initial value through the Variable property configuration

controlling the value by forcing it using Watch Windows

Do not use iterative loops to block evolution of the flowcharts. Doing so blocks the simulation thread, and overall performance will decline dramatically. Instead, use either Invoke or WaitUntil. Invoke blocks the flowchart for the time specified by the referenced capability, and WaitUntil blocks for the time based on an expression evaluating to True.

RSTestStand.book Page 83 Friday, September 10, 2004 3:22 PM

Page 94: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

84

• •

• •

To add variables to a process block:

1. Right-click the expression field of the box.

2. Select Pick Variables.

A hierarchical tree appears that displays variables for the current resource and all its children.

3. Select a variable from the tree to copy it into the expression field.

To add capabilities to a process block:

1. Right-click the expression field.

2. Select Pick Capabilities.

End Block

Automatically loops control back to the Start Block. There is no user entry for an End Block (it cannot be edited).

Comment Block

Lets you enter comments on the flowchart workspace. There is a limit of 255 characters per comment. There are no restrictions on the character types. You can use as many Comment Blocks as you need.

There is no syntax checking at this point so be careful that the correct syntax is maintained on the paste action. Variables that have spaces in them will automatically be bracketed by quote-marks.

RSTestStand.book Page 84 Friday, September 10, 2004 3:22 PM

Page 95: tstent-gr001_-en-p

9 • Flowchart Editor

85

• • • • •

9 • Flowchart Editor

Local VBScript Module Block

Lets you build subroutines and functions that are locally scoped to the resource in which you are working. This is particularly useful if you intend to place that resource in a library and reuse multiple copies of it in your application. Because each copy of the resource maintains its own local variables, the subroutine or function you wrote will not interfere with others in the system, even though they use the same names as instances of the same parent. It is also useful to declare VBScript variables in a Local VBScript Module, especially declaring arrays using a DIM statement. You will also need to declare variables that are set as objects.

For an example of a Local VBScript Module, see the Excel Data Example resource in the StdResources Library (under Wave Form Generators).

Connection Tool

Connects blocks. After your blocks are entered on the workspace, click the Connection Tool to connect them. Click the first point and drag the line to the next point. You can select and copy boxes and entire charts to replicate operations.

Visual Basic Script operator syntaxThe following table provides some of the commonly used Visual Basic Script Operator Syntax. For a detailed list of operators and other elements, see the Microsoft Visual Basic Script reference guide (available from Microsoft). See also “System procedures for the Flowchart Editor” on page 153 for a list of additional functions available in RSTestStand Enterprise.

Common compare and arithmetic operators

+ Addition <> Not Equal

– Subtraction < Less Than

* Multiplication > Greater Than

/ Division <= Less Than or Equal To

^ Exponentiation >= Greater Than or Equal To

= Equal & String Concatenation

RSTestStand.book Page 85 Friday, September 10, 2004 3:22 PM

Page 96: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

86

• •

• •

Printing a flowchart1. Right-click anywhere on flowchart.

2. Select Print Flowchart from the context menu. The flowchart of the current resource prints.

Logical operators

AND

OR

NOT

XOR

EQV (Logical equivalence)

IMP (Logical implication)

Print Preview shows more pages than your flowchart printout will actually use. The print operation does not print blank pages.

RSTestStand.book Page 86 Friday, September 10, 2004 3:22 PM

Page 97: tstent-gr001_-en-p

87

10

10 • Connection Diagrams

Connection DiagramsConnection Diagrams provide another method for looking at resources and how they work. They emphasize the data flow of an application rather than the hierarchic structure of the Project Model tree. They allow you to see the relationships among different resources during editing and runtime.

You can place Connection Diagrams any place in the Project Model tree. The contents are not limited by where it is placed, although you should place a Connection Diagram where you might have a high degree of interaction among a group of resources. Connection Diagrams can act as documentation of the behavior of a set of resources.

This chapter describes how to create a Connection Diagram, add resources to it, and print it, and describes the options on the Connection Diagrams palette and context menu.

Creating a Connection DiagramTo create a Connection Diagram:

1. Select any place in the project tree.

2. Right-click the resource or folder and select New Connection Diagram.

A Connection Diagram is inserted immediately after, and as a child to, the resource or folder that you originally selected.

Connection Diagrams can be removed or renamed in the same way as other items in the Project Model tree.

Adding resources to a Connection DiagramYou add resources to a Connection Diagram by selecting a resource, then dragging it onto the Connection Diagram. Any resource that is already connected to the one that has been added is also automatically inserted into the view.

When a resource is dragged into the Connection Diagram, its variables are automatically displayed in the block. During runtime, the Connection Diagram displays the current value of the variable. If you do not want to see the variables, click the close icon in the upper left corner of the resource in the Connection Diagram.

Double-click the resource in the Connection Diagram to display the Resource Property dialog box.

Any time a resource is removed from the Connection Diagram, all resources that are connected to it are also removed from the Connection Diagram. Removing a resource from a Connection Diagram does not delete the resource from the Project Model tree.

RSTestStand.book Page 87 Friday, September 10, 2004 3:22 PM

Page 98: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

88

• •

• •

OPC tag connectionsOPC tag connections is a separate box on the Connection Diagram. It displays the relationship between a variable and the OPC tag address for the variable. If a tag address has been selected for a variable, the OPC address is added to the box and a line is drawn between the address and its resource variable.

Only variables marked public are displayed in the resource box.

Printing a Connection DiagramTo print a Connection Diagram:

1. Select the print icon from the Connection Diagram toolbar.

2. Follow the standard print dialog box.

The connection diagram will automatically paginate according to the size of the diagram. The printed copy will print as it appears on your screen.

Connection Diagram paletteThe Connection Diagram Palette contains tools for working with Connections Diagrams. All choices on the palette apply to every resource in a particular Connection Diagram. There are two tabs on the palette: Options and Variables.

Options tabThe choices on the Options tab are described in the following table.

Option Description

Insert Child Resources Automatically

When selected, copies any child resources of the one just added into the Connection Diagram view. See Encapsulate Children, below.

Show Connected Variables

Displays only connected variables. This is useful during runtime.

Show Only Marked Variables

Displays only marked variables so you can customize your application view at runtime. Marked variables are displayed in blue. To mark a variable, right-click the variable and select Mark Variable.

Hide OPC Tag Connections

Hides the connection lines between resources and the OPC Tag box.

RSTestStand.book Page 88 Friday, September 10, 2004 3:22 PM

Page 99: tstent-gr001_-en-p

10 • Connection Diagrams

89

• • • • •

10 • Connection Diagrams

Connecting variablesThe Variables tab provides another way to connect a variable to another variable. To connect a variable:

1. Select the Variable tab.

2. Select a variable in a resource.

3. Expand the variable browser tree to find your connection target.

4. Select the check box. A line appears between the selected variable and its target. If the target variable and its parent resource were not originally on the Connection Diagram view, they will now appear.

Hide Resource Connections

Hides the connection lines between resources, but leaves the connection lines to the OPC tag box.

Encapsulate Children Makes the parent resource and any child resources look like a single resource, with a single list of variables. Variables that belong to a child are shown with their path names.

Show Variable Values Displays the actual value of a variable during runtime.

Option Description

RSTestStand.book Page 89 Friday, September 10, 2004 3:22 PM

Page 100: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

90

• •

• •

Connection Diagram context menuWhen you select a resource and right-click, a context menu is displayed. This menu relates only to the selected resource. For certain operations, choices made from the context menu will override the choices made from the Connection Diagram Palette. For operations that involve a specific variable, the selected variable’s text will be in red type.

Context menu options are described in the following table.

Option Description

Show Variable Only the variable values for that resource are shown.

Mark All Variables Marks all the variables for that resource only. Once marked, they will be displayed in the list regardless of other settings.

Communications Displays the Communications dialog box, which can also be accessed from the Resource Property dialog box. It allows you to selectively disable OPC tag connections for troubleshooting purposes. Clear “Is Using Server” to turn off communications to that resource.

Sort Ascending

Sort Descending

Sorts the variable list alphabetically. The list is only sorted locally. It does not change the order in the resource property dialog box.

Bring to Front

Send to Back

Layout commands.

Remove Item Removes the selected resource and all connect items from the Connection Diagram view. It does not delete the resource from the Project Model tree.

Mark Variable Turns the text of the selected variable blue and puts its visibility under the control of the palette selection for marked variables.

Disconnect Variable Removes connections from the selected variable. If there is more than one connection, it will bring up a dialog box asking you which ones to disconnect.

Connect Variable to OPC tag

Displays the OPC tag browser.

Logic View Displays the selected resources’s flowchart.

Watch Window Displays the selected variable’s Watch Window.

Properties Displays the selected resource’s property dialog box. This dialog box is also displayed when you double-click a resource.

RSTestStand.book Page 90 Friday, September 10, 2004 3:22 PM

Page 101: tstent-gr001_-en-p

91

11

11 • Creating and using libraries

Creating and using librariesRSTestStand Enterprise Libraries provide you with a method of saving elements to and reusing elements from your Project Model.

Libraries are displayed in the library palette, which contains two tabs: Standard Resources and Graphics. The Standard Resource tab contains reusable elements that can be dropped into your project tree. The Graphics tab contains reusable elements that can be dropped into your Scene window. User libraries are in the Standard Resources tab.

The libraries that are distributed with RSTestStand Enterprise are:

Standard Resource library

Op Console Devices library

Graphic Library

This chapter describes the libraries and tells you how to:

Create a user-defined library

Add and remove a resource definition

Parameterize a library resource definition

Use a library resource definition

Attach and detach a library to your Project Model

Save a library file

Updates to a library do not update or change the element configurations in a Project Model. When a library element is used in a project, it no longer has any relationship to the source library.

RSTestStand.book Page 91 Friday, September 10, 2004 3:22 PM

Page 102: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

92

• •

• •

Standard Resource libraryThe standard Resource Library contains a flexible set of library elements you can use to develop your project. It is made up of resources that are useful starting points in building your application. You cannot modify the data for the resource definitions in the Standard Resource library. However, you can create instances of them, modify them, and save them to your own library. See the online help for detail on the items available in this library.

Typically, resources contain behavior in the form of flowcharts and variable definitions, internal connections, and initial values. These resources can be hierarchic — that is, you can build and save a resource made up of a parent and any number of child resources. Connections between a parent resource and its children are preserved in the Resource Library, which lets you build complex reusable elements out of much simpler ones.

Each element represents some physical behavior that you might want to control. Typically they provide an output back to the PLC based on some control input. The output is influenced by factors that you configure when you drag the element into the project tree.

The standard Resource Library is on the ResourceLibs tab of the Library Palette window.

Resource Library files use the extension .rsl and can be networked to a file server.

Op Console Devices libraryThe elements in the Op Console library are made up of devices that have a combination of behaviors. Most have special graphics that execute only in the RSTestStand Enterprise environment and some control behavior. When an element is dragged into your project tree, its drop target must be an Op Console. When it appears on the Op Console, there is a set of variables that is created at the same time. These variables relate to the behavior of the device. You can interact with these variables by connecting them to other devices or to your controller through an OPC link.

The behavior of an Op Console device can be modified by writing your own flowchart and adding additional variables to the device.

The Op Console Library is on the ResourceLibs tab of the Library Palette window.

Graphics LibraryThe Graphics Library is a collection of assemblies, their components, and textures for use in RSTestStand Enterprise scenes. The Graphics Library is in the same docking dialog box as the Resource Library. Click GraphicsLib to open the Graphics Library.

RSTestStand.book Page 92 Friday, September 10, 2004 3:22 PM

Page 103: tstent-gr001_-en-p

11 • Creating and using libraries

93

• • • • •

11 • Creating and using libraries

The main components of the Graphics Library are the Graphics Library and the Project Library. The Graphics Library is a collection of items that can be used in scenes (Assemblies, Components, and Textures). It exists as a file (GraphicsLib.glb) on the computer in the folder where the application is installed. This area is designated by the Graphics Library item in the Graphics Library tree — everything that exists in the Graphics Library is a child of this item. The Graphics Library is a container for graphic elements that exist on the computer you are working on. The Graphics Library contents are independent of any specific project. If you transfer a project to a different user on a different computer, and that user wants to reuse graphic elements from the project, these elements can be moved from the Project Library to the Graphics Library. When this happens, they become available to be put into other projects on the new machine.

The Project Library is a container for all animation objects used in a given project. When a new project is created, a new folder in the Graphics Library is created with the name of the project. This folder will contain all Graphics Library items that are inserted into the scenes for this project. Changes to these items affect only the item in the project, not the original. You cannot add items directly to the Project Graphics Library — its primary purpose is to allow you to share projects without concern for where a graphic lives. Project Library items can be imported into the Graphics Library and then reused in other applications. Items that have been inserted in the Project Graphics Library but are no longer referenced are removed from the Project Graphics Library when you save the project.

Items that can be in the Graphics Library include:

Folders: There are several standard folders. The Graphics Library and the Project Graphics Library include an Assemblies and Textures folder. You can create sub folders that exist as children of the Graphics Library’s Assemblies and Textures folder.

Components: An object that can be inserted into a scene. Components can have parent/child relationships, animations, and attributes such as position, rotation, scale, color, and texture. Components can exist at the root level of the Graphics Library (they do not need to be associated with an assembly). There are several standard components that come with RSTestStand Enterprise. These items (box, cylinder, and so on) cannot be deleted from the graphics library.

Assemblies: Collections of components. Assemblies can have attributes such as position, rotation, scale, and pivot, but do not have color or texture. The “New Assembly” item can be inserted into a scene. You can then group components (as well as other assemblies) beneath it to create custom assemblies.

Textures: Images that can be used to add color and texture to a component.

You cannot directly manipulate items in the Project Graphics Library. It is a visual aid to show you which components and assemblies are being used in your project.

RSTestStand.book Page 93 Friday, September 10, 2004 3:22 PM

Page 104: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

94

• •

• •

The commands that can be used in the Graphics Library include the options shown in this table. Right-click in the Graphics Library to access these options.

Creating your own libraryYou can create your own libraries and attach them to your project. Building a set of libraries lets you distribute work that you have done for one project to other projects and other developers.

User Resource Library files use the extension .rsl and can be networked to a file server.

Connections between a parent resource and its children are preserved in the library, which lets you build complex reusable elements out of much simpler ones.

Command Description

Import to Graphics Library > Import Textures

Imports image files that can be used as textures for components and operator console wallpaper. Allowed formats for textures are bmp, jpg, and tga. Only bmp files can be used for Operator Console wallpaper.

Import From Project Imports Graphics Library items from a Project Library to the general Graphics Library. It makes an exact copy of the item in the project library. Only objects that do not exist in the general Graphics Library can be imported. You can select which elements from the project library you wish to import.

Note: If no items are available to import, it is because all the elements in the Project Library already exist in the Graphics Library.

New Folder Creates a new folder in the Graphics Library area. If the cursor is in the Assemblies area, a new folder for assemblies and components is created. If the menu is invoked in the Textures area, a new menu for textures is created.

Rename Renames an item in the Graphics Library. Items in the project Graphic Library and some other items (such as the standard folders) cannot be renamed.

Remove Removes the selected item from the Graphics Library area. Note that items cannot be deleted from the Project Graphics Library.

Properties Opens the properties dialog box for the selected item.

RSTestStand.book Page 94 Friday, September 10, 2004 3:22 PM

Page 105: tstent-gr001_-en-p

11 • Creating and using libraries

95

• • • • •

11 • Creating and using libraries

The Multiple Instantiation feature greatly increases the flexibility of your libraries by allowing you to have a single parent and a user-requested number of children (including zero). By developing library elements that take advantage of this feature, you can selectively add and remove features when you build your project.

To create a library:

1. Select Library > Create from the main menu.

2. Enter a name for your Library using standard Windows naming conventions. You can also go to different directory, including a network-based directory.

3. Click OK. The new Library is placed in the Resource Libraries window.

Adding a resource definition to a Resource LibraryTo add a resource definition to a Resource Library, the library must first be attached to a project.

To add a new resource definition to a Resource Library:

1. Right-click a resource in the Project Model. RSTestStand Enterprise assumes you mean the selected resource and all its child resources. It copies the parent and children into the library and preserves all the information in those resources, except for the variable connections made outside the parent and its child resources. OPC tag information is preserved.

Entire Operator Consoles can also be saved to a library.

2. Select Save to Library from the menu. The Save Resource as Resource Definition dialog box is displayed.

3. Type the name and select the library that you want to save the resource definition to.

4. Click OK.

If you use Multiple Instantiation to create an Operator Console from a library, right-click the Operator Console and select Auto Arrange to lay out the various devices.

You can drag a resource directly from the Project Model tree to the resource library where you want it saved. The cursor will change to a + when it is over a legitimate drop target.

RSTestStand.book Page 95 Friday, September 10, 2004 3:22 PM

Page 106: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

96

• •

• •

Parameterizing your library resource definitionsRSTestStand Enterprise provides a means to parameterize your resource libraries. Parameterizing is the process of making resources generic enough to be used as library items. It allows you and other users to create flexible library elements, so that you define a resource once for use in multiple applications. An example of a parameterized library is provided in the Resource Library folder in the library Example Library.rsl.

When you use a parameterized library resource definition in your Project Model, an initialization, or user input, dialog box is displayed. This dialog box can:

Request information, including initial values of selected variables or capabilities and text substitution for your OPC tag names

Walk you through the configuration

Rename the resource if you choose to initialize variables or capabilities

Provide text that gives the Resource Library user some guidance

Provide a wizard-like interface to lead users through the settings (if multiple tabs have been configured)

Once the Resource Definitions dialog box is completed for a resource, any time you drag a library element from your library, the initialization dialog box will appear and walk you through the configuration.

To create a user input, or initialization, dialog box:

1. Select an element in the Resource Library and right-click.

2. Select Definition Properties from the menu.

3. To add a description or instructions to the User Input dialog box, select Attributes and fill in the Description box. The description box is limited to 250 characters.

4. The Resource Definition Category selects the icon that appears with the resource in the Resource Library. The options and corresponding icons are:

5. You can select the prompt to create multiple copies. When selected, the initialization dialog box first asks how many copies of this element to make.

6. On the Variables tab, select the variables that should appear on the User Input dialog box as initialized variables when this resource is dragged to the Project Model tree.

Generic Mechanical Continuous Process

Structural Control

RSTestStand.book Page 96 Friday, September 10, 2004 3:22 PM

Page 107: tstent-gr001_-en-p

11 • Creating and using libraries

97

• • • • •

11 • Creating and using libraries

7. To create a wild card substitution for portions of an OPC address, enclose portions of the OPC tag address with < >. You will be prompted to replace the enclosed string with a new one when this resource is dragged to the Project Model tree. This allows you to map resources to program structures in your control program. You can use multiple wild cards in an OPC address.

8. You can initialize the duration of the Capability to change the timing behavior of the library element when you instantiate the library element. Click the Capabilities tab. Select the Initialize box for the Capability that you want to appear on the initialization dialog box.

Removing a resource definition from a libraryYou can only remove top-most elements from the Resource Library tree and their associated children. You cannot remove child elements.

To remove a resource definition from a Resource Library:

1. In the Library window, right-click the parent resource definition you want to remove.

2. Choose Remove Definition from the menu.

3. A confirmation message is displayed. Click OK.

If you do use the wild card substitution, select the “Is Using Server” check box in the Resource Properties Attributes tab for the library element.

Look in the Resource Library folder for an example of the OPC tag substitution.

You can also manually enter a function in the resource. Note that the Function Picker is not available through the resource.

RSTestStand.book Page 97 Friday, September 10, 2004 3:22 PM

Page 108: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

98

• •

• •

Using a library resource definitionTo use an existing library resource definition:

1. Select the resource definition in the Resource Library window.

2. Drag the resource definition into the Project Model window.

3. Some of the individual resource definitions may prompt you to enter initial values. You can change the values as needed. When changes are complete, or to accept the initial values, click OK.

4. You may be prompted to substitute part of an OPC tag address with a structure name.

Attaching or detaching a libraryWhen a library is opened for a project, the project remembers that a given library was attached and reopens the same library the next time you open the project. If a library is moved to a different directory, you will have to use the browse button to locate and open the library.

Attaching a Resource Library to a projectTo attach a library to a project:

1. Open a project.

2. Select Library > Attach Library from the menu.

3. Select the library that you want to attach to from the file dialog box. After you select the library, it appears in the library window.

Detaching a Resource Library from a projectTo detach a library from a project, select Library > Detach Library from the Library menu. There is no dependency on the library at runtime, so when you use a resource definition from the library, you can detach the library without affecting the simulation.

Saving a library fileTo update or save an .rsl file, select Library > Save Library from the menu.

When you close your project, you are prompted to save any changes you have made.

You can merge library elements with target resources in the tree. To do this, hold down the Ctrl key as you drag. All behavior (variables, capabilities, and logic) in the target is replaced by the dragged element. The name and position in the tree of the target is kept. This feature is useful if you have imported a “skeleton” tree from a bill of materials and you want to quickly populate it with behavior.

RSTestStand.book Page 98 Friday, September 10, 2004 3:22 PM

Page 109: tstent-gr001_-en-p

11 • Creating and using libraries

99

• • • • •

11 • Creating and using libraries

RSTestStand.book Page 99 Friday, September 10, 2004 3:22 PM

Page 110: tstent-gr001_-en-p

99

12

12 • Part flow models

Part flow modelsThe part flow model provides realistic feedback to the control system for part-in-place detection. Since most discrete applications depend on the detection of a part for the initiation of their work sequence, the modeling of a full-scale process requires a way of providing that type of feedback.

The part flow model is also useful for conceptualizing the initial control system design, where different types of resources work together to accomplish some task. These resources can be coordinated at a high level through the use of the Controller model, or they can be controlled directly through external connections to PLCs or other devices.

This chapter describes the part flow model and tells you how to:

Create a part flow modelLay out a part flow model diagramAdd behaviorControl the action using capabilitiesRun the part flow model

Descriptions of the part flow objects are described at the end of this chapter.

About the part flow modelThe primary paradigm used in the part flow model is that of a resource doing some type of work. Similar to the real world, the ability of a resource to do certain tasks is defined by its capabilities. Therefore, all actions in the part flow model are controlled by the capabilities defined and programmed in a resource.

A resource is bound to a particular location or mover by dragging it to the object where you want to apply control. Once it is there, a dialog box asks you to select which capability of the resource will do the work and what actions you want the resource to do. From these selections, a sentence is constructed that reflects your choices: resource, action, and part are bound together to perform some task.

Any object other than a Generator or Disposer has an action that occurs at it. The configuration of an object results in an explicit sentence being built on the Binding tab of the Property dialog box. The sentence conforms to the following syntax:

Resource’s capability — Action — on Part — at (or from-to) Object

For example, once a Mover is fully configured, the sentence might read:

Operator “Carry” — Move — Piston Ring — from Bin to Conveyor_Loc_0

RSTestStand.book Page 99 Friday, September 10, 2004 3:22 PM

Page 111: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

100

• •

• •

The action that you bind to a Mover or Location is invoked by the capability moving from 0 to 100. For example, a Mover that has a resource such as an Operator bound to it might have a capability called Carry. Carry has a duration, which is the defined time it takes to go from 0 to 100. If the Operator flowchart runs Invoke (“Carry”) with a duration of 10 seconds, the part will:

Leave the source location as soon as the capability leaves 0Be in transit for 10 seconds when it arrives at the destination location and the capability is 100

Other actions test for capabilities in the same way. The boundaries of the upper and lower values are adjustable as setpoints in the user interface.

You can have multiple part flow models, each launched from a folder. A folder can contain only one model, although there can be as many models as there are folders in the Project Model window.

Creating a part flow modelTo initiate a part flow model:

1. Right-click a folder and select Part Flow View.

2. The Part Flow Model Editor becomes the active view.

Laying out a part flow model diagramOnce you have opened the Part Flow Model Editor, you can click and place the various objects anywhere on the diagram. Double-click an object to display its properties dialog box. Certain types of objects will have actions embedded in them.

When laying out a diagram:

There must be at least one Part Generator on the diagram.

When you are adding objects to the Part Flow View, the folder icon changes to a “P” to indicate an active Part Flow diagram.

Although a Mover can hand off a part to another Mover, parts cannot change locations without an intervening Mover or Multiplexer.

Parts can be sensed at Movers, Locations, Conveyors, and Buffers. Parts cannot be sensed at Multiplexers.

You can create part names from any dialog box on the part flow diagram. Typically, you will create your first part name when you lay out your Part Generator. Double-click the Generator to bring up the dialog box.

RSTestStand.book Page 100 Friday, September 10, 2004 3:22 PM

Page 112: tstent-gr001_-en-p

12 • Part flow models

101

• • • • •

12 • Part flow models

The Connection Tool ( ) links objects together. It is directional — you need to drag from the source object and to the target object. After clicking the tool, the cursor changes to +, meaning you are in connection mode. Once you are over a legitimate area to connect, the cursor changes to a circle. Click the source once and click again over the destination. Your flow direction is indicated by an arrowhead.

You can see a list of parts in the system by right-clicking any free space on the diagram and selecting Part List. Parts are global to all diagrams in the application.

“Any” part allows the part presence sense function to return a True whenever any type of part is present at the location specified.

Adding behavior to the diagramTo add behavior to the diagram, drag a resource from the Project Model tree onto the appropriate object.

A dialog box is displayed. The tabs on the dialog box are:

Attributes: Allow you to enter a description of the process.

Bindings: Create and display the relationship of the resource and its capabilities to actions to parts.

Depending on the object, you will get a different selection of possible actions. The Part Info tab appears on Locations but not Movers and displays a summary of actions associated with merges and splits at that location.

Part Flow Properties dialog box with Select Parts dialog box

RSTestStand.book Page 101 Friday, September 10, 2004 3:22 PM

Page 113: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

102

• •

• •

Once an action is selected as part of the binding process, the Select Parts dialog box is displayed and asks you which part to bind the action to. If you are merging or splitting, you can either use an existing part name to identify the output of the action or you can create a new part name or names.

Each new action requires a previously unbound capability. A resource can have many capabilities, and can be bound to different (or the same) locations, but only one action is allowed per capability at that location. The binding tab shows what capabilities are present for a particular resource, and what actions (and where) have already been bound to the set of capabilities.

After you close the dialog box, you can reopen it by double-clicking the location. The Bindings tab identifies the various actions you have previously selected.

Controlling the action using capabilities and set pointsActions are completed when the capability that the actions are bound to reach the set point of those actions. Capabilities always run from 0 to 100 (percent). They have to be controlled from your flowchart logic and must be reset to 0 if they are to be used again.

The value of the capability can be manipulated one of three ways:

MoveLinear: Can be interrupted.

Invoke: Must run to completion.

Position: Can arbitrarily set a value into a capability.

One of these procedures must be present in the flowchart of the associated resource for parts to move in the model. See “System procedures for the Flowchart Editor” on page 153 for procedure descriptions.

Set points can be modified by right-clicking the bindings sentence when the Part Location or Mover dialog box is displayed. The low set point determines when the part is released from its source. The high set point determines when the part arrives at its destination.

Although most applications will execute properly with the set points at their default values (0 and 100), you may need to modify them based on timing considerations.

Each capability has a duration, assigned from the resource property dialog box. The duration can either be a constant (a fixed number in seconds) or an expression. The Function Picker lets you select different types of distributions that VBS supports.

You can bind the same resource’s capability at different locations.

RSTestStand.book Page 102 Friday, September 10, 2004 3:22 PM

Page 114: tstent-gr001_-en-p

12 • Part flow models

103

• • • • •

12 • Part flow models

Running the Part ModelThe part model starts automatically once RSTestStand Enterprise goes into run mode. You can view the type and number of parts at any location or mover by selecting that item in the diagram and clicking the Parts tab in the Output Message Window.

You can change the part count of a selected part to zero at a Location or Mover by clicking the Drop button on the Parts tab.

Part Flow objects

Generators, parts, and part namesPart Generators create an unlimited supply of specified types. New part names — a particular type of part — can be added to the process any time you are asked to bind a part. In addition, you can add new part names (types) from the Part Generator. Part names are global to the project. The same part name can be used multiple times throughout the project, in a single part model or across multiple models, without undesirable interaction. This is because Part Generators make instances of parts with the same part name, and it is the instance that is moved in the system.

A Part Generator can generate multiple part types. Multiple movers (or the same mover with multiple capabilities) can pull each of the part types from the same Generator.

To configure a Part Generator:

1. Select the Part Generator icon.

2. Drag the shape to the location where you want it to be.

3. Double-click it to bring up the dialog box.

4. Rename it if appropriate and add any description as needed.

5. Select the Part Generation tab. (It will be empty.)

6. Click Add Part. The part name list is displayed containing any names (types) that have been created.

7. To add a part name, click New Part Type.

8. Add the name to the first line of the dialog box. Click OK.

9. The new part type you created is now on the Add Part list. Click it, and click OK. The Part Generator generates the part type that you have selected.

10. Repeat this procedure to generate other parts from the same generator.

If you reopen the Add Part dialog box, you will see that the part type has been removed from the available part names. The Part Generator can only make a single stream of a given part.

RSTestStand.book Page 103 Friday, September 10, 2004 3:22 PM

Page 115: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

104

• •

• •

LocationsParts at a location can have work done on them or be sensed as to type and number. Multiple part streams can flow into a single location, and multiple parts streams can leave a location. The location manages queues for each type of part. The concept of a location is that it is a workplace where some type of work is done on the part or parts. For work to be done, resources with the appropriate capabilities are bound to the location.

The possible actions for a Part Location are:

Sense Presence: Sensing requires a part present switch that uses a function called “When” to test if the sense action is complete. You can modify the part present from the Standard Resource library to meet your needs, but you must use “When” to interact with the Part Flow Model in order to set the necessary switch variables. The set points of the sense action can be adjusted to determine when the part is sensed as it is carried. Right-click the sense action after it is bound to access the setpoints.

Lock and Unlock: Depending on the action of the bound resource, Lock prohibits the removal of a part from the Part Location. Unlock is the complementary action. If an attempt is made to remove a locked part, a warning message is displayed, the part will not move, and the part will not be removed.

Merge and Split: Depending on the state of the capability of the bound resource, will either create two parts out of one or split a single part into two. The names of the various parts involved are identified on the Part Info tab.

Batch: Groups all available parts of a selected part at a given location every time the action is called. You can either batch into the same part name or into a new part name. If a batch operation occurs with no parts available, a message is displayed in the output message window. Use GetPartCount(“Sense”) from a sensor bound to that location to determine when a batch should occur.

Transform: Changes one part type to another at a location. It is useful for modelling something that happens to a part, such as drilling or painting. The new part then should be labeled to identify the change (although there is no automatic relationship associated with the naming). This action works on only one part at a time.

Locations have capacities for individual part types. To access a capacity, double-click the Location and select the Capacity tab. Note that the default is zero (0), which means infinite capacity. If a mover tries to move a part to a location with its capacity filled for that part type, the move will not occur and an error message is displayed in the output message window.

RSTestStand.book Page 104 Friday, September 10, 2004 3:22 PM

Page 116: tstent-gr001_-en-p

12 • Part flow models

105

• • • • •

12 • Part flow models

Part MoversThe mover is used to move parts between locations. Movers, plus the resource bound to them, are models of entities like pick and place robots, where the motion is confined to grabbing a single part and transferring it from one location to another. Another resource that might be bound to a Mover is an operator with a Carry capability.

Movers have to be interposed between Conveyors, Buffers, and Locations. Multiplexers can also be used in the same way as movers.

The possible actions for a Mover are:

Move: Associates an action that transfers a part (assuming there is one there to transfer) to a capability.

Sense: Requires a Part Present switch that uses a function called “When” to test if the sense action is complete. (See “System procedures for the Flowchart Editor” on page 153 for a more complete description.) You can modify the Part Present from the Standard Resource library to meet your needs, but you must use “When” to interact with the part flow model to set the necessary switch variables. The set points of the sense action can be adjusted to determine when the part is sensed as it is carried. Right-click the sense action after it is bound to access the setpoints.

MultiplexerThe Multiplexer routes parts coming from different sources to different output paths. It is a model of a diverter, or routing station, where a part is diverted to one path versus another. The multiplexer is controlled by binding a resource’s capability with an integer value to the multiplexer. The path is routed to the appropriate path as defined by the integer value on the Destinations tab. You can set the integer value by using the Position subroutine. An example of this is shown in the flowchart logic of the Selector Switch in the Op Console library.

There are no placement restrictions on the Multiplexer. It can be used to connect to any object.

The Sources tab defines where the Multiplexer pulls its parts.

The Multiplexer has only one action: Selector. That action transfers a part from the input (defined in the source tab) to an output. You can specify the delay it takes to do this action on the Attributes tab. The default is 0.5 seconds. If the capability is out of range (greater than the number of positions allowed), or not an integer, it is ignored.

RSTestStand.book Page 105 Friday, September 10, 2004 3:22 PM

Page 117: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

106

• •

• •

BufferA Buffer stores and retrieves parts in a particular order. It is a part location that preserves the order of parts as they arrive. You can then remove parts using a Mover by requesting whether they are pulled off the buffer as a First In, First Out (FIFO) or Last In, First Out (LIFO). The only allowable action at a Buffer is Sense Presence.

Buffers have capacities for individual part types. To access a capacity, double-click on the Buffer and select the Capacity tab. Note that the default is zero (0). Zero means infinite capacity. If a mover tries to move a part to a Buffer with its capacity filled for that part type, then the move will not occur and an error message is displayed in the output message window.

You can use the Buffer to model part stackers or inline buffers.

ConveyorThe Conveyor is a model of a synchronous conveyor where all parts shift right or left on a single event. The conveyor object is based on synchronous conveying, such as a belt or other mechanisms that shift parts all at once. The underlying scheme is a shift register that can transfer parts from one internal location on the conveyor (backward or forward). The shift register maintains the order of part types as they are placed on the belt. Parts are shifted when the capability that is bound to the conveyor using either the Move Forward or Move Reverse action reaches the high setpoint.

Position is also kept within an interval. For example, when running, it is possible that the display of the shift register will show 0-0-1-1-0-0, and a moment later, will show 0-0-0-2-0-0, then 0-0-0-1-1-0, for a six-position conveyor. No parts are lost and the conveyor is behaving normally.

RSTestStand.book Page 106 Friday, September 10, 2004 3:22 PM

Page 118: tstent-gr001_-en-p

12 • Part flow models

107

• • • • •

12 • Part flow models

Actions that can be performed by a conveyor are:

Move Forward: Typically, Move Forward is bound to a Rotary Axis from the Standard Resource library. This element is a good model of a motor. When you bind a Move Forward or Move Reverse, the dialog box asks you to specify the ratio of the number of times the motor capability reaches its setpoint to the decision to shift the conveyor parts one position. The default is 10.

Move Reverse: Allows you to reverse the direction of the conveyor.

Sense Presence: Allows you to bind a sense function to a specific location on the conveyor.

The other actions possible for a Location are also available to a conveyor. This allows you to use the conveyor object as synchronous assembly line and other more complex models.

Part DisposerThe Disposer prevents parts from accumulating on the page. This object disposes of parts after they arrive. There is no record kept of the number of parts disposed.

Part sensor switchThe part sensor switch interacts with the Part Flow diagram. The flowchart logic tests for the presence of a part at a part location (or mover) using the function “When.” “When” references the part sensor’s Sense capability. Because this is a special application of a capability, leave the value set at its default of 1.0. Changing the value does not alter the behavior of the switch.

Part in Place is true whenever there are one or more parts at a location or mover. You must use the part flow diagram to use the When function.

RSTestStand.book Page 107 Friday, September 10, 2004 3:22 PM

Page 119: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

108

• •

• •

RSTestStand.book Page 108 Friday, September 10, 2004 3:22 PM

Page 120: tstent-gr001_-en-p

109

13

13 • Controllers

ControllersControllers are special-purpose resources that appear in the Project Model tree under the Controller folder. Like other resources, they have variables and flowcharts, but they do not have capabilities. This reflects the idea that they direct work, but do not actually do it. They also do not have children; they direct resources through their variable connections.

Controllers allow you to sketch out the behavior of a live controller, such as a PLC, using flowcharts and variables. When the project is ready, you can substitute the live controller.

An important feature when using the controller is the ability to copy a block of OPC tags from an external controller and have them appear in the Controller properties page as variables. This makes the switchover almost transparent.

Through controllers, you can also control the execution speed of an RSEmulate 5000 processor. Once the system is properly configured, the Emulate processor will stay in sync with the RSTestStand application, including running, pausing, and running at a percentage of simulation time.You can connect multiple controllers in the project tree to multiple Emulate sessions (one per controller).

This chapter describes how to use controllers in your project and describes some of the settings that are available for controllers.

CP/S and controllers in a system

RSTestStand.book Page 109 Friday, September 10, 2004 3:22 PM

Page 121: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

110

• •

• •

Using a controller in your projectTo use a controller in your project:

1. In the Project Model tree, right-click the Controller folder.

2. Select New Controller.

3. Open up the property dialog box by double-clicking the new controller.

4. Rename the controller as needed.

5. Make sure Using Flow Chart is selected.

6. Select the Variables tab.

7. Select Add Variables using OPC Browser.

8. Expand the OPC browser to either the word or bit level and check the desired tags.

9. Click OK. The software automatically creates variables with the selected tags.

10. Use the Connection Diagram to wire the variables to the appropriate resources.

11. Write the flowchart that determines the controller behavior.

12. Switch to Using OPC when you want to substitute the external controller for the flowchart behavior. By using Use OPC instead of Using Flow Charts, you disable the flowchart execution and the controller becomes a proxy to the external controller.

Controlling execution speeds of an RSEmulate 5000 processorYou can control the execution speed of an RSEmulate 5000 processor by setting up a controller in the RSTestStand Enterprise project tree. Once the system is properly configured, the Emulate processor will stay synchronized with the RSTestStand Enterprise application, including running, pausing, and running at a percentage of simulation time. For more detail on the synchronization process, see the online help topic “External Model Time Control.”

To configure the link:

1. Create a Controller in the RSTestStand Enterprise project tree as described above.

2. Double-click the new controller to display its Property dialog box.

3. Click Communications to display the Communications dialog box.

4. Select Synchronize with Emulate.

RSTestStand.book Page 110 Friday, September 10, 2004 3:22 PM

Page 122: tstent-gr001_-en-p

13 • Controllers

111

• • • • •

13 • Controllers

5. In the Slot Number box, set the appropriate slot number in the Virtual Backplane.

OPC Server Information dialog box for Controllers, showing RSEmulate synchronization option

Once you have set up the Emulate session, you can control the execution speed of the Simulation clock. To control the execution speed:

1. Select the Clock icon from the RSTestStand Enterprise toolbar, either during editing or while running.

2. Slide the scale from 1.00 to some percentage of simulation time when RSTestStand Enterprise is executing.

RSEmulate 5000 will execute at the same percentage speed. If you pause during simulation, RSEmulate will halt its scan at the point at which it receives the command to halt.

You can use the Halt instruction in RSTestStand Enterprise to programmatically control the pausing and restarting of the system clock.

RSTestStand.book Page 111 Friday, September 10, 2004 3:22 PM

Page 123: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

112

• •

• •

Controlling the execution speed of multiple RSEmulate 5000 processors

You can connect multiple controllers in the project tree to multiple Emulate sessions (one per controller).

TimeSync controls the execution speed of RSTestStand Enterprise as a percentage of the simulation clock (in most cases, simulation time will equal wall clock time). If RSTestStand Enterprise is configured to control an RSEmulate 5000 session, it will also control the execution speed of the emulator.

To coordinate multiple RSEmulate sessions:

1. In the project tree, create a controller for each RSEmulate 5000 session.

2. Double-click a Controller to display its Property dialog box.

3. Click Communications. The OPC Server Information dialog box is displayed.

4. Select Synchronize with RSEmulate 5000.

5. In the Slot Number box, select an RSEmulate session slot number.

6. Click OK.

7. Repeat the process for each RSEmulate 5000 session.

8. To master all the Emulate sessions, click the TimeSync tool icon. The Set Time Factor dialog box is displayed.

9. Move the slider to set the time factor of the master clock to execute. The range is 0.1% to 100% of simulation time.

The TimeSync factor is stored in the project, so the project can be closed and re-opened without losing this information.

RSTestStand.book Page 112 Friday, September 10, 2004 3:22 PM

Page 124: tstent-gr001_-en-p

13 • Controllers

113

• • • • •

13 • Controllers

Controller Property dialog box

Attribute tab

Variables tabVariables are how the system stores values during program execution. Values are typically communicated to other resources or controllers in the system using the connection browser.

NAME

Can be any alphanumeric string that is less than 80 characters. It can only start with an alphabetic character (no numbers) and cannot contain spaces (use underscore instead). Any other characters, such as the minus sign, cannot be used.

Option Description

Resource Name Lets you change the name as it appears on the Project Model tree.

External Identifier A unique identifier that ties the resource to the imported source.

Template Identifier Selects a type that matches library elements in other systems, such as Enterprise Controls. If no pre-defined categories are imported through the File > Import dialog box, the browse button is grayed out. See “Importing and exporting projects” on page 121.

Description Allows you to enter a 255-character description of the Controller.

Use Flow Chart Logic Only

Use OPC Data Only

Allows you to pick whether the controller is being used as a proxy.

Communications Displays the standard OPC communications dialog box, where you can change the targeted server and its update rate.

At this time, there is no provision for checking whether variables used in the flowchart logic have been previously defined in the Resource Property dialog box. If RSTestStand Enterprise cannot find a variable name, it assumes you want to use it locally within a process block during a single scan (for example, the index counter for a For…Next loop.) The variable is destroyed when the software exits the process block. For this reason, variables that are not defined in the software will not hold state from one scan to the next.

RSTestStand.book Page 113 Friday, September 10, 2004 3:22 PM

Page 125: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

114

• •

• •

TYPE

Lets you define the type of variable. Typing determines how the variable is represented when it is connected to a PLC using the OPC protocol. For variables that will be connected to a PLC, make sure they match the type of the variable to which they are connected.

The types are:

bool: 0 or 1, true or false

dint: 32-bit integer

int: 16-bit integer

double: 8-byte floating point real number

real: 4-byte floating point real number

string: text

arrays: bool, int, double int, real, double (real), and string. See Initial Value for dimensioning the arrays.

CONNECTIONS

Lets you create a link between the selected variable and other variables in the system. When variables are connected, it is as if there is a wire transferring the contents of one variable to the other variables.

Multiple variables can be connected using the browser tree (fan out). If a variable is connected to the one you are looking at, the field is filled in with the name of the variable. If multiple variables are connected, the outline of the field is changed from black to red dashes. Variables do not have to be the same type to be able to transfer values, but we recommend that you keep the types the same for troubleshooting purposes.

ModeDetermines how a value in a variable in the system is resolved when there might be competing points of connection.

For example, if a variable is connected to another variable, whether internally or through OPC, and both connections can modify the variable, you can select Source to tell the system that this variable is write only.

RSTestStand.book Page 114 Friday, September 10, 2004 3:22 PM

Page 126: tstent-gr001_-en-p

13 • Controllers

115

• • • • •

13 • Controllers

The choices are:

Source: Write only. Controlled only by the flowchart. When a source mode variable is connected to a duplex variable, and the value of the duplex variable is different than the source, the source mode variable will always write its value to the duplex variable.

Duplex: Read and write. If a duplex variable is connected to other variables, and the values of these variables are changing, and you are also controlling the value locally through a flowchart, the value of the duplex variable is determined by the last update from whatever location. For this reason, be careful of how you connect duplex variables.

Sink: Read only. If the variable is connected through OPC to a PLC, Sink means that the initial value of the variable will not be written to the PLC at startup.

PUBLIC

Shows whether the variable will appear in the Variable browser list.

INITIAL VALUE

The values that are loaded into the variable when the system goes into Run mode. They can be used to determine the state of the model at startup. For example, you may want to set the Returned limit switch to True on an axis so that it appears that the mechanism is retracted when power is turned on.

If your variable has an OPC tag address, this value will be written to the PLC on the first scan unless Sink is selected.

By default, the initial value of duplex variables is not written to the PLC at startup. In general, you should use source variables to control the initial value in the PLC logic. However, under certain circumstances, you may want to have the initial value of the duplex variable written during the pre-scan of the software. You can change the default by going to the Resource Property Communication dialog and selecting “Send Duplex variables’ initial value to server during startup.”

If you have selected an array data type in the Type column:

1. Right-click the Initial Value field and select Configure Array.

2. Click Resize to set the size of the array. The array defaults to eight elements.

You cannot directly connect array elements to other variables in the system. If you wish to make array elements available to other resources, you must equate an array element in the flow chart to another defined variable in the variable table.

There are some unique considerations regarding source and duplex variables when the variables are using the OPC link. See the online help topics “Application Considerations using OPC” and “Initial Value Considerations” for additional information.

RSTestStand.book Page 115 Friday, September 10, 2004 3:22 PM

Page 127: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

116

• •

• •

TAG

The OPC tag is the address the system uses to communicate to a PLC. If you cannot find your target address in the browser, be sure that the Topic is configured in RSLinx.

The first time you select a value for the Tag field, you will see a dialog box with the message “The ‘Is Using Server’ flag is off. Would you like to turn it on?” Generally, when you are prompted with the message, you should select Yes. This message refers to the check box under the Communications button on the Attributes tab. If it is not turned on, the OPC connection client does not create a group. If you want to selectively disable communications for troubleshooting purposes, select No.

To select OPC tag addresses in the Tag column:

1. Click the browse (...) button to the right of the Tag column.

Browse Tags dialog box

2. Choose tags from the Browse Tags dialog box. Click OK.

To turn this flag on or off later, select the Attributes tab, click the Communications button, and select or clear the Is Using Server checkbox.

RSTestStand.book Page 116 Friday, September 10, 2004 3:22 PM

Page 128: tstent-gr001_-en-p

13 • Controllers

117

• • • • •

13 • Controllers

You can also type in a tag address. The format is:

[Topic_name]File:Word.bit

You can connect an array variable to an OPC array using the following syntax:

[topic]base_address<,L##>

You can browse for the base address and then type the comma, L, and a number to indicate the number of elements to be transferred. A valid OPC address would be: [mytopic]N7:0,L5, which would read five words of data starting at N7:0.

RSTestStand Enterprise does not require the variable array to match the length of the OPC tag array.

ADD VARIABLES USING OPC BROWSER BUTTON

Lets you import the name of a variable and its OPC tag address from the OPC tag browser. You can multi-select as many tags as you want to import. This allows you to both quickly populate the variable name field and easily switch over control of the simulation from an internal flowchart to a live controller. The RSTestStand Enterprise controller is now a proxy to the live controller.

RSTestStand.book Page 117 Friday, September 10, 2004 3:22 PM

Page 129: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

118

• •

• •

RSTestStand.book Page 118 Friday, September 10, 2004 3:22 PM

Page 130: tstent-gr001_-en-p

119

14

14 • Local VBScript Modules

Local VBScript ModulesIf you have some unique functions that cannot be done in a flowchart, you can use Local VBScript Modules for interacting directly with the Visual Basic Script interpreter.

This chapter tells you how to create a Local VBScript Module and describes subroutines and functions.

Creating a Local VBScript ModuleTo create a Local VBScript Module:

1. Select the Local VBScript Module icon from the toolbar.

2. Draw a Local VBScript Module box.

3. Double-click the text in the box. The VB Script Editor is displayed.

4. After you are finished, click OK.

Local VBScript Modules are executed once during the first scan, and are not executed again unless the flowchart references them through function or subroutine calls. When they are called, they are executed before any other flowchart blocks. To execute a Local VBScript Module on every scan without having to write a flowchart script, create a “Resource_Update” subroutine in your Local VBScript Module. See “System procedures for the Flowchart Editor” on page 153 for more information on this subroutine.

Variables that are defined in the resource (using the properties page) can be referenced in the VBScript MOdule using the syntax var.Myvar. You can do this be first typing vars and then right-clicking to pick the variable name. See the online help topic “Local VB Script Modules” for an example of a simple count function.

Variables that are declared using the DIM statement in a Local VBScript Module, but not defined on the resource property dialog box, are scoped locally to the resource and can be referenced in a flowchart of that resource. For example, an array element can be used in a flowchart. You can also DIM other variable types and use them in your flowchart. For example, if you are assigning an object to a variable using the Set command, you must declare them first in the Script Module. If you wanted to open a Microsoft Excel application, and referenced it as “My_app”, this line must be in a Script Module:

Public My_App

For an example of a Local VBScript Module, see the Excel Driven Generator resource of the Standard Resource library (under Wave Form Generators). Note that Local VBScript Modules do not directly support an import procedure from Visual Basic.

RSTestStand.book Page 119 Friday, September 10, 2004 3:22 PM

Page 131: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

120

• •

• •

You would use My_app in a flowchart by first using this line in a process block to assign My_App to the CreateObject:

Set My_App = CreateObject("Excel.Application")

After the assignment, you can use My_App in any reference, such as:My_App.Visible = True

where the property Visible is made True.

Because of how the interpreter works, special structures such as Arrays must be declared by calling the Visual Basic Script interpreter directly using the DIM statement in a Local VBScript Module. Another example of special structures are Subroutines and Functions. Since they are executed as Visual Basic Script, they follow Microsoft Script syntax.

SubroutinesA Subroutine procedure is a series of VBScript statements, enclosed by Sub and End Sub statements, that perform actions but don’t return a value. A Subroutine procedure can take arguments (constants, variables, or expressions that are passed by a calling procedure). If a Subroutine procedure has no arguments, its Subroutine statement must include an empty set of parentheses ().

Example: Sub Rando(ByRef val, ByVal Lo, ByVal Hi)val = (Rnd * Abs(Hi - Lo)) + LoEnd Sub

FunctionsA Function procedure is a series of VBScript statements enclosed by the Function and End Function statements. A Function procedure is similar to a Sub procedure, but can also return a value. A Function procedure can take arguments (constants, variables, or expressions that are passed to it by a calling procedure). If a Function procedure has no arguments, its Function statement must include an empty set of parentheses. A Function returns a value by assigning a value to its name in one or more statements of the procedure. The return type of a Function is always a Variant.

Example:

Function Incr(ByVal val, ByVal offset)Incr = val + offsetEnd Function

The above information is from http://msdn.microsoft.com/scripting/. We recommend that you use this reference for additional information on Visual Basic Scripting.

RSTestStand.book Page 120 Friday, September 10, 2004 3:22 PM

Page 132: tstent-gr001_-en-p

121

15

15 • Importing and exporting

projects

Importing and exporting projectsRSTestStand Enterprise allows you to import all or part of your Project Model from other applications such as CAD modeling packages or data management systems. You can also import RSTestStand files. You can use multiple RSTestStand imports to build up your system test scenario out of unit test elements.

Likewise, all or part of the Project Model can be exported to another package, be worked on there, and then re-imported.

RSTestStand Enterprise imports and exports its Project Model in an industry standard data format — XML (eXtended Markup Language). XML provides flexibility and portability to many different types of applications. But XML, unlike many earlier protocols, has explicit mechanisms that specify and validate the contents of an XML file. RSTestStand Enterprise has developed and documented an XML file format, or schema, called EDX. For more detail, see the online help topic “The EDX Schema.”

A feature of RSTestStand Enterprise is that it will keep attribute data coming in from another system in its project file, even if it is not being used in the project. The data is stored in XMLets in such a way that it can be paired back up with its original resource on export.

This chapter describes how to import, merge, and export XML files, and how to import and merge RSTestStand projects.

Importing and merging XML filesTo import an EDX file:

1. Select File > Import.

2. Select Import from XML Source.

3. Use the Open File dialog box to find the appropriate file. Select the EDX filter on the file dialog box. An EDX file will have either an .edx or .xml file extension.

4. Select the file. If the file is not EDX compatible, the software will return an error message. The error message is also logged.

5. A dialog box is displayed. On the left side of the dialog box, under the Structure tab, is a window that displays the content of the XML file. On the right side is a copy of the Project Model.

You can also import and export comma separated values (csv) files. See “Importing and exporting your project variables” on page 17.

RSTestStand.book Page 121 Friday, September 10, 2004 3:22 PM

Page 133: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

122

• •

• •

6. Click >> to transfer the contents of the XML file to the Project Model.

The imported tree is traversed, resources are created based on matching Category/Type contents, the external ID is set, variables created, and so on.

The import is done into a new workspace.

7. Click OK to complete the process. The import-workspace’s root folder is merged into the root folder of the open project in RSTestStand Enterprise. External ID matching is limited based by structure in the workspace.

Exporting files using XMLTo export to an XML file:

1. Select File > Export.

2. Select the appropriate filter on the dialog box to determine what schema to use during the export.

3. Name the file and its directory location.

4. Click OK.

5. A dialog box is displayed that allows you to select the level in the project hierarchy at which you want to export.

Importing and merging RSTestStand projectsYou can import as many RSTestStand projects as you wish. However, if you import the same RSTestStand file multiple times, each import will create a new instance in the target project tree. There is no attempt to replace existing resources with newer versions of the same resource.

1. Select File > Import.

2. Select Import from RSTestStand. The File Open dialog box is displayed.

3. Select the appropriate RSTestStand file (.rsm extension).

4. The import function inserts the entire RSTestStand project under the Equipment (or root) folder in the target RSTestStand Enterprise project.

If you try to import an RSTestSTand Enterprise project, you will get a warning message. All part flow models, TestScripts, and controllers will be stripped out on the import.

RSTestStand.book Page 122 Friday, September 10, 2004 3:22 PM

Page 134: tstent-gr001_-en-p

123

16 16 • Developing and using TestScripts

Developing and using TestScriptsTestScripts are a method of checking out your control system in an organized and repeatable way. Instead of using broomsticks to toggle switches and paper printouts to record results, TestScripts can control your testing environment by allowing you to create electronic forms that direct your tester each step of the way and dynamically interact with the control system through the process.You can create multiple TestScripts in a project and run them independently. Each TestScript consists of a collection of tests that are executed sequentially in the order in which they appear in the project tree. TestScripts, as independent entities, can be run concurrently so that you have different tests executing simultaneously. RSTestStand Enterprise continues to run when a Test form appears.This chapter describes how to:

Create a TestScriptEdit TestScriptsSet up and use a manual TestScriptRun TestScriptsLog test results

This chapter also provides descriptions of the standard forms that are included with RSTestStand Enterprise.

Creating a new TestScriptTo create a new TestScript:1. Go to the CheckList folder and right-click.2. Select New TestScript.3. Double-click the TestScript and modify the property dialog box as needed.4. A new TestScript is displayed in the CheckList folder. Rename as required.5. If you plan to use logging, go back to the CheckList folder and choose Select Log File.

A blank log file is installed with the software called Test Log. It can be opened in NotePad or similar programs. All tests, if they log, can only log to this one file. You can change files from one session to the next.

6. Right-click the TestScript and select New Test.7. Double-click the Test. A property dialog box is displayed.8. Fill in the description, author, and other relevant information as needed.9. Select the Form choice from the list.10. Select Configure Form. See “Configuration of standard Forms” on page 126.

RSTestStand.book Page 123 Friday, September 10, 2004 3:22 PM

Page 135: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

124

• •

• •

Editing TestScripts using Visual Basic ScriptYou can write your own TestScripts in Visual Basic Script. We have added special procedures to RSTestStand Enterprise that are available through the VBS interpreter and are documented in “Built-in procedures for the TestScript Editor” on page 159. You can edit the Visual Basic Script directly from a Test dialog box.

If you want to edit the currently selected form (for example, to add or modify the layout of the form), select the Edit Form Code.

To edit the entire script, choose Edit Script Code. This will allow you to change the sequence of execution and create new forms of your own design within the TestScript.

Both of these choices bring up the Visual Basic Script Editor.

Setting up and using a manual TestScriptThis section shows you how to configure a manual TestScript.

1. Stop the simulation.

2. Right-click the CheckList folder and select New TestScript. Rename.

3. Repeat the process and choose Select Log file.

4. Choose the default.

5. Right-click the TestScript you just created and select New Test.

6. Rename as appropriate.

7. Double-click New Test. The Test Properties dialog box is displayed. The default for Forms is FormManual.

8. Click Configure Form. This dialog box is displayed.

9. Enter the prompt for the test executor. For this example, type in “Make sure parts are loading into Shuttle Bin.” Leave both boxes selected.

10. Click OK twice.

11. Go back into Run mode.

12. Right-click the New Test and select Run Test.

RSTestStand.book Page 124 Friday, September 10, 2004 3:22 PM

Page 136: tstent-gr001_-en-p

16 • Developing and using TestScripts

125

• • • • •

16 • Developing and using TestScripts

13. The test dialog box is displayed and asks the Tester to perform the necessary action. The Tester will select “Pass, Fail, or Incomplete”. Depending on the state of selection, the icon of the test will change.The tester can also enter a comment, which will be logged as part of the results.

14. Add another manual Test or two. Repeat step 13 except select Run Script from the TestScript. Each form will appear sequentially.

Running TestScriptsTestScripts are written in Visual Basic Script and execute in their own environment, although they interact with the Project Model during runtime. Because they run as a separate thread, a TestScript form that appears on the screen does not block the execution of the real-time model. They can also be run concurrently.

You can run either an individual Test independently of the TestScript, or you can run the TestScript itself. If you choose to run the TestScript, each Test under that TestScript will execute sequentially. If you want to have a background Test, make sure it is in its own TestScript. You might use this feature to run the Interlock Test during the simulation as a background Test while running a sequence of manual Tests.

To run a TestScript:

1. Place the project in Run or Start Pause mode.

2. Right-click the appropriate TestScript and select Run TestScript.

You can also run Tests individually by right-clicking the Test and selecting Run Test.

If a Test has been marked Pass and you run the TestScript that contains it again, it will be skipped over. If you need to change it, it can be accessed by running the Test individually. All Tests in a TestScript can be reset to Incomplete by choosing Reset All Tests from the TestScript shortcut menu.

Some of the Tests do not need to be present on the screen while they are running. Choose minimize to shrink them.

Tests and TestScripts can run concurrently. Running any Test or TestScript will not block the execution of the main simulation program. The difference between running individual Tests and running a TestScript is that the Tests embedded in the TestScript will execute sequentially in the order they appear in the Project Model. You can reorder their execution by dragging and dropping the individual Test to wherever you want it.

RSTestStand.book Page 125 Friday, September 10, 2004 3:22 PM

Page 137: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

126

• •

• •

The Log File for TestScriptsTo select the log file, right-click the folder CheckLists. The default log file is called Test Log. If you want to use this file, click it in the File Open dialog box. If you want to use another file, it must exist first and then you can select it.

All tests, if they log, can only log to this one file. However, you can change files from one session to the next.

When a TestScript is run and the logging selection is enabled, RSTestStand Enterprise writes a text string to the log file. Each field is separated by commas and can be imported into programs such as Microsoft Excel as a .csv file. The fields that are written out during a log event are dependent on which forms have been selected and any custom modifications you might have done to the TestScripts. You can change the format by editing the VBS code of the TestScript.

Configuration of standard FormsThe four forms that are included with the software are:

Manual Form

Random Fault Form

Snapshot Form

Interlock Form

These forms can be used in any test and any test can be used in any TestScript as many times as you need, but you can only have one form per test.

Forms are written in VB Script and can be modified.

Manual FormA manual form is a procedural checklist, where a tester is directed to perform an action and record the results.

To configure a manual form:

1. Double-click a Test in a TestScript.

2. Select FormManual from the list in the Forms portion of the dialog box.

3. Click Configure Form.

RSTestStand.book Page 126 Friday, September 10, 2004 3:22 PM

Page 138: tstent-gr001_-en-p

16 • Developing and using TestScripts

127

• • • • •

16 • Developing and using TestScripts

4. Type any instructions you might want to display to the tester in the top text box.

5. Select the Log on Completion box to log the name of the test, the time it was logged, and the results.

6. Select Require Tester Name Entry to log the name of the tester (as entered when the test is run).

7. Click OK when you are finished.

8. Click OK on the Test dialog box. You have now configured the Test.

Random Fault FormThis form simulates faults in the system by forcing RSTestStand Enterprise variables either according to a sequential pattern or randomly. The contents of these variables then can be used to input fault conditions to your control system. Use this form to check diagnostics and other operating responses in your control system.

This Test typically would be run in a separate TestScript as a single Test in the script. You would leave this test running and observe the results. Enabling logging in this case would only identify that the test has been run and completed. It will be up to you to determine whether the system passed or failed. Similar to other forms, when run, the tester would enter pass, fail, or incomplete.

To configure a random fault form:

1. After bringing up the Test dialog box, select FormRndFaults from the list.

2. Click Configure Form.

RSTestStand.book Page 127 Friday, September 10, 2004 3:22 PM

Page 139: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

128

• •

• •

3. Click the … button next to Event Trigger to browse for a variable.

4. Enter the value you want to test the event against in the box next to the variable.

The event trigger is an expression that tests the current value of the selected variable against the value in the box. If the expression is true, the event is enabled. If the box is left blank, it is assumed that the expression is testing to see if the variable’s value is True.

The event stays enabled until the event is reset, using the same expression evaluation mechanism.

An event can be as simple as pushing a push button. The event is set through the button going on; the event is reset by the button going off.

5. The Pattern identifies how the table below is executed. The options are:

All: Causes every variable to be forced to the target value listed next to it every time the event trigger is set. The force is removed when the event trigger is reset.

Random: Forces values in the table randomly.

Sequentially: Forces values one at a time moving down the table. At the end of the table, it restarts at the top.

6. Populate the table of variables using the variable browser.

Enter the desired force value in the box next to the table.

Enter True or False for Boolean variables.

Enter numbers otherwise.

7. Select the Log On Completion box to log the name of the test, the time it was logged, and the results.

RSTestStand.book Page 128 Friday, September 10, 2004 3:22 PM

Page 140: tstent-gr001_-en-p

16 • Developing and using TestScripts

129

• • • • •

16 • Developing and using TestScripts

8. Select Require Tester Name Entry to log the name of the tester (as entered when the test is run).

9. The tester can complete the test by indicating whether it passes, fails, or is incomplete. You can write to the log, closing the test.

Snapshot FormThe Snapshot form allows you to create a test that “snapshots” a set of variable values and logs them any time the event expression evaluates true. Since the expression is any valid VBS expression using variables defined in your project, it is a powerful tool for logging the system response under a variety of conditions. Because it is grabbing a set of data points concurrently, you can build up a profile of an event using the data set as defined in the table.

To configure a Snapshot Form:

1. Configure the Snapshot form by selecting FormSnapShot from the list.

2. Click Configure Form to display this dialog box.

3. Use a valid VBS expression containing project variables to create the trigger expression.

4. Browse for the appropriate data points of the values you want to capture.

Every time the trigger expression evaluates True, the values in the variables in the table will be logged.

Similar to the Random Fault Test, you will probably want to run this Test as a single Test in a TestScript and leave it running during the testing cycle. The tester can complete the test by indicating whether it passes, fails, or is incomplete. You can write to the log, closing the test.

RSTestStand.book Page 129 Friday, September 10, 2004 3:22 PM

Page 141: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

130

• •

• •

Interlock FormThe Interlock Form allows you to create a background test that checks for conditions that should not be allowed according to the physics of the model. By evaluating expressions that contain these statements about fault conditions, the Test then responds based on how you check off the various choices: Halt, Log, or Message.

To configure an Interlock Form:

1. Configure the Interlock form by selecting FormInterlock from the list.

2. Click Configure Form to display this dialog box.

3. Use a valid VBS expression containing project variables to create the trigger expression. Typically, you would want to compare the value in a variable with some constant or the value in another variable.

4. Select the response of the system to the expression going true. Your check box choices are not exclusive.

5. Halt puts the system into Pause mode, where RSTestStand Enterprise is still running but the flowcharts are not being evaluated and variables are not being updated. The simulation clock is also frozen.

6. Make sure, if you halt the system, that whatever condition created the fault is removed. Otherwise it will scan once and return to the same Pause state.

RSTestStand.book Page 130 Friday, September 10, 2004 3:22 PM

Page 142: tstent-gr001_-en-p

131

17 17 • Comm

unications using OPC

Communications using OPCRSTestStand Enterprise uses OLE for Process Control (OPC) as its communication protocol for external devices. It is a client application that requires a 2.0 compliant server to exchange data. RSLinx 2.40 or higher is the RSTestStand Enterprise default server.

This chapter describes:

How to connect to another server

Topic names

Groups and items

How variables update

Powerup scans

How to search and replace OPC tag addresses and variable names

RSTestStand.book Page 131 Friday, September 10, 2004 3:22 PM

Page 143: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

132

• •

• •

Connecting to another serverTo connect to a different server, change the global default server:

1. Select View > Project Properties.

2. Select the Communications tab.

3. Browse for a new server.

You can also choose a different server for a resource:

1. Go to the Project Model.

2. Select Properties for a resource.

3. Select the Attributes tab.

4. Click Communications.

5. Browse for a different server.

Typically, you will not have to change any of the settings on this dialog box if you are using RSLinx on the same machine as the software. If you do need to change the settings, see the online help for field descriptions.

When RSTestStand Enterprise goes into Run mode, it looks for the designated server or servers. If the server is RSLinx, RSLinx will be started if it is not already running, and try and communicate with the first OPC address it encounters in the model. The Output Window will display error messages if it cannot find OPC addresses on the OPC server. See “Output Window messages and error codes” on page 147 for descriptions of these messages.

Topic namesIf you are using RSLinx, every OPC item needs a topic name so the OPC Browse Tags can see a target tag. If the topic name is not added to the address, or the topic is inaccessible because the path is incorrect or the controller not available, RSTestStand Enterprise will return an error in the Output Message Window.

Without a topic configured, the browser cannot get to the tag list.

See the RSLinx documentation for information on configuring, editing, and deleting topics.

RSTestStand.book Page 132 Friday, September 10, 2004 3:22 PM

Page 144: tstent-gr001_-en-p

17 • Communications using OPC

133

• • • • •

17 • Comm

unications using OPC

Groups and itemsGroups are collections of items in OPC. An item is a tag address. In RSTestStand Enterprise, a group is automatically set up for each resource. The variables of a resource that has had tags entered in the Tag field are assigned a tag address in the group.

Poll ratesYou can set poll rates of Active items in a group through the Communications dialog box. Poll rate only affects the transaction rate between the RSLinx server and the underlying devices (typically your PLCs). Inactive writes from the OPC client (RSTestStand Enterprise) pass immediately through the server to the target device. RSLinx will respond to different poll rates until it is unable to keep up, typically because of limitations of the link speed. If you have a large application using multiple communication devices, you may want to adjust some of your groups (resources) to poll at slower rates, so that other devices can be serviced more quickly.

Variable updatesVariables update in RSTestStand Enterprise and on the OPC link as change-of-state. Therefore, if you selected “source” for writing to the PLC, the simulation can be out of synchronization with the PLC. “Source” means that the state of the variable is only controlled by the local flowchart or initial state of variable. If you force a bit in the PLC, it will not be reflected in the state of the variable in RSTestStand Enterprise and will not be rewritten, because RSTestStand Enterprise does not know that it is different. Likewise, if you turn on the PLC after going to Run mode in RSTestStand Enterprise, the initial state of the variable will not be written unless you cycle from Edit to Run again. Selecting “Source” minimizes the amount of OPC link traffic, especially if you are sure that the PLC will never attempt to control the state of the variable.

To have a PLC value always controlled by RSTestStand Enterprise, make sure you select duplex and control the value of the variable from a flowchart.

Initial or powerup scan using OPC connectionsAt powerup (or initial scan), the software first writes all source mode variables to the PLC. It then sends a list of variable names (or tag names) that it wants RSLinx to put on its scan list. This list is generated by evaluating all the resources in the project and creating OPC items for resource variables that have their “Is Using Server” flag checked. RSLinx then reads the states of these tags and returns them to the software. The values for source mode variables are discarded; all other variables are updated by the returned values from the PLC. If the initial value of a duplex variable is different than the PLC value, the initial value is replaced by the PLC value.

RSTestStand.book Page 133 Friday, September 10, 2004 3:22 PM

Page 145: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

134

• •

• •

If a source variable is connected to a duplex variable, which in turn has an OPC tag address, then the second scan will cause the source variable value to be written to the PLC. Since the software will always write a source value to a connected duplex variable if it is different than the connected variable, the connected source value will always be enforced in the PLC. For more information on setting duplex variables, see “If you want to make communications settings that are specific to this resource, click Communications. The Communications dialog box is displayed.” on page 24.

Note that there is no attempt to enforce synchronous values across the OPC link between RSTestStand Enterprise and the target PLC when using source mode variables.

If the variable is being used as an initial value and is source mode (that is, there is no flowchart updating it), make sure that RSTestStand Enterprise is put in run mode after the PLC. Otherwise the PLC will miss the power-up scan update.

Search and replace OPC tag addresses and variable namesSearch allows you to globally replace topic names for OPC tag addresses and variable names. It also allows you to replace a portion of the structure name as part of a tag address so that you can use the same resource multiple times by just changing its base reference. For detail on searching, see “Searching your Project Model” on page 16.

RSTestStand.book Page 134 Friday, September 10, 2004 3:22 PM

Page 146: tstent-gr001_-en-p

135

18

18 • Troubleshooting

TroubleshootingThe most important tools you have available for troubleshooting are the Output Message Window and Watch Windows.

The general areas in which you might have difficulty:Problems with flowchart logicProblems with communicationsInteractions with your PLCProblems with your 3D graphics

It is helpful to isolate problems by debugging the model logic first, then the communications, and finally focus on developing and debugging the PLC. Troubleshoot 3D graphics as needed.

Debugging flowchart logicProblems with model logic will fall into two categories:

illegal or miscoded statements in the flowcharts

application issues

Most but not all miscoding will be trapped by the software and you will get an error message in the Output Message Window. The site of the error will also be identified on the flowchart by a red boundary box on the appropriate block.

The flowchart interpreter prepackages flowchart blocks and hands them off to the Microsoft Visual Basic Script interpreter. Illegal syntax is not caught until this happens at runtime. If the error is serious, the software stops scanning and returns the error. Most errors will be caused by mistyped commands or variable names. Make sure you are using the variable browser to add variables to your flowchart.

Make sure you check the Output Message Window for messages. See “Output Window messages and error codes” on page 147 for details on specific messages.

To open the variable browser:

1. Right-click the flowchart editor view.

2. Select Pick Variable. The Browse Resources dialog box is displayed.

3. Select the variable from the list.

See the online help for information on using the Flowchart Editor.

RSTestStand.book Page 135 Friday, September 10, 2004 3:22 PM

Page 147: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

136

• •

• •

When troubleshooting, check these items:

Since the Flowchart Editor treats text entry as just text, carefully review your statements for the erroneous use of quote marks and other spurious characters.

Make sure variables used in the flowchart logic have been previously defined in the resource property dialog box. If RSTestStand Enterprise cannot find a variable name, it assumes you want to use it locally within a process block during a single scan (for example, the index counter for a For…Next loop). The variable is destroyed when the software exits the process block. Therefore, variables that are not defined in the software will not hold state from one scan to the next.

Input and output commands (such as MsgBox) are not supported.

You can dimension an array when you define it on the variables tab of the resource. However, you cannot ReDim an array defined this way. You can ReDim an array using a Local VBScript Module.

You cannot use Visual Basic (VB) keywords as names of variables or capabilities (for example, Timer). If VB keywords are used, the software will return an error message. You can find a list of keywords at http://msdn.microsoft.com/scripting/VBScript under Functions.

Variables and capabilities cannot be named identically in the same resource. The software will return an error code if this occurs.

Application errors frequently occur when you try to control a variable from multiple points. Make sure your connections are not fighting over control.

Qualifying a variable as “Source” should only be done once in a connection chain. If you intend for the variable to be controlled from the PLC, do not use Source.

Visual Basic Script, unlike a PLC, requires you to explicitly control the state of a variable. This includes the initialization state. The variable property for initialization sets whatever states you want the model to power up to. After first scan, though, flowchart logic will control the states. If there is no logic interacting with a variable, the value will remain in its initialization state.

The same is true for setting a value in a variable at some point in the flowchart. Unless you reset it somewhere else, either through initialization or through flowchart logic, it will stay set, even if you de-assert the variable by not scanning it from a decision block.

RSTestStand.book Page 136 Friday, September 10, 2004 3:22 PM

Page 148: tstent-gr001_-en-p

18 • Troubleshooting

137

• • • • •

18 • Troubleshooting

Make sure iteration loops or the VBScript While function are not used to block evolution of the flowcharts. Doing so blocks the simulation thread and overall performance will decline dramatically. Instead, use either Invoke() or WaitUntil(). Invoke blocks the flowchart for a length of time specified by the referenced capability. WaitUntil blocks are based on an expression evaluating to True — without blocking the overall simulation.

Make sure smart quotes were not copied in from another application such as Microsoft Word. The VBScript interpreter does not accept smart quotes. If there are smart quotes in the flowchart, delete and re-enter them using straight quotation marks.

Communication problemsVariables update in RSTestStand Enterprise and on the OPC link as change-of-state.

For some versions of RSLinx, it is possible that packets will be dropped if the Limit Maximum Packets feature is selected. This configuration is accessed on the Data Collection tab of the OPC topic configuration. If you have selected Source for writing to the PLC, the simulation can become out of synchronization with the PLC. Source means that the state of the variable is only controlled by the local flowchart or the initial state of the variable. If you force a bit in the PLC, it will not be reflected in the state of the variable in RSTestStand Enterprise and will not be rewritten, because RSTestStand Enterprise does not know that it is different. Likewise, if you turn on the PLC after going to run mode in RSTestStand Enterprise, the initial state of the variable will not be written unless you cycle from edit to run again.

If you want to have a PLC value always controlled by RSTestStand Enterprise, make sure you select Duplex and control the value of the variable from a flowchart.

No error codes, but variables are not updatingIf there are no error codes, but variables are not updating, make sure the “Is Using Server” checkbox is selected. This can happen if you export your variables to a .csv file, add your OPC tag addresses, and then reimport. See “Communications using OPC” on page 131 and “If you want to make communications settings that are specific to this resource, click Communications. The Communications dialog box is displayed.” on page 24.

Selecting source minimizes the amount of OPC link traffic, especially if you are sure that the PLC will never attempt to control the state of the variable.

Note that the OPC tag that appears in the Watch Window will be red if the “Is Using Server” flag is off.

RSTestStand.book Page 137 Friday, September 10, 2004 3:22 PM

Page 149: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

138

• •

• •

No topic configured in RSLinxA common configuration problem is forgetting to configure a topic in RSLinx (error code BL50021). A topic tells the software which PLC to talk to. If you browse for tag addresses from the Browse Tags dialog box (accessed through the Resource Properties dialog box by double-clicking the Tag column in the Variables tab) and cannot see the name of the controller, remember that what appears first in the Browse Tags dialog box are topics. If the topic appears but is giving you data that appear to be incorrect, go to RSLinx and verify that the topic configuration is correct. OPC does not know about controller names or link addresses — that information is in the configuration information of the topic.

Controller problemsAnother frequent problem occurs at runtime when the topic name exists in the OPC server but the controller is not available because it is powered off. This assumes that you have been able to configure a tag with the browser previously when the controller is powered. There will be two error codes: BL50023 and then BL50053. The OPC link will function regardless of whether the controller is in Run or Program mode.

Make sure you have the appropriate drivers selected in RSLinx for the controller to which you are trying to talk. Emulators have different drivers than hardware controllers.

Incorrect update ratesThe update rate of RSLinx to the controller can be configured either in the Project Properties dialog box or at the individual resource properties. In general, RSLinx will automatically throttle back the update rate based on the capability of the link that it is using to collect data. Slow links, such as the RS-232 front port, will have a longer response time and may be unsuitable for trying to simulate I/O responses. If you are using an emulator as a controller, the response will be much better because all the transactions are occurring inside your computer.

If you are using the DF1 link, especially with a SLC processor, set the update rate on all your resources to 1000 msec. The response time of the system actually improves with a slower update rate.

Polled Messages is not selectedIf you are able to write to the PLC, but you cannot read from the PLC, go to RSLinx and make sure the check box for Polled Messages is selected. To verify, go to DDE/OPC > Topic Configuration. Look under the Data Collection tab for the topic in which you are interested. This setting is on a per topic basis.

RSTestStand.book Page 138 Friday, September 10, 2004 3:22 PM

Page 150: tstent-gr001_-en-p

18 • Troubleshooting

139

• • • • •

18 • Troubleshooting

Time to expand the Tag Browser is too longIf you are using a ControlLogix system where Online tags are in the controller and the time to expand the Tag Browser is too long, try using Offline tags. To change the tags:

1. Open RSLinx.

2. Go to DDE/OPC > Topic Configuration.

3. Select the topic in which you are interested.

4. Go to the Data Collection tab.

5. Select Use Symbols.

6. Browse for the .acd file for the target ControlLogix controller.

7. You must also have an online connection established and active for the item address to be created. See the topic “OPC Browser” in the online help for additional information.

Interacting with the PLC logicBe careful about trying to write into internal structures of an instruction. You need to know which elements are available to be controlled and which are controlled by the PLC. This is particularly true for input tags associated with field I/O. See the online help topic “Application Considerations using OPC” for more information.

When RSTestStand Enterprise transitions from edit mode to run mode, it goes through a power-up scan. If it encounters any variables that are declared as Source mode and have an OPC tag address, it will write those values immediately to the PLC. If there is no flowchart logic to refresh the variable value, this write will only occur at power-up. If you change the target PLC value, RSTestStand Enterprise will not know to update the PLC value and therefore the value RSTestStand Enterprise has in its internal variable will be different than the value in the PLC.

To avoid this problem, make sure the PLC is online and in run mode before you go into run mode. If the power-up write fails, you will get a message in the Output Message Window.

Because PLCs pre-process inputs, tag values in a control program that directly reference an input point in the I/O subsystem have precedence over any data written by the OPC protocol. If you are using an emulator to execute your logic program, you will not have a conflict over the state of input values (emulators are, by definition, not connected to live I/O). However, if you have RSTestStand Enterprise connected to PLC hardware, you must disable the input copy operation to prevent the OPC values from being overwritten.

RSTestStand.book Page 139 Friday, September 10, 2004 3:22 PM

Page 151: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

140

• •

• •

If you are using a:

ControlLogix hardware platform: Go to I/O Configuration in the RSLogix 5000 Project Model and select the appropriate module. Go to the Connection tab and select the Inhibit Module box. You cannot inhibit modules that have been configured as part of a Rack Optimization.

PLC-5: Go to the Processor Status area and tab to Racks. You can selectively disable all the racks in your application by setting the Inhibit bit to 1 for the corresponding rack address.

SLC-500 process: Go to the Processor Status area and tab to IO. As a default, the I/O Slot Enables bits are set to 1. To selectively prevent an input update on a module basis, toggle the corresponding bit to 0.

For the I/O controlled by the SN scanner, you need to disable the Scanner and add one rung of ladder to prevent the processor from faulting. Add the following rung to the last rung of the Main program:

XIC S:5/4 OTU S:5/4

If you do not add this rung, the processor will fault with a minor fault (M0/M1 referenced on disabled slot).

Problems with 3D graphics and OpenGL compatibilityAlthough OpenGL is a multi-platform industry standard for 3D graphics rendering, not all hardware-accelerated video cards fully implement the standard. Some cards available as after-market plug-ins do not support some of the core features of OpenGL and certain laptops do not fully support OpenGL.

Microsoft supplies OpenGL emulation as part of their operating systems. If a hardware hardware-accelerated card is not present, our software uses the OpenGL emulation.

If you are having problems with OpenGL display using a hardware-accelerated card, select View > 3D Rendering Properties and select the box to force the use of software emulation mode.

If objects disappear while you are positioning them, they may have been moved through the grid (below the floor).

If your computer has crashed recently because of the installation of other application programs that might have a driver conflict, your video driver might be corrupted. This may manifest itself if RSTestStand Enterprise exits with an application error when either an Op Console or a Scene is accessed. Reload your video driver if this happens.

RSTestStand.book Page 140 Friday, September 10, 2004 3:22 PM

Page 152: tstent-gr001_-en-p

141

19

19 • Getting the information

you need

Getting the information you needUse this chapter to review the sources of additional information about RSTestStand Enterprise software, including online help and technical support. This chapter helps you to find what you need efficiently.

You can find more information about RSTestStand Enterprise through:

Online help

Technical support services

RSTestStand Enterprise training

If you need quick help to get started using RSTestStand Enterprise software, the RSTestStand Enterprise Getting Results Guide can help you to learn what you need to know to see results fast. Use it with the online help system to get information about features and functions in RSTestStand Enterprise.

Online helpRSTestStand Enterprise includes online help and a tutorial that provides general overview information and step-by-step procedures. To view online help while using RSTestStand Enterprise:

Choose Help > Contents or Help > Getting Started from the main window

Click the Help button in dialog boxes

Technical support servicesIf you cannot find answers to your questions in the RSTestStand Enterprise Getting Results Guide publication or in the online help, you can call Rockwell Software technical support at the number listed on the copyright page. The technical support staff is available Monday through Friday from 8 A.M. to 5 P.M. eastern time, except holidays.

You can also visit www.software.rockwell.com.

RSTestStand.book Page 141 Friday, September 10, 2004 3:22 PM

Page 153: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

142

• •

• •

When you callWhen you call, you should be at the computer running RSTestStand Enterprise and be prepared to provide the following information:

Product serial number. This is on the Activation disk labels or product box. (You can also find the serial number online. In RSTestStand Enterprise, select Help > About.)

Product version number.

Hardware you are using.

Exact wording of any messages on the screen.

Description of what happened and what you were doing when the problem occurred.

Description of how you tried to solve the problem.

TrainingOne of the best ways to increase your proficiency at using Rockwell Software products is to attend a Rockwell Software training program. Our training programs can help you master the basics and show you how to unleash the full potential of our software.

We offer a wide range of training programs, from regularly scheduled classes conducted at Rockwell Software facilities, to custom-tailored classes conducted at your enterprise. The size of each class is kept small intentionally to maximize student engagement.

If you would like more information about our training programs, visit the Rockwell Software site on the World Wide Web or contact the Rockwell Software Training Coordinator. Our World Wide Web address and telephone numbers are in the copyright section of this document.

RSTestStand.book Page 142 Friday, September 10, 2004 3:22 PM

Page 154: tstent-gr001_-en-p

143

A

A • Activation

ActivationRockwell Software’s products are copy-protected. Only a computer with access to the activation key can run the software. The key is located in an activation file, which is originally located on the Master disk supplied with the RSTestStand Enterprise software. The activation file contains one activation key per product. Each key contains one or more licenses depending on how many copies of the product you have purchased.

During the setup process, the setup program gives you the opportunity to move the activation file from the Master disk to the root directory of the drive on which you are installing the software.

When you launch RSTestStand Enterprise, the software first checks your local hard drives, then network hard drives, and finally local floppy drives for activation. If the system fails to detect either the activation file or the Master disk, you will not be able to save work you create in RSTestStand Enterprise.

Protecting your activation files

To avoid damaging your activation files, do not perform the following operations with activation files on the hard drive.

Restore from backup

Upgrade the operating system

Reinstall the same version of DOS

Uninstall DOS

Compress or uncompress the hard drive

Defragmentation utilities will not harm activation files.

Store your Master disk in a safe place. If your activation becomes damaged, the Master disk may be the only means to run your software.

Systems attached to extensive computer networks can take quite a while to search for activation files on all available drives. You can use the CHECKDRIVES setting to specify and/or limit the drives your software checks for activation files and to specify the order in which they are checked. From the activation utilities, select Help > Copy Protection.

Certain anti-virus software packages, such as Norton Antivirus, can corrupt the activation files. Configure your antivirus software to avoid checking the files EVRSI.SYS and 386SWAP.PAR.

RSTestStand.book Page 143 Friday, September 10, 2004 3:22 PM

Page 155: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

144

• •

• •

Before running any type of utility that may modify the structure or organization of the hard drive, remove activation from the hard drive:

1. Use the Move Activation utility (EvMove) to move activation files from the hard drive to an activation disk.

2. Run EvMove by selecting Start > Programs > Rockwell Software > Utilities > Move Activation.

3. Perform the hard disk operation.

4. Move the activation files back to the hard drive.

Activating RSTestStand Enterprise softwareDepending on your needs, you can activate RSTestStand Enterprise from any of the following:

Hard drive. The activation key resides on your computer’s hard disk. Use this method if you will typically use RSTestStand Enterprise software on only one computer. This is the default method if you activate RSTestStand Enterprise during installation. To run RSTestStand Enterprise on a different computer, move the activation key back to the Master disk, and then to the hard drive of the new computer.

Diskette drive. The activation key resides on a floppy disk (activation disk). Use this method if you will typically use RSTestStand Enterprise software on more than one computer. For example, if you want to run RSTestStand Enterprise software on a desktop computer at some times and a portable computer at others.

Network drive. The activation keys reside on a network drive. Use this method if you have purchased multiple licenses of the software and want several users to be able to activate the software over a network. Refer to the online help for instructions on moving activation to a network drive (see “Finding more information about activation” on page 145 to access online help).

Do not use the Move Activation utility if Rockwell Software products are currently running. Ensure all software programs are closed before running the EvMove utility.

You must use the move utility, EvMove, to move activation files. Attempts to copy, move, or email an activation file by other means will damage the file.

RSTestStand.book Page 144 Friday, September 10, 2004 3:22 PM

Page 156: tstent-gr001_-en-p

A • Activation

145

• • • • •

A • Activation

Running the activation utilitiesThe utilities for moving and resetting activation are called EvMove and Reset, respectively. Reset is used when an activation file has been damaged. The EVMOVE.EXE and RESET.EXE files are located on your hard drive (located in C:\Program Files\Rockwell Software\RSUtil if you accepted the default directory location during installation). To run these programs, select Start > Programs > Rockwell Software > Utilities > Move Activation or Reset Activation.

Finding more information about activationThe online help (COPYPROT.HLP) provides more extensive information on activation, including subjects such as:

KEYDISK. Set this environment variable to tell your computer to look for activation on floppy drives.

CHECKDRIVES. Specify which drives to search for activation.

network activation. Move activation to a network server to allow multiple users access to the activation.

moving activation. See detailed instructions for moving activation.

resetting activation. See detailed instructions for using the Reset utility to repair a damaged activation file.

troubleshooting. You can access online help from the Help button on one of the EvMove or Reset dialog boxes.

Some common questionsFollowing are some common problems that people encounter with activation and their solutions.

My activation files were damaged. What should I do?If you have lost the activation because the activation file is damaged, you need to reset activation. Follow the Reset Codes instructions on the Rockwell Software Technical Support web page, or call the technical support telephone number. The web page and telephone number are both listed on the inside front cover of this guide.

If you cannot obtain a reset code immediately, follow these instructions to use the Master disk to activate the software as a temporary solution.

RSTestStand.book Page 145 Friday, September 10, 2004 3:22 PM

Page 157: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

146

• •

• •

To use the Master disk to activate software:

1. Set the KEYDISK environment variable to TRUE. Please refer to the online help file by selecting Start > Program Files > Utilities > Activation Help for more information.

2. Insert your Master disk in the floppy drive.

3. Run your software as usual. Your software will find the activation on the Master disk.

I accidentally deleted the software directory on my hard drive. Do I need to call Rockwell Software for replacement activation files?No. Deleting the program files does not delete your activation. The activation files are not stored in the program directory; they are located in the root directory. Your activation files will not be lost unless you format the hard drive, tamper with hidden files in the root directory, or perform certain other hard drive operations (see “Protecting your activation files” on page 143 for more information).

To get the software running again, simply uninstall the software using the Control Panel’s Add/Remove Programs, then reinstall the software, but do not move the activation when given the opportunity.

Why can’t I move activation to a new floppy disk on a Windows NT system?It has to do with a disk modification that NT does not allow. If you have access to a Windows 95 or 98 machine, you can create a disk that will work under NT. Format a floppy and move any activation file to it under Windows 95 or 98. (You can move the activation back off the disk if you want to keep it where it was.) Then take that disk to your Windows NT machine and move the activation to it.

RSTestStand.book Page 146 Friday, September 10, 2004 3:22 PM

Page 158: tstent-gr001_-en-p

147

B

B • Output Window m

essages and error codes

Output Window messages and error codes

Error codes might be displayed in the Output Message Window during simulation. A simulation message consists of four parts: source, level, context, and descriptor. Some of these messages are status only. Many others are error codes that will help you diagnose and remedy your problem.

The structure of the messages is:

For simulation messages, the source is always BL (business logic)

For a status level message, no text is added and no message number is shown

For Warning, Error, and Severe Error levels, the messages are identified as such

There are 11 contexts that can produce messages:

Flowchart/script parser

Simulation initialization

Simulation execution

Script compilation

OPC communications

Simulation time server

Not available

Capability initialization

User program

Data importer

Data exporter

RSTestStand.book Page 147 Friday, September 10, 2004 3:22 PM

Page 159: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

148

• •

• •

Therefore, a warning level message from the OPC communications context about failing to create an item (tag) would look like:

WARNING: BL50021 “OPC; Item could not be created” <Tag name>

Which means:

BL: Business logic

5: OPC communications context

0021: Item could not be created.

Valid levels are:

Status (notifications)

Warning (minor problems)

Error (problems, but not bad enough to halt)

Severe Error (bad problems, simulation will halt)

Descriptors are shown in the table below. Interpretations and suggestions for resolving specific error codes are included below in parenthesis.

Level Number Descriptor

Error BL40010 Resource Compile error

(Syntax error in flowchart block. The resource’s flowchart block with the error is highlighted in red; correct the syntax)

Severe BL10010 Resource parse error

(Syntax error in flowchart block. The resource’s flowchart block with error is highlighted in red; correct the syntax)

Severe BL20013 Could not load automation proxy object

Severe BL20014 Could not find class ID for script engine

Severe BL20015 Could not load the script engine

Severe BL20016 Could not get IActiveScriptParse interface

Severe BL20017 Could not set the script host site

Severe BL20018 Could not generate code from resource scripts

Severe BL20019 Could not init resource script parser

RSTestStand.book Page 148 Friday, September 10, 2004 3:22 PM

Page 160: tstent-gr001_-en-p

B • Output Window messages and error codes

149

• • • • •

B • Output Window m

essages and error codes

Severe BL20020 Script parsing operation failed

Error BL50021 Item could not be created

(OPC address (item name in the target device or the topic name in the OPC server) does not exist. See error message text for resource and item name and use the browser to find the valid item name.)

Error BL50022 Async write operation failed for the following items:

(OPC could not write to the tag (item). See error message text for resource and item name and use the browser to find the valid item name.)

Error BL50023 AddItem call failed on group

(OPC could not add tag (item) to its list. See error message text for resource name; use the browser to find the valid item name. If this message appears with Error 53, the target controller typically is not available. However, the topic name does exist in the OPC server.)

Error BL50024 Error AddGroup call (or related OLE calls) failed

Severe BL20025 Could not enable scripts for execution

Status BL30026 Simulation started

Status BL30027 Simulation stopped

Error BL30028 Could not find the capability (from capability lookup)

(probably due to an error in typing a capability name. Check list of capabilities for correct names.)

Warning BL30071 Simulation Execution Empty value written to a variable from script

Error BL80028 Could not find the capability (from simulation execution)

(probably due to an error in typing a capability name. Check list of capabilities for correct names.)

Severe BL10030 General Syntax Error encountered during parsing

Error BL30030 General Syntax Error encountered during execution

Error BL80030 General Syntax Error encountered during evaluation of a capability

Error BL50031 Could not load OPC Server

(RSLinx or equivalent OPC server is not available on your system.)

Error BL50032 Could not get OPC Server interface (OLE Error)

Level Number Descriptor

RSTestStand.book Page 149 Friday, September 10, 2004 3:22 PM

Page 161: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

150

• •

• •

Error BL50033 CoCreateInstance failed on OPC Server (OLE Error)

Error BL30034 Variable does not exist caused during simulation execution

(Probably caused by a typo in a variable name. See list of variables for the resource for correct names.)

Error BL100034 Variable does not exist caused during import

(Data for a variable in the import data could not be changed; the variable in the error message text does not exist in the Project Model; possibly deleted.)

Status BL30036 Simulation Paused

Error BL30037 User Generated from a LogError function call

(Caused by a call to LogError in a flowchart block. See error message text for resource name.)

Error BL40038 Variable and capability have the same name

(Variables and capabilities must have unique names within a resource. See error message text for resource name; change one of the names to make them unique.)

Error BL40039 Variable name is Visual Basic Script reserved word

(Variables must not be the same as reserved words in the VB Scripting language. See error message text for resource and variable name; change one of the names to make them unique.)

Error BL40040 Capability name is a Visual Basic Script reserved word

(Capabilities must not be the same as reserved words in the VB Scripting language. See error message text for resource and capability name and change one of the names to make them unique.)

Error BL40041 Flowchart link is unconnected

(A “hanging” link was found in a flowchart. Remove it. See error text for resource name.)

Status BL30042 <Time update>

Status BL30043 <Scan interval update>

Status BL30044 User message from resource <resource name>: <text> from an OutputMsg function call

Level Number Descriptor

RSTestStand.book Page 150 Friday, September 10, 2004 3:22 PM

Page 162: tstent-gr001_-en-p

B • Output Window messages and error codes

151

• • • • •

B • Output Window m

essages and error codes

Error BL100045 The simulation import data file was not saved from the current project

(You are trying to import a data file previously exported from a different project; expect trouble when doing this.)

(not used) BL100046 Time information in simulation import data file could not be read

Error BL100047 Bad marker found in simulation data import file

(The simulation data file being imported has garbled information in it.)

Error BL100048 Bad field encountered while importing simulation data from a file

(The simulation data file being imported has garbled information in it.)

Error BL100049 Could not open file

Error BL100050 Could not close file during read

Error BL110050 Could not close file during write

Error BL110051 Could not write output record to file

Warning BL50052 RSLinx topic name used in tags and in resource attribute

Error BL50053 Could not successfully initialize OPC interface

(Typically, there is a valid topic or path name in the OPC server, but the target of the topic is not available.)

Error BL50054 The simulation had to be stopped abnormally

(After a timeout from the communications.)

Error BL50055 The version of RSLinx must be 2.40 or greater to be used with this product

Error BL100056 No useful data found in the import file

(You selected a file for import that was not compatible.)

Level Number Descriptor

RSTestStand.book Page 151 Friday, September 10, 2004 3:22 PM

Page 163: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

152

• •

• •

RSTestStand.book Page 152 Friday, September 10, 2004 3:22 PM

Page 164: tstent-gr001_-en-p

153

C C • System procedures for

the FlowchartEditor

System procedures for the Flowchart Editor

There are two general categories of functions that you will use with the Flowchart Editor: Visual Basic Script functions and built-in functions.

The list of built-in functions is provided below. These functions and subroutines have been incorporated into the software to give you additional functionality. Note that these words are reserved and cannot be used as variable names.

The MSDN site, Visual Basic Scripting, will give you the syntax for VBS functions used by the interpreter.

Function Description

DoUntil (Condition)

DoWhile (Condition)

These two functions control the execution of the flowchart. The condition must evaluate to true or false. If one of these functions goes true, the chart is reset to the initial position until the Start condition is again met.

As functions, they also return a true or false value and can be part of a general condition in a Start block. For example, Start and DoUntil(a=10) in a Start block will initiate the execution of a flowchart when Start is true and a <> 10. Once the flowchart has started evolving, if a = 10, the chart is reset back to the Start block.

Note: If the reset condition goes true while software is evaluating a capability (for example, from an Invoke), it will finish the capability, even though control has returned to the Start block.

You can only use DoUntil and DoWhile in Start blocks.

GetPartCount

(“Capability”)

Returns the current net part count at the location to which the resource is bound. The capability referenced must be bound with the Sense action.

GetPercentComplete (“Capability”)

Returns the percent complete of the referenced capability. Use it to help interlock animations and other functions that depend on time elapsed.

RSTestStand.book Page 153 Friday, September 10, 2004 3:22 PM

Page 165: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

154

• •

• •

GetVar (“VariableName”) Returns the value of the named resource variable to a VBScript. This function is used in a Local VBScript Module to interact with variables defined in the resource property dialog box. See PutVar for the corresponding write operation.

Invoke“CapabilityName”

Runs a capability to completion. When Invoke is executed in a process block, control will not leave that block in that chart until Invoke is finished. This is useful if you need to create a delay timer in the chart. Invoke does not halt the program scan (in other words, it does not block the interpreter thread).

For example: Invoke Load. Load is a capability with a fixed duration such as five seconds. When Invoke is encountered in the example chart, the chart will stop at that step for five seconds.

It is recommended that you avoid using WaitUntil and Invoke in the same block. Although the script execution engine will accept it, the action of Invoke is blocked even though the capability keeps incrementing. If your expression evaluates true before Invoke times out, the capability value goes from zero to the current value of the Invoke timer instantaneously.

Invoke needs to be the last statement in a process block except for WaitUntil. The interpreter exits the block after it encounters Invoke.

Halt Temporarily pauses the entire simulation. Clicking Pause resets Halt and allows the simulation to continue. Use Halt to freeze your simulation as a way of trapping error conditions in your model.

Function Description

RSTestStand.book Page 154 Friday, September 10, 2004 3:22 PM

Page 166: tstent-gr001_-en-p

C • System procedures for the Flowchart Editor

155

• • • • •

C • System procedures for

the FlowchartEditor

MoveLinear (“CapabilityName”)

Calculates the percent completion value of a capability. The percent of completion of a capability is analogous to the position of the axis relative to its span of travel. 0% corresponds to a home position and 100% to a full advance position.

The rate of change of the percent completion value is derived from the user entry of Duration divided into 100 units. The 100 units correspond to the range of travel: 0 to 100%. MoveLinear only counts up.

To reset the percent completion value of a capability, the Position function must be used. When it is executed, it looks at the value as a percent of completion, moving toward 100%, and takes the remaining percent completion and multiplies it by the time duration in the capability, and moves at that rate until that block is no longer scanned.

Note: When the MoveLinear function is executed, an internal register is updated with the time of the simulation clock. The next time it is executed, it subtracts the current simulation time from the last time and uses that as its delta-t. It then saves the time again for the next pass. When the start condition becomes false, the current time is reloaded continuously into the MoveLinear internal register to reset its last time. To improve the accuracy of the calculation, we recommend that MoveLinear be conditioned by a start block, not a decision block.

Example: pos = MoveLinear (“Extend”). The variable pos is being updated by the function MoveLinear, based on the value of the duration of the “Extend” capability.

OutputMsg (MyVar) Outputs the value of MyVar to the Output Message Window at the bottom of the screen. You can use this function to send text and values from within your running application. You can output fixed text by enclosing the text in quotes. Whenever OutputMsg is executed, it will send its argument to the Output Message Window.

Function Description

RSTestStand.book Page 155 Friday, September 10, 2004 3:22 PM

Page 167: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

156

• •

• •

Position “CapabilityName,”

MyVar

Specifies the percent completion value of a capability based on the value of MyVar every time it is executed. All capabilities have a value stored with them that reflects a percent of travel along an axis. The range of travel is 0% to 100%.

Example: Position “Extend”, 0 resets the Position pointer in the capability “Extend” to zero. Position “Retract”, pos sets the percent completion value for “Retract” to whatever value is stored in pos. By using pos as a common reference point between two capabilities, it is possible to create a model of a reciprocating axis — that is, one that moves back to its origin to complete a full cycle. Pos is then the pointer of where a point of interest is as it traverses back and forth along the path. See the example flowchart in the Standard Resources library for Simple Axis (under Mechanical Functions).

PowerUp True on first pass of the flowchart interpreter, false otherwise.

Pulse (Variable) True for one pass of the flowchart every number of seconds specified in the Variable value. It can be used to create time-based calculations. For example, the Continuous Loop library entry uses a time-based difference equation to solve for a process variable. Example: Pulse (0.25) will create a true decision once every 250 msec.

PutVar “VariableName” value

A subroutine used in a Local VBScript Module that writes the value parameter to the named resource variable. This function is used in a Local VBScript Module to update variables defined in the resource property dialog box. See GetVar for the corresponding read operation.

Resource_Export (strMyVar) Exports the value of MyVar as a single record to the export file defined in the Export Simulation Data menu command. It must be used as a subroutine in a Local VBScript Module. The simulation thread calls it when you request the data to be exported through Export Simulation Data. See the Local VBScript Module in the Excel Data Example resource of the Standard Resource library as an example (under Wave Form Generators). The data exported must be string data. You can only implement this subroutine once per resource as part of a Local VBScript Module. The subroutine saves data that would not otherwise be captured in the save.

Function Description

RSTestStand.book Page 156 Friday, September 10, 2004 3:22 PM

Page 168: tstent-gr001_-en-p

C • System procedures for the Flowchart Editor

157

• • • • •

C • System procedures for

the FlowchartEditor

Resource_Import (strMyVar) Imports a single record from Exported Simulation Data file previously created as part of the Exported Simulation Data menu command. It restores certain types of data as part of Use Imported Simulation Data. It can only import string data. You only implement this subroutine once per resource as part of a Local VBScript Module.

Resource_Update () A subroutine in a Local VBScript Module. It is called by the interpreter once every scan. It allows you to create a VBScript that is scoped locally to the resource and is automatically scanned, rather than having to be called from within the flowchart. You can implement this subroutine only once per resource.

SimulationTime A function that returns the current simulation time.

WaitUntil “expression” Blocks the execution of the flowchart at the block in which it is contained until the expression evaluates to True. The expression must be on a single line. Note that large expressions will slow down the overall performance of the software.

You can use the variable browser to pick variables to include in the expression.

WaitUntil is functionally similar to using a Decision block with a No connection looped back on itself. However, WaitUntil will continue to evaluate all statements in the Process block while it is waiting for its expression to go true. It is recommended that you use WaitUntil as the last expression in a process block. If an Invoke is used ahead of it, the Invoke will time out before it moves to WaitUntil. Reversing the order causes unpredictable action.

When(“Capability”) Used with a Part Flow Model to determine if a capability is complete. It returns a True if the capability has reached its upper limit (usually 100). It only works with a resource whose capability is bound to a Sense action.

Function Description

RSTestStand.book Page 157 Friday, September 10, 2004 3:22 PM

Page 169: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

158

• •

• •

RSTestStand.book Page 158 Friday, September 10, 2004 3:22 PM

Page 170: tstent-gr001_-en-p

159

D

D • Built-in procedures for the TestScriptEditor

Built-in procedures for the TestScript Editor

TestScript Editor and Flowchart Editor procedures

TestScript Editor proceduresThese procedures are only available in the TestScript Editor.

Procedure Description

GetVar (“VariableName”) Returns the value of the named resource variable to a VBScript. This function is used in a Local VBScript Module to interact with variables defined in the resource property dialog box. See PutVar for the corresponding write operation.

Halt Temporarily pauses the entire simulation. Clicking Pause resets Halt and allows the simulation to continue. Use Halt to freeze your simulation as a way of trapping error conditions in your model.

OutputMsg (MyVar) Outputs the value of MyVar to the Output Message Window at the bottom of the screen. You can use this function to send text and values from within your running application. You can output fixed text by enclosing the text in quotes. Whenever OutputMsg is executed, it will send its argument to the Output Message Window.

PutVar “VariableName” value

A subroutine used in a Local VBScript Module that writes the value parameter to the named resource variable. This function is used in a Local VBScript Module to update variables defined in the resource property dialog box. See GetVar for the corresponding read operation.

Procedure or property Description

Function ForceVar (VarName, Value)

Sets a force with the value “Value” on the variable named by VarName. Returns true if successful; false otherwise.

Function UnForceVar (VarName)

Removes a force from the variable named by VarName. Returns true if successful; false otherwise.

Sub Unload(Form) A subroutine that closes the form referenced by Form.

RSTestStand.book Page 159 Friday, September 10, 2004 3:22 PM

Page 171: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

160

• •

• •

Property ComponentName

An intrinsic property that contains the name of the currently running test. It is read-only.

Property Simulating An intrinsic property that is true if a simulation is running; false otherwise. It is read-only.

Property TestState An intrinsic property that can contain one of three strings: Incomplete, Fail, or Pass, indicating the current state of a test. It is read/write.

Function CompileExpression (expression)

A function that compiles the expression in the string expression into a form that VBS can execute directly. You need to use this if your expression references variables in a RSTestStand Enterprise simulation model.

Property SimulationTime An intrinsic property that contains the number of seconds that a simulation has been running as a floating point number. It is read-only.

Function ListVariableNames (expression)

A function that can take a string expression and return a string containing a comma separated list of all the variable names found in the expression.

Function OutputLog (message)

A function that can write the string contained in message out to the currently selected log file.

Procedure or property Description

RSTestStand.book Page 160 Friday, September 10, 2004 3:22 PM

Page 172: tstent-gr001_-en-p

D • Built-in procedures for the TestScript Editor

161

• • • • •

D • Built-in procedures for the TestScriptEditor

Class formsClass forms is an intrinsic collection of all forms in a Test. It contains the following properties and functions.

Class controlsA collection of controls within a form. It contains the following functions and properties:

Function or Property Description

Function Add (FormType) Adds a form called FormName to the global collection of forms. Returns a reference to the form. Note that you must use the “Set” verb in VBScript to receive the returned form reference.

Property Count Contains a count of how many controls or forms are currently in the collection. This property is read-only.

Property Item (Which) A property that returns a reference to the control or form described by Which. Which can be an integer or a string name. If the desired control or form cannot be found, a null reference is returned. This property is read-only.

Function or Property Description

Function Add (CtrlType) Adds a control of type CtrlType to the collection of controls. Returns a reference to the control. Note that you must use the “Set” verb in VBScript to receive the returned control reference. The valid strings for CtrlType are:

TextBox

Label

Frame

CommandButton

CheckBox

OptionButton

ListBox

ComboBox

Property Count Contains a count of how many controls or forms are currently in the collection. This property is read-only.

Property Item (Which) Returns a reference to the control described by Which. Which can be an integer or a string name. If the desired control cannot be found, a null reference is returned. This property is read-only.

RSTestStand.book Page 161 Friday, September 10, 2004 3:22 PM

Page 173: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

162

• •

• •

Class formA class that, when instantiated, is a form (dialog box) on the screen. Note that a class that represents a form must contain a Class_Initialize that builds its controls collection and a Class_Terminate sub that unloads it. A form contains the built-in functions and properties listed in the following table.

Function or Property Description

Sub Show() Shows a form (dialog box) on the screen.

Sub Hide() Hides a form.

Sub RegisterClickEvent

(RefControl,SubName)

Tells the form to call the VBS subroutine named “SubName” when the control referenced by RefControl is mouse clicked. The subroutine named by “SubName” should be declared as:

Public Sub Button_Click(BtnName). The name of the button clicked is passed in BtnName.Sub RegisterVarChangeEvent(RefObj, VarNameList, SubName): Tells the form to call the VBS subroutine named by “SubName” within the object RefObj whenever one of the variables named in VarNameList changes value. Note that the subroutine named by “SubName” should be declared as: Public Sub Var_Change(Value). The new value of the variable is placed in “Value”. Also note that the string VarNameList can be a comma separated string containing multiple variable names. See the description of the intrinsic ListVariableNames function above.

Sub UnRegisterVarChange-

Events()Unregisters all variable change events for this form.

Function Browse (BrowseWhat)

Invokes the Resource Browser dialog box and returns the user’s selection as a string (if click OK). Note that “BrowseWhat” should be a string that is set to “Variables.”

Function Validate() Usually used when not simulating. Tells the form to validate and save away the user’s selections and keyboard input on the controls of the form. It returns true if successful; false otherwise.

Function InitializeControls Usually called from the form’s Class_Initialize subroutine.

Property Count Contains a count of how many forms are currently in the collection. This property is read-only (cannot be written).

RSTestStand.book Page 162 Friday, September 10, 2004 3:22 PM

Page 174: tstent-gr001_-en-p

D • Built-in procedures for the TestScript Editor

163

• • • • •

D • Built-in procedures for the TestScriptEditor

Class controlA class that represents a single control in a form. It contains the following functions and properties.

Property Item

(Which)

A property that returns a reference to the form described by “Which.” “Which” can be an integer or a string name. If the desired form cannot be found, then a null reference is returned. This property is read only (cannot be written).

Property Name A string that contains the form’s name. It is read/write.

Property Left A number that represents the position of the left edge of a form in twips. It is read/write.

Property Top A number that represents the position of the top of a form in twips. It is read/write.

Property Height A number that represents the total height of a form in twips. It is read/write.

Property Width A number that represents the total width of a form in twips. It is read/write.

Property Caption A string that is the title of a form. It is read/write.

Property Controls A reference to a collection that contains all of the controls on a form. It is read only. See “Class control” on page 163.

Property hWnd The MS Windows window handle. It is a long numeric value and is useful when calling into the Win32 API. It is read-only.

Function or Property Description

Sub AddItem

(ItemName)

If a control is created with the types “ListBox” or “ComboBox”, this will add the string in “ItemName” to the ListBox or ComboBox.

Sub RemoveItem

(ItemIndex)

If a control is created with the types “ListBox” or “ComboBox”, this will remove the item with the index “ItemIndex” from the ListBox or ComboBox.

Property Name A string that contains the control’s name. It is read/write.

Property Left A number that represents the position of the left edge of a control in twips. It is read/write.

Function or Property Description

RSTestStand.book Page 163 Friday, September 10, 2004 3:22 PM

Page 175: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

164

• •

• •

Property Top A number that represents the position of the top of a control in twips. It is read/write.

Property Height A number that represents the total height of a control in twips. It is read/write.

Property Width A number that represents the total width of a control in twips. It is read/write.

Property Caption A string that is the text of a control. It is read/write.

Property Text A string that is the text of a control. It is read/write.

Property Tag A free-format string that can be used to identify a control. It is read/write.

Property ListCount If a control is created with the types ListBox or ComboBox, this property contains the count of the number of strings (items) in the ListBox or ComboBox. It is read-only.

Property ListIndex If a control is created with the types ListBox or ComboBox, this property contains the currently selected string in a ListBox or ComboBox. It is read/write.

Property Enabled Indicates whether a control is enabled for input (true) or not and grayed out (false). It is read/write.

Property Locked Indicates whether a control is locked for input (true) or not (false). It is read/write.

Property Visible Indicates whether a control is visible (true) or not (false). It is read/write.

Property Multiline If a control is created as a TextBox, this property determines whether the control is a single line (false) or multiple line edit box (true). It is read/write.

Property Value If a control is created as an OptionButton or a CheckBox, this property determines if it is selected (true) or not (false). It is read/write.

Property BorderStyle This determines if a control has a border around it (1) or not (0). It is read/write.

Property List

(ItemIndex)

If a control is created with the type ListBox or ComboBox, this property contains and sets the text at item ItemIndex. It is read/write.

Function or Property Description

RSTestStand.book Page 164 Friday, September 10, 2004 3:22 PM

Page 176: tstent-gr001_-en-p

165

E

E • Glossary

GlossaryAnimation. Animation is the capability to depict a computer-based visual presentation showing the motion of a model. Distinct from a “simulation,” but often supplied as a feature of a simulation. The 3D Animation Editor provides limited visualization — with the intent being to achieve a balance between low-effort user development with a maximum amount of visual feedback.

Assembly. An assembly, or resource assembly, is a hierarchic aggregation of resources that can be saved and reused in a library.

Assembly (animation). Logical groupings of components in a scene that can have animation paths.

Built-in Functions. Built-in Functions are functions and subroutines that operate in the VBS syntax but are provided by RSTestStand Enterprise. Many of the Standard Library elements use Built-in Functions and can be referenced as examples by your flowcharts.

Capabilities. A capability is an action that a resource can perform. Since all actions manifest themselves as some duration in a simulation, the capability is configured by giving it a time. Capabilities interact with the flowchart through special functions in the flowchart, such as MoveLinear. See also System Functions.

Code Modules. See Local VBScript Modules.

Color. Color is an animation property of a 3D animation object. It is controlled by binding it to a variable in a resource. The color behavior is governed by a 32-bit value (dint) that represents the red, green, and blue components of the color. The easiest way to create this value is to use the VBScript function RGB(r, g, b), where the parameters r, g, and b are values between 0 and 255. The following would set the variable color to green in a resource flowchart: Var_color = RGB(0, 255, 0).

Connection Diagrams. Connection Diagrams provide a different way to look at resources and how they work. They emphasize the data flow of an application rather than the hierarchic structure, which the Project Model tree represents. You can place Connection Diagrams any place in the Project Model tree.

Connections. Connections occur between variables. They can be fanned out so that one variable is connected to multiple other variables. There is no type checking between variables, but we recommend connecting variables of the same type.

RSTestStand.book Page 165 Friday, September 10, 2004 3:22 PM

Page 177: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

166

• •

• •

Data Scope. The Data Scope feature provides functions similar to a digital oscilloscope, allowing you to graph both Boolean and analog data values in a variety of formats. It gives you a dynamic view into your process by graphing multiple variables on the same timebase, or scale, with a high degree of accuracy. Timebases can be continuous, time periodic, or event periodic.

Flowchart. A flowchart is a diagrammatic way of showing program flow for a computer program. Typically, flowcharts consist of Start Blocks, Decision Blocks, Process Blocks, and End Blocks. Decision Blocks, based on statements that evaluate True or False, direct the execution of the program by sending program control down different paths.

Folder. A folder is used in the Project Model to help organize the hierarchic view. It is also used to launch the Animation Editor.

Force. Forcing a variable assigns a fixed value to the variable. The value cannot be overwritten from other points in the system. Forcing is used to simulate faults in a normally running process. Forces are set through Watch Windows.

Libraries. Libraries are collections of elements that are used as basic building blocks for your application. There are four types of libraries: a Standard Resource library, an Op Console Devices library, User libraries, and Graphics Libraries. You can create, add to, and modify User libraries.

Linear Movement. Linear movement is an animation property of an object used in the 3D animation system.

Local VBScript Module. Local VBScript Modules are a way of directly executing Visual Basic Script. Variables that are created in a Local VBScript Module are scoped for that resource alone, so multiple instances of resources using a copy of a given Local VBScript Module are possible.

Model. A model is a representation of a process or equipment. In RSTestStand Enterprise, it refers to the collection of resources that contains programs and variables that mathematically encode the behavior of the things they stand for. The degree of fidelity of a model is usually based on the amount of effort you spend in developing the programs necessary to replicate the observed behavior of what the model is trying to represent and the accuracy of your original observations. See also Simulation.

Operator Console. An Op Console is a model of a physical panel equipped with buttons, selector switches, and pilot lights that is used by an operator to initiate motion, change operational modes, or receive notification of important conditions.

OPC. OLE for Process Control (OPC) is an optimized protocol implemented by RSLinx and others to communicate between a client and server. RSTestStand Enterprise is an OPC client and requires an OPC implementation based on version 2.0 of the specification. RSLinx 2.3 or higher supports OPC 2.0.

RSTestStand.book Page 166 Friday, September 10, 2004 3:22 PM

Page 178: tstent-gr001_-en-p

E • Glossary

167

• • • • •

E • Glossary

OPC Console Device. A resource that can only be used within the context of an operator console.

OPC Tag. The OPC tag is the address the system uses to communicate to a PLC.

Output Message Window. One of the views available in RSTestStand Enterprise. It displays messages, capabilities, and image properties during runtime and is the primary communication vehicle between you and the test stand itself.

Part Flow Model. The Part Flow Model provides a system view of the testing environment. It allows multiple unit tests to be integrated using the model of a part moving through the system as its base level. Tools are provided that allow easy integration of part-in-place sensors to provide appropriate feedback to the control system.

Project Model. The Project Model is represented hierarchically using a tree structure. It includes resources, groups of resources, and Operator Consoles (which are special types of resources).

Resources. A resource is the fundamental unit of behavior for the Project Model. Resources can be grouped hierarchically in the Project Model tree and then saved based on the top level of the resource assembly. Resources are made up of a logic view (which contains a group of flowcharts); variables that interact with the flowchart, other resources, and the PLC; and capabilities. See also Capabilities.

Resource Definition. The definition of a resource as it exists within a library.

Scan Time. The length of time it takes the interpreter to return to its starting point. It is not the interval between service times of any given block, which will be dependent on the number of flowcharts and blocks per flowchart. It can be viewed on the status bar during Run mode.

Scene. A scene is a collection of assemblies with an associated view and 3D coordinate system.

Simulation. The process of letting a model evolve over time. Models that are dynamic can execute a simulation.

Source. Source indicates an input device to a PLC, where RSTestStand Enterprise is providing state information to the PLC.

Standard Resources Library. The Standard Resources Library is a collection of resources that are supplied as part of RSTestStand Enterprise. You can pull any element from the library, use it as is or modify it, and save it back to your own library. The flowcharts document the behavior of the various elements.

System Functions. System Functions are functions and subroutines that operate within the VBScript syntax but are provided by RSTestStand Enterprise. Many of the Standard Resources Library elements use System Functions and can be referenced as examples.

RSTestStand.book Page 167 Friday, September 10, 2004 3:22 PM

Page 179: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

168

• •

• •

TestScripts. A mechanism for creating a procedural testing methodology. Each TestScript contains one or more tests, each of which can either be configured from a set of forms or custom written using VBS.

Transparency. Transparency controls the opacity of an image. The valid range of Transparency values are from 0 to 255, where 255 is completely opaque.

Twip. An absolute unit of measurement (such as an inch or a centimeter). A twip is 1/440 of an inch.

Variables. Variables are containers with names. A program references the current value in a variable by calling its name.

Visual Basic Script. Visual Basic Script (VBScript) is a Microsoft technology that is based on Visual Basic. It is an interpreted language and is meant to be embedded in applications to provide a high degree of flexibility. RSTestStand Enterprise uses VBScript to execute the program statements in its flowcharts. Syntax rules for VBScript apply to RSTestStand Enterprise’s flowcharts.

Wallpaper. A bitmap image that is added to the background of a display field. Wallpaper for an Operator Console can enhance the look and feel of the Op Console by creating visual references to the operating devices.

Watch Window. A Watch Window displays the runtime value of variables of a selected resource. You can have multiple Watch Windows active at the same time. You can also Force values from the Watch Window.

XML. eXtended Markup Language. This language has been developed by a consortium of users to provide a structured and flexible interchange format so that different and dissimilar applications can exchange data.

RSTestStand.book Page 168 Friday, September 10, 2004 3:22 PM

Page 180: tstent-gr001_-en-p

INDEX

169

• • • • •

Index

Numerics2-state feedback device 423D animation 43

troubleshooting 1403D Rendering Properties 14

Aactivation

damaged 145file 143installing 5key 143moving 146resetting 145troubleshooting 145utilities 145

Add (function) 161Adding behavior to part flow model 101AddItem 163animation

3D 140Controls 53Editor 43objects, connecting variables 49positioning 46

anti-virus software 143applications, sample 5array

connect to OPC array 31array, redim 136assembly

add to scene 43Watch Windows 53working with 55working with multiple 49

attachlibrary 98Resource Library to project 98

attributes 22, 24Auto Arrange (Operator Console) 37, 95averages, recording 69

Bbitmap, add to Operator Console 37

BorderStyle (property) 164Browse (function) 162buffer 106button, maintained 35

Ccapabilities 22

monitoring during runtime 78removing 31resource 31using 102

Caption (property) 163, 164CHECKDRIVES 143, 145Class Control 163Class Form 162Code Module Block see Local VBScript

Module 85, 119coil 40Comment Block 84communications

OPC 131Properties 15troubleshooting problems 137

CompileExpression (function) 160component

Watch Windows 53working with 55

ComponentName (property) 160compressing the hard drive 143computer, recommended 3Connection Diagram 87

add resource to 87creating 87New 10OPC tag connections 88printing 88

Connection Tool 85, 101continuous process icon 23, 96Control icon 23, 96controllers 109ControlLogix and data source 57Controls (property) 163conveyor 106copy protection 143Count (property) 161, 162

RSTestStand.book Page 169 Friday, September 10, 2004 3:22 PM

Page 181: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

170

• •

• •

custom functionality for devices 35

DData Scope feature 57data source

high speed 57set up 57simulation 57

debugging logic behavior 135Decision Block 83defragmentation utilities 143deleting the software directory 146demo mode 5detach library 98device, custom functionality 35, 42Diagram, New Connection 10Disable Resource Flowchart 15display, OpenGL 140disposer 107documentation, about 2DoUntil 153DoWhile 153

Eeditor, flowchart 81EDX file, importing 121emergency stop 39Enabled (property) 164End Block 84Equipment, folder 9error codes 147EvMove 144execution speed of RSEmulate 5000 79export

files using XML 122Project Model data 19projects 121simulation data 79

expression, creating Visual Basic Script 33eXtended Markup Language 121

Ffeedback device, 2-state 42find feature 17float window 78

flowchartdisable for resource 15logic for resource 21printing 86troubleshooting 137

Flowchart Editor 81functions 153procedures 153using 81

folderabout 9adding 12Equipment 9icon P 100properties 15remove 15rename 15

force variable values 76ForceVar (function) 159form, configuration of standard 126Forms collection 126frame

add 47key 47

Function 120Add 161Browse 162CompileExpression 160ForceVar 159InitializeControls 162ListVariableNames 160OutputLog 160UnForceVar 159Validate 162

Function Picker 33functions

Flowchart Editor 153TestScript Editor 159

Ggenerator 103Generic icon 23, 96GetVar 154, 159Glossary 165Graphics Library 92

RSTestStand.book Page 170 Friday, September 10, 2004 3:22 PM

Page 182: tstent-gr001_-en-p

INDEX

171

• • • • •

Index

GraphicsLib 92groups (OPC) 133

HHalt 154, 159hard drive space 3hardware

acceleration 14recommendations 3requirements 3

Height (property) 163, 164high speed

data source 57data, running too slow 60

histogram 59set up 65viewing 69

hold down multiple 40hWnd (property) 163

Iimport

EDX file 121graphics from Solidworks 55Project Model data 18projects 121RSTestStand files 121RSTestStand projects 122simulation data 79, 80textures 37, 94XML 121

Inactive Resources 10indicator lamp 39information, additional 141InitializeControls (function) 162installation 3, 4interact

with simulation 75with the PLC logic 139

Interlock Form 126, 130Invoke 154invoke (capability) 102Item (property) 161items (OPC) 133

Kkey frame 47KEYDISK 145

LLED display 39Left (property) 163library

add resource definition 95attach to project 98create your own 94creating 91, 94detach 98Graphics 92Operator Console Devices 91, 92remove resource definition 97resource definition, parameterizing 96resources 22save to 15saving 98Standard Resource 91, 92use resource definition 98using 91

List (property) 164ListCount (property) 164ListIndex (property) 164ListVariableNames (function) 160Local VBScript Module 85, 119locations 104Locked (property) 164log file 123

TestScripts 126logic

behavior 22debugging 135

flowchart 21

Mmaintained pushbutton, setting temporary 40Manual Form 126master disk 143mechanical icon 23, 96merge

RSTestStand projects 122

RSTestStand.book Page 171 Friday, September 10, 2004 3:22 PM

Page 183: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

172

• •

• •

XML 121merge Operator Console Devices 39message display device 40meter 40model

part flow 99project, creating 7project, working with 15

momentary pushbutton, act maintained 40monitor capabilities 78MoveLinear 102, 155movers 105moving, activation 146Multiline (property) 164multiple

assemblies 49hold down 40Instantiation, about 95

multiplexer 105

NName (property) 163New Connection Diagram 10New Inactive Resources 10normals, recording 69

Oonline help 141OPC 25

communications 131scan, disable during runtime 15tag

connections, Connection Diagram 88OpenGL 3

compatibility 140display 140hardware acceleration 14

operating system requirements 3Operator Console 35

adding 12, 36Auto Arrange 37devices 39

library 91, 92float window 78merging 39

properties 15wallpaper 37

oscilloscope functionality 57Output Message Window 77

error codes 147reopen 78troubleshooting with 135

OutputLog (function) 160OutputMsg 155, 159

PP folder icon 100Pan Floor 45parameterizing library resource definition 96parent-child ordering 21part

disposer 107generator 103locations 104movers 105sensor switch 107

Part Flowmodel 99

adding behavior 101creating 100laying out 100running 103

path, add 47PLC logic, interacting with 139Poll rates 133Position 156

animation 46capability 102

PowerUp 156print

Connection Diagram 88flowchart 86XREF 9

procedures, Flowchart Editor 153Process Block 83project

exporting 121importing 121

RSTestStand 122Project Model

RSTestStand.book Page 172 Friday, September 10, 2004 3:22 PM

Page 184: tstent-gr001_-en-p

INDEX

173

• • • • •

Index

creating 7data export 19data import 18print 9window 9working with 15

properties 15folder 15Operator Console 15

PropertyBorderStyle 164Caption 163, 164ComponentName 160Controls 163Count 161, 162Enabled 164Height 163, 164hWnd 163Item 161Item(Which) 163Left 163List 164ListCount 164ListIndex 164Locked 164Multiline 164Name 163Simulating 160SimulationTime 160Tag 164TestState 160Text 164Top 163, 164Value 164Visible 164Width 163, 164

Pulse (Variable) 156push button 40PutVar 156, 159

Qquote marks from other programs 137

RRAM 3

Random Fault Form 126, 127rate

sample 58update 58

redim array 136RegisterClickEvent 162RegisterVarChangeEvent 162remove

folder 15resource 15

RemoveItem 163rename

folder 15resource 15

rendering properties 14replace text 17resetting activation 145resource 15

add to Connection Diagram 87adding 12, 21assembly 21attributes 24capabilities 31category

continuous process 23, 96control 23, 96generic 23, 96mechanical 23, 96structural 23, 96

changing 22definition

add to library 95generic 96parameterizing 96remove from library 97using 98

flowchart logic 21inactive 10library 22modifying 22placing Watch Window 75properties 15remove 15rename 15user-defined, creating 22variables 26

RSTestStand.book Page 173 Friday, September 10, 2004 3:22 PM

Page 185: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

174

• •

• •

wiring 25Resource Library

attach to project 98detach from project 98

Resource_Export 156Resource_Import 157Resource_Update 157restoring from backup 143Rockwell Software, contacting 141RSAutomation Desktop iiRSEmulate 5 25RSEmulate 5000 execution speed 79RSLinx 25RSTestStand

importing 121merging 122overview i

RSTestStand Enterpriseinstallation 3starting 5

Rule View 59save data to file 70set up 65toolbar commands 68using 67

rule, set up individual 66run-only option 80

Ssample applications 5Sample Rate 58save

data to file 70run-only 80to Library 15

scan once 79scene

add assembly 43working with 51

search and replace 17selector switches 41serial number 4Simulating (property) 160simulation 73

affect on views 60

data export 79data import 79, 80data source 57error codes 148hints 78interacting with 75starting 73

SimulationTime 157property 160

slider 41smart quotes 137Snapshot Form 126, 129software OpenGL emulation 14software requirements 3Solidworks import graphics 55speed, RSEmulate 5000 79standard forms, configuration 126Standard Resource library 91, 92Start Block 82start RSTestStand Enterprise 5stop, emergency 39strip chart 41Structural icon 23, 96Sub Hide 162Sub Show 162Sub Unload 159Subroutines 120support, technical 141switch, part sensor 107system functions, TestScript editor 159system requirements 3

TTag (property) 164technical support services 141Test Animation 48Test Log 123Test, setting up and using manual 124TestScript 123

create 123editing 124Editor, functions 159log file 126running 125

TestState (property) 160

RSTestStand.book Page 174 Friday, September 10, 2004 3:22 PM

Page 186: tstent-gr001_-en-p

INDEX

175

• • • • •

Index

Text (property) 164text box 42textures 93

import 37use as wallpaper 37

thumb wheel 42timebase parameters 59toggle switch 42Top (property) 163, 164topic names 132Trace View 59

save data to file 70setting up 60toolbar commands 63using 63

training using run-only 80troubleshooting 135, 141

activation 145communication problems 137

Uuncompressing the hard drive 143UnForceVar (function) 159uninstall 4UnRegisterVarChangeEvents 162update rate 58upgrading the operating system 143user resource library 94user-defined resources, creating 22

VValidate (function) 162Value (property) 164variable 22

connectinginternally 27to animation objects 49

forcing values 76resource 26

updates 133Watch Window, troubleshooting with 135

VGA graphics adapter 3View

save data to file 70set up rule 65setting up Trace 60

viewrule 59rule toolbar commands 68set up 59

individual rules 66trace 60

trace 59toolbar commands 63

using rule 67using trace 63

Visible (property) 164Visual Basic Script, edit TestScripts 124

Wwallpaper (Operator Console) 37Watch Window

assembly 53component 53placing 75troubleshooting with 135

Width (property) 163, 164Windows

2000 3XP 3

wiring resources 25

XXML 121

exporting files 122importing 121merging 121

RSTestStand.book Page 175 Friday, September 10, 2004 3:22 PM

Page 187: tstent-gr001_-en-p

RSTESTSTAND ENTERPRISE GETTING RESULTS GUIDE

176

• •

• •

RSTestStand.book Page 176 Friday, September 10, 2004 3:22 PM