User Manual BridgeVIEW User Manual May 1998 Edition Part Number 321294C-01
Internet Support E-mail: support@natinst.com FTP Site: ftp.natinst.com Web Address: http://www.natinst.
Important Information Warranty The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty period.
Contents About This Manual Organization of This Manual ............................................................................................... xix BridgeVIEW Concepts.......................................................................................... xix G Tutorial ............................................................................................................... xx Appendices, Glossary, and Index ..........................................................................
Contents Chapter 2 BridgeVIEW Environment What Is G?........................................................................................................................... 2-1 How Does G Work? ............................................................................................................ 2-1 Virtual Instruments ............................................................................................... 2-2 Front Panel......................................................................
Contents What Is the Tag Configuration Editor?................................................................................3-3 How Do You Create a Tag? ..................................................................................3-5 How Do You Edit a Tag? ......................................................................................3-5 How Do You Delete a Tag? ..................................................................................3-5 What are Network Tags? .......................
Contents Alarms ................................................................................................................. 3-31 How Do You Configure Alarms for a Tag? ......................................... 3-34 Analog Tags ........................................................................... 3-34 Discrete Tags.......................................................................... 3-35 Bit Array Tags........................................................................
Contents General Principles of G HMI Programming......................................................................4-25 How Do You Implement Event-Driven Programming in G?..............................4-25 How Do You Implement Polled Programming in G? .........................................4-27 How Do You Initialize and Shut Down Multiple-Loop Applications?...............4-28 How Do You Display Real-Time Trends? ..........................................................
Contents How Do You Change the Y Axis? ....................................................... 6-12 How Do You Change the Plot Colors and Style in the Trend? ............ 6-13 How Do You Zoom In on the Trend?................................................... 6-13 How Do You Export Data to a Spreadsheet? ....................................... 6-13 How Do You Get Online Help for the HTV?....................................... 6-13 How Do You Set Tag, Time, and Color Preferences?..........................
Contents How Do You Programmatically Log an Operator In to Your Application?..........................................................................7-17 How Do You Programmatically Log an Operator Out of Your Application?..........................................................................7-17 How Do You Identify the Current Operator? .......................................7-17 How Do You Restrict Access to the BridgeVIEW Environment? .......7-17 How Do You Create and Modify User Accounts? .........
Contents PART II G Tutorial Chapter 9 Creating VIs What is a Virtual Instrument?.............................................................................................. 9-1 How Do You Build a VI?.................................................................................................... 9-1 VI Hierarchy ......................................................................................................... 9-1 Controls, Constants, and Indicators ..............................................
Contents Shift Registers..................................................................................................................11-11 Using Uninitialized Shift Registers ...................................................................11-15 For Loops .........................................................................................................................11-20 Numeric Conversion..........................................................................................
Contents Chapter 16 Program Design Use Top-Down Design ...................................................................................................... 16-1 Make a List of User Requirements ..................................................................... 16-1 Design the VI Hierarchy ..................................................................................... 16-1 Create the Program..............................................................................................
Contents Figure 2-6. Figure 2-7. Figure 2-8. Select Tags to Monitor Dialog Box...........................................................2-22 Write to Tag dialog box.............................................................................2-22 Tag Monitor Preferences Dialog Box .......................................................2-23 Figure 3-1. Figure 3-2. Figure 3-3. Figure 3-4. Figure 3-5. Figure 3-6. Figure 3-7. Figure 3-8. Figure 3-9. Figure 3-10. Figure 3-11. Figure 3-12. Figure 3-13.
Contents Figure 8-1. Figure 8-2. Figure 8-3. Figure 8-4. Figure 8-5. Server Browser............................................................................................ 8-6 View Server Information Dialog Box......................................................... 8-7 Browse OPC Servers on Network Dialog Box ........................................... 8-8 Server Browser.......................................................................................... 8-11 View Server Information Dialog Box.
Contents Activities Activity 2-1. Open and Run a VI......................................................................................2-8 Activity 3-1. Configure a Tag, and View the Tag Configuration Parameters and Tag Values .......................................................................3-40 Activity 4-1. Use the HMI G Wizard ...............................................................................4-8 Activity 4-2. Import a Graphic Image into BridgeVIEW ...............................
About This Manual The BridgeVIEW User Manual contains the information you need to get started with the BridgeVIEW software package. This manual explains the BridgeVIEW environment, tag configuration, human machine interfaces, alarms and events, and historical data logging and extraction. This manual also reviews the concepts of G programming.
About This Manual programming language upon which BridgeVIEW is built, the BridgeVIEW Engine Manager, system errors and events, the Tag Monitor utility, and the Tag Browser utility. This chapter also explains how to access online help for BridgeVIEW and provides an activity that illustrates how to examine the front panel and block diagram of a virtual instrument (VI). • Chapter 3, Tag Configuration, explains tags, the Tag Configuration Editor, and how you edit tags within the BridgeVIEW system.
About This Manual • Chapter 12, Case and Sequence Structures and the Formula Node, introduces the basic concepts of Case and Sequence structures, and provides activities that explain how to use the Case structure, how to use the Sequence structure, and what sequence locals are and how to use them.
About This Manual Conventions Used in This Manual The following conventions are used in this manual: bold Bold text denotes a parameter, menu name, palette name, menu item, return value, function panel item, or dialog box button or option. italic Italic text denotes mathematical variables, emphasis, a cross reference, or an introduction to a key concept. bold italic Bold italic text denotes an activity objective, note, caution, or warning.
About This Manual This icon to the left of bold text denotes the beginning of an activity, which contains step-by-step instructions you can follow to learn more about BridgeVIEW. This icon to the left of bold text denotes the end of an activity, which contains step-by-step instructions you can follow to learn more about BridgeVIEW. This icon to the left of bold italicized text denotes a note, which alerts you to important information.
Part I BridgeVIEW Concepts This section contains information about the BridgeVIEW environment, tag configuration, Human Machine Interface, alarms and events, historical data logging and extraction, servers, and advanced application topics such as system control and security. Part I, BridgeVIEW Concepts, contains the following chapters. • Chapter 1, Introduction, describes the unique BridgeVIEW approach to Human Machine Interface (HMI) and Supervisory Control and Data Acquisition (SCADA).
Part I BridgeVIEW Concepts BridgeVIEW User Manual • Chapter 6, Historical Data Logging and Extraction, explains the concept of a trend, how to log and extract historical data, and how to use the Historical Trend Viewer (HTV), a utility that displays historical data that has been logged to disk with BridgeVIEW. • Chapter 7, Advanced Application Topics, explains BridgeVIEW Environment Securitythe advanced topics you need to understand to make optimum use of BridgeVIEW for developing applications.
1 Introduction This chapter describes the unique BridgeVIEW approach to Human Machine Interface (HMI) and Supervisory Control and Data Acquisition (SCADA). It also contains system configuration, installation instructions, and basic information that explains how to start using BridgeVIEW to develop industrial automation applications. This chapter refers you to other chapters or manuals for more information.
Chapter 1 Introduction Required System Configuration BridgeVIEW is distributed on a CD-ROM that includes the complete BridgeVIEW 2.0 release. The Windows 95/NT version of BridgeVIEW runs on any system that supports Windows 95 or Windows NT 4.0. A minimum of 24 MB of RAM is required for this version to run effectively. We recommend 32 MB of RAM and at least 30 MB of swap space available on your system. Note The standard BridgeVIEW installation requires approximately 110 MB of disk space.
Chapter 1 Introduction What Is BridgeVIEW? BridgeVIEW is a software package specifically targeted at industrial automation applications. BridgeVIEW provides configurable solutions for common HMI and SCADA functions while leveraging the flexibility of graphical programming. BridgeVIEW is built around the G programming language, created by National Instruments Corporation. With BridgeVIEW, you can acquire data and control one or more distributed devices in an overall facility.
Chapter 1 Introduction information, acknowledge alarms, view real-time trends and retrieve historical data. For more information about how to get started with BridgeVIEW, see the Where Should I Start? section at the end of this chapter. G Programming G is the easy-to-use graphical data flow programming language BridgeVIEW is based upon. G simplifies scientific computation, process monitoring and control, test and measurement, and a wide variety of other applications.
Chapter 1 Introduction • Attribute Nodes—Attribute nodes are special block diagram nodes that you can use to control the appearance and functional characteristics of controls and indicators. For more information about attribute nodes, refer to Chapter 13, Front Panel Object Attributes. • Arrays, Clusters and Graphs—An array is a resizable collection of data elements of the same type. A cluster is a statically sized collection of data elements of the same or different types.
Chapter 1 Introduction Connection Connection includes the following tag attributes: • Access rights (input only, output only, Input/Output, or memory) • Server name • I/O group name • Item name • Access path (for OPC servers) Scaling Scaling controls the type of scaling to perform on a tag when communicating with a device server, and the expected engineering range and units for the tag.
Chapter 1 Introduction Events An event is something that happens within the BridgeVIEW system. Events can be divided into two groups: those that pertain to individual tags and those that pertain to the overall BridgeVIEW system.
Chapter 1 Introduction What Is the BridgeVIEW System Architecture? The BridgeVIEW system contains three sets of processes: the user HMI Application, the BridgeVIEW Engine, and industrial automation device servers, as shown in Figure 1-1. These processes interact through a client-server relationship. HMIs VIs Tags BridgeVIEW Engine Real-Time Database Servers PLC DAQ OPC • EU Scaling • Alarming • Event/Alarm Logging • Trending Other (including DDE) Figure 1-1.
Chapter 1 Introduction with the BridgeVIEW Engine to read and write tag values, acknowledge alarms, access historical data, and read and write tag attributes. BridgeVIEW makes development of operator graphic displays easy and fast. Floating palettes provide controls and functions necessary to develop effective HMI and SCADA applications. The Controls palette provides a number of predefined objects, selected from the automation symbol library, for building your HMI.
Chapter 1 Introduction the value, the timestamp of when the item was sampled, and status information to the BridgeVIEW Engine. Output items are written on demand only when the BridgeVIEW Engine passes a new output value to the server. The device server monitors the items and encapsulates all device and hardware-specific details, thereby providing a hardware- and software-independent layer to the user HMI and SCADA application. For more information about device servers, see Chapter 8, Servers.
Chapter 1 Introduction (BridgeVIEW\Activity\Solutions) that contains the completed VIs for each activity in this manual. You can view the VI for an activity that you have not completed yet, or use the VIs in this directory as a means of verifying your work. Another good place to start is the Examples directory. Use the VI called readme.vi, at the top level of this directory, to browse through the available examples.
BridgeVIEW Environment 2 This chapter describes the BridgeVIEW environment. It explains the basic concepts behind G, the programming language upon which BridgeVIEW is built, the BridgeVIEW Engine Manager, system errors and events, the Tag Monitor utility, and the Tag Browser utility. This chapter also explains how to access online help for BridgeVIEW and provides an activity that illustrates how to examine the front panel and block diagram of a virtual instrument (VI).
Chapter 2 BridgeVIEW Environment Virtual Instruments VIs have both an interactive user interface and a source code equivalent, and accept parameters from higher-level VIs. VIs have three main parts: • The front panel • The block diagram • The icon/connector With these features, G promotes and adheres to the concept of modular programming. You divide an application into a series of tasks, which you can divide again until a complicated application becomes a series of simple subtasks.
Chapter 2 BridgeVIEW Environment Stop button—Aborts VI execution. Pause/Continue button—Pauses VI execution/Continues VI execution. Font ring—Sets font options, including font type, size, style, and color. Alignment ring—Sets alignment options, including vertical, top edge, left, and so on, for two or more objects. Distribution ring—Sets distribution options, including gaps, compression, and so on, for two or more objects.
Chapter 2 BridgeVIEW Environment Tools Palette BridgeVIEW has a floating Tools palette, which you can use to edit and debug VIs. You use the key to tab through the commonly used tools on the palette. If you have closed the Tools palette, select Windows»Show Tools Palette to display the palette. A shortcut for bringing up the Tools palette is to right click while pressing the key. The following illustration shows the Tools palette.
Chapter 2 BridgeVIEW Environment Controls Palette The Controls palette consists of a graphical, floating palette that opens when you launch BridgeVIEW. You use this palette to place controls and indicators on the front panel of a VI. Each top-level icon contains subpalettes. If the Controls palette is not visible, you can open it by selecting Windows»Show Controls Palette from the front panel menu.
Chapter 2 BridgeVIEW Environment Controls and Indicators Controls and indicators in G are similar to input and output parameters or graphs in traditional programming languages. BridgeVIEW contains a variety of controls and indicators that you can choose according to the kind of values or quantities you want to evaluate or display. You can configure all the controls and indicators using options from their pop-up menus.
Chapter 2 BridgeVIEW Environment Label Increment Buttons Digital Control Label Digital Indicator Boolean You use Boolean controls and indicators for entering and displaying Boolean (TRUE/FALSE) values. Boolean objects simulate switches, buttons, and LEDs. The most commonly used Boolean objects are the vertical switch and the round LED, shown below, found in the Boolean subpalette. String You use string controls and indicators for entering and displaying ASCII characters.
Chapter 2 BridgeVIEW Environment Tag You use tag controls and indicators for entering and displaying tag names or group names contained in the loaded tag configuration (.scf) file. You can find tag controls and indicators in Controls»String Table Tags. For more information about the tag data type, see the section Tag Data Type, in Chapter 4, Human Machine Interface. Activity 2-1. Open and Run a VI Your objective is to familiarize yourself with the basic concepts of virtual instruments.
Chapter 2 BridgeVIEW Environment 2. Run the VI by clicking on the Run button in the toolbar. The button changes appearance to indicate that the VI is running. 3. Use the Operating tool to change the values of the Inflow Rates and other controls. First, highlight the old value, either by double-clicking on the value you want to change, or by clicking and dragging across the value with the Labeling tool. When the initial value is highlighted, type a new value and press .
Chapter 2 BridgeVIEW Environment diagram as source code. The components of the block diagram represent program nodes such as For Loops, Case structures, and multiplication functions. The components are wired together to show the flow of data within the block diagram. The outermost structure in this diagram is the While Loop. It continues to run until the power switch is turned off.
Chapter 2 BridgeVIEW Environment Table 2-1. BridgeVIEW Project Menu Items (Continued) Project Menu Item Description Launch Engine Launches the BridgeVIEW Engine. The BridgeVIEW Engine manages the Real-Time Database, communicates with device servers, and performs alarm management and historical data logging. The BridgeVIEW Engine runs according to a configuration file called a .scf (SCADA Configuration File) file. You can create and edit .scf files using the Tag Configuration Editor.
Chapter 2 BridgeVIEW Environment Table 2-1. BridgeVIEW Project Menu Items (Continued) Project Menu Item Description Tag»Browser Launches the Tag Browser. You can use the Tag Browser to view information on all of the tags in the currently-loaded .scf file. If the BridgeVIEW Engine is not running, you can use the Tag Browser to load a different .scf file. For more information about the Tag Browser, see the section What Is the Tag Browser? in this chapter.
Chapter 2 BridgeVIEW Environment Table 2-2 provides a description of each of the fields in the Engine Manager dialog box. This table provides basic information about the Engine Manager dialog box options. For a more complete understanding of how or why you might use the Engine Manager in a BridgeVIEW application, you must understand how to configure tags. See Chapter 3, Tag Configuration. Table 2-2.
Chapter 2 BridgeVIEW Environment The Engine Manager shows the current state of the Engine, and has a System Event Display that shows the following: • BridgeVIEW System Events • When the Engine started and stopped • Which servers have been launched • Any System Errors that have occurred This information is written to the current BridgeVIEW System Log File, found in the BridgeVIEW\Syslog folder.
Chapter 2 BridgeVIEW Environment The Server Browser is shown in the following illustration. For more information about device servers, see Chapter 8, Servers. Figure 2-3. Server Browser The Show Server User Interface button appears on the Server Browser dialog box only when you invoke the Server Browser from the Engine Manager.
Chapter 2 BridgeVIEW Environment Detailed system error and event messages are logged to a system log file. The messages are written to an ASCII file with a .log extension in the SYSLOG directory. BridgeVIEW automatically creates this directory, if it does not exist already. The system log file names take the format, YYMMDDHHMM.log where YY = year, MM = month, DD = day, HH = hour, and MM = minute.
Chapter 2 BridgeVIEW Environment Table 2-3. Tag Browser Field Descriptions Field Description Configuration File Displays the name of the configuration file you are browsing. Browse If the BridgeVIEW Engine is not running, press this button to select a different configuration file. Location Displays the full path of the directory containing the configuration file you are browsing. Engine Status Displays the current state of the BridgeVIEW Engine, whether it is loaded, running or stopped.
Chapter 2 BridgeVIEW Environment Table 2-3. Tag Browser Field Descriptions (Continued) Field Description Zero Scale Displays the zero scale engineering value for the tag. This is displayed for analog tags only. Units Displays the engineering unit for the tag. This is displayed for analog tags only. If the BridgeVIEW Engine is loaded, you can view the tags currently loaded with the Tag Browser. If the BridgeVIEW Engine is not loaded, the Tag Browser displays the currently loaded .scf file.
Chapter 2 BridgeVIEW Environment Figure 2-5. Tag Monitor Utility Note Selecting the Tag Monitor from the Project menu automatically launches the BridgeVIEW Engine if it is not running already. Tag information is shown in a table format, sorted by tag name. When a tag has a non-zero tag status, the Status column indicates if the tag status is Warning or Error. Table 2-4 describes the fields and captions in the Tag Monitor Utility.
Chapter 2 BridgeVIEW Environment Table 2-4. Tag Monitor Utility Field Descriptions Field Descriptions Tag Display Table Alphabetically lists the information for tags you have selected, including the value, units, timestamp, status, alarm state and error, if any. For writable tags, which have a yellow background, clicking on the tag's value field brings up the Write to Tag dialog box, that lets you specify a new value for that tag.
Chapter 2 BridgeVIEW Environment Figure 2-6. Status Details Dialog Box With the Select Tags to Monitor dialog box, shown in Figure 2-7, you can select which tags to monitor and configure how often to refresh the monitor display. The Available Tags list box shows the tags not displayed in the Tag Display Table. By default, the timeout is set to 1.00 second. This controls how often the Tag Display Table is refreshed. By default, no tag is selected to trigger a refresh of the Tag Display Table.
Chapter 2 BridgeVIEW Environment Select Tag Monitor»Preferences to bring up the Tag Monitor Preferences dialog box, shown in Figure 2-8, which lets you choose how certain types of tags are displayed. You can control how the displayed precision for analog tags by modifying the Digits of Precision field. For bit array tags, the values can be in binary, octal, or hexadecimal format.
Chapter 2 BridgeVIEW Environment How Do You Access Online Help? Choose Help»Show Help. When you place one of the tools on a subVI node, the Help window shows the icon for the subVI with wires attached to each terminal. The following illustration shows an example of online help. This is the Acknowledge Alarm VI from the Functions»Alarms & Events subpalette. Simple/Complex Help View In the Help window, you can specify whether you want to display the simple or complex view for block diagram objects.
Chapter 2 BridgeVIEW Environment In the Help window, required inputs appear in bold text, recommended inputs appear in plain text, and optional inputs appear in gray text. When designing your own VIs, you can specify which inputs are required, recommended, or optional by popping up on an input or output on the connector pane and selecting the correct option from the This Connection Is submenu.
3 Tag Configuration This chapter describes tags, the Tag Configuration Editor, how you edit tags within the BridgeVIEW system, and includes an activity that illustrates how to use the Tag Configuration Editor. Before you can run a BridgeVIEW application, you must specify a tag configuration. What Is a Tag? A tag is a data value in the BridgeVIEW Engine. Tags can be used to monitor an I/O point, to store a result of a calculation based on other tags, or to monitor a tag on another BridgeVIEW Engine.
Chapter 3 Tag Configuration General Attributes General attributes include data type, maximum length for string and bit array tags, and the name, description, and tag group of the tag. The BridgeVIEW system supports four types of tags: analog, discrete, string, and bit array. These types differ by the inclusion of attributes within the operations, scaling, and alarm categories. The tag type is fixed when it is created. You must use the tag name to identify a particular tag.
Chapter 3 Tag Configuration Alarm Attributes Alarm attributes describe abnormal process conditions for a given tag. Alarms are useful for notifying users of abnormal conditions. For example, if an analog tag measures the volume of a tank, a HI alarm can be used to indicate that the tank is full and an operator must perform some action and acknowledge this state before processing can proceed. For information on how to configure alarming attributes of a tag, see the Alarms section later in this chapter.
Chapter 3 Tag Configuration Figure 3-1. Tag Configuration Editor The Tag Configuration Editor records all tag information and Engine parameters and stores this information in a BridgeVIEW Configuration File with the extension .scf (SCADA Configuration File). The BridgeVIEW Engine reads this file to determine all of the configuration parameters for execution.
Chapter 3 Note Tag Configuration Communication between the BridgeVIEW Engine and any device server is stopped temporarily when the Engine shuts down and restarts. How Do You Create a Tag? From the main panel of the Tag Configuration Editor, press one of the following buttons: Create Analog Tag(s)…, Create Discrete Tag(s)…, Create String Tag(s)…, or Create Bit Array Tag(s)…. A separate window prompts you to define a new tag. The tag name must be unique within a given configuration (.scf) file.
Chapter 3 Note Tag Configuration If you delete a tag and save the .scf file, the tag and its configuration information are removed from the .scf file. You still can retrieve historical and event information about the tag, but information such as the tag description, units, range, and alarm settings is lost. What are Network Tags? BridgeVIEW makes it easy to create distributed applications so more than one computer can be involved in an HMI application.
Chapter 3 Tag Configuration How Do You Add Network Tags? On the BridgeVIEW server, all tags in an allowed .scf file can be viewed by another BridgeVIEW system by opening the Tag Configuration Editor and selecting Configure»Allow Network Access. The tags are not shared until the .scf file is saved on the server side. On the BridgeVIEW client, open the Tag Configuration Editor and select File»Import Network Tags….
Chapter 3 Tag Configuration The default values apply when creating a new tag, importing a tag from the server registry, or importing a tag from a spreadsheet. In the case of spreadsheet, a value in the spreadsheet overrides the default value for the field. For more information about the individual fields, see the How Do You Configure Tags? section in this chapter.
Chapter 3 Tag Configuration For easy viewing and editing in the spreadsheet, press the Use Default Order button. After you edit the file, save it as a .txt file. Then, from the Tag Configuration Editor, select File»Import… to import the information from the spreadsheet file.
Chapter 3 Tag Configuration How Do You Configure Tags? When you configure a tag with the Tag Configuration Editor, you define several attributes for the tag. You can separate these attributes into five categories: general, connection, operations, scaling, and alarms. Each of these categories is explained in detail later in this section.
Chapter 3 Tag Configuration String Tags A string tag is an ASCII character representation of a connection to a real-world I/O point or memory variable. Use a string tag when you have binary information or an ASCII value. For example, you might use a string tag to obtain values from a bar code reader, or if you have data that does not fit into any other data type.
Chapter 3 Tag Configuration Table 3-1. General Configuration Attributes Attribute Applies to Data Types Description Tag Name all Determines the name of the tag you are configuring. Always refer to a tag by its name. Tag names are not case sensitive and can include any combination of printable characters (including space) with the exception of “/” (forward slash) and “\” (backslash). Tag Group all Determines the group name to use for this tag.
Chapter 3 Tag Configuration Figure 3-5. Tag Connection Dialog Box If a device server does not appear in the server name list, you must run the configuration or registration utility for your server before BridgeVIEW can access the server. Table 3-2 provides descriptions of the connection attributes, and indicates the data types to which each attribute applies. For tag attribute information about the other configuration categories, see Tables 3-1, 3-4, 3-5, or 3-7.
Chapter 3 Tag Configuration Table 3-2. Connection Configuration Attributes Attribute Applies to Data Types Description Data Type all Determines the data type of the tag you are configuring. BridgeVIEW tags can be analog, discrete, bit array, or string. Tag Access all Determines the access rights for a tag. Tags can have access rights of Memory, Input only, Output only, or Input/Output. Memory tags are not directly connected to real-world I/O points.
Chapter 3 Tag Configuration server uses devices, with only one device. A server can have multiple I/O Groups associated with it. I/O Group Configuration Options The Create… button invokes the I/O Group Configuration dialog box, which you can use to specify group name and timing parameters. For servers that support resource configuration, you also can use this dialog box to select and configure devices and to configure communication resources.
Chapter 3 Tag Configuration Table 3-3 provides descriptions of the operations that can be performed on an I/O Group. For information about other opeations that can be performed on an I/O Group, see Table 3-2. Table 3-3. I/O Group Configuration Attributes Description Attribute I/O Group Name Determines the name of the I/O Group you are configuring. I/O Group names are not case sensitive and can include any combination of printable characters (including spaces) with the exception of “/” and “\”.
Chapter 3 Tag Configuration Communication Resource Configuration Options For IAK servers, use the Create… button to invoke a new, untitled IAK Create Communication Resource Configuration dialog box. This configuration option is not used for other classes of servers. For IAK servers, use the Edit… button to invoke the IAK Edit Communication Resource dialog box for the currently selected communication resource. This configuration option is not used for other classes of servers.
Chapter 3 Tag Configuration Use the Edit… button to invoke the Edit Device Configuration dialog box for the device currently selected in the device list. The options in this dialog box vary depending on the type of server. If the server does not support device configuration, this button is disabled. Use the Delete button to remove the selected device from the server configuration. If the server does not support device configuration, this button is disabled.
Chapter 3 Tag Configuration The Edit… button invokes a server-dependent configuration dialog box, which you can use to edit the configuration of the selected item. If the server does not support item configuration, or if the selected item is not valid, this button is disabled. The Delete button invokes a confirmation dialog box. If confirmed, the selected item is removed from the server configuration.
Chapter 3 Tag Configuration Example 2When to Use a Memory Tag A simple device server returns several items of data that, through a linear combination of values, represent a meaningful measurement in engineering units. The design of the device and its server software makes it difficult to combine these values within the server to make a single tag. The value of interest is not the individual points but the linear combination of these I/O points.
Chapter 3 Tag Configuration selecting Append Tags to SCF? (default mode) or you can create a new configuration file. How Do You Connect a Tag to an OPC Server? You connect to an OPC server just like you connect to the National Instruments device servers from the Connection tab of the Tag Configuration dialog box. Any OPC servers installed on your machine are listed in the server name list. Select the OPC server you want to use.
Chapter 3 Tag Configuration You can use tag groups to help define a subset of tags in the system. Tag groups are helpful when you want to examine the alarm states for a subset of tags in the system. See Chapter 5, Alarms and Events, for more information on alarm groups.
Chapter 3 Tag Configuration Table 3-4. Operations Configuration Attributes Attribute Applies to Data Types Description Update Deadband all Determines when the Real-Time Database (RTDB) updates the value for this tag. It is used to improve system performance and prevent unnecessary processing of tag values in the RTDB. The field is expressed differently for analog, discrete, string, and bit array tags. For analog tags, Update Deadband is a percent of full scale.
Chapter 3 Tag Configuration Table 3-4. Operations Configuration Attributes (Continued) Attribute Applies to Data Types Description Set Initial Value all Determines whether an initial value is used for this tag. If Set Initial Value is OFF for this tag, the tag value is marked as uninitialized until its value is updated. Initial Value all The initial value used for this tag when Set Initial Value is ON.
Chapter 3 Tag Configuration How Do You Configure a Tag to Log Its Data or Events? While editing a tag, click on the Log Data or Log/Print Events checkbox. If you want to log historical data or events, the BridgeVIEW Engine must have these processes enabled.
Chapter 3 Tag Configuration Table 3-5. Scaling Configuration Attributes (Continued) Attribute Applies to Data Types Description Eng Zero Scale analog Determines the zero scale (minimum) value used by the BridgeVIEW Engine and the user application for a tag. Engineering Zero Scale must be less than Engineering Full Scale. Units analog Determines the engineering units for a tag. Examples include degrees Celsius, liters, and kilograms.
Chapter 3 Tag Configuration Analog Tags You can define the raw range and engineering range for a tag to perform simple conversions between the two ranges. The raw range, defined by Raw Full Scale and Raw Zero Scale, refers to the values used by the device server. Engineering range, defined by Engineering Full Scale and Engineering Zero Scale, refers to the values used by the BridgeVIEW Engine and HMI.
Chapter 3 Tag Configuration Configure the tag for raw range from zero (Raw Zero Scale) to five (Raw Full Scale). Select Linear, and set the engineering range from 50 (Eng Zero Scale) to 100 (Eng Full Scale). Example Square Root Scaling A flow meter measures the flow rate of a liquid using a differential pressure reading. The device server provides 4–20 mA readings. The actual flow is measured in gallons per minutes (GPM). 4 mA corresponds to 0 GPM; 20 mA corresponds to 100 GPM.
Chapter 3 Tag Configuration Figure 3-9. Scaling for Discrete Tag Configuration Bit Array Tags Bit array tags can have invert and/or select mask scaling. You can use the invert mask to determine which bits are inverted between the device server and the BridgeVIEW Engine. You can use the select mask to determine the bits you do not need. Figure 3-10 shows the Scaling tab of the Bit Array Tag Configuration dialog box, and Table 3-6 provides examples of tags configured for bit array scaling.
Chapter 3 Tag Configuration Figure 3-10. Scaling for Bit Array Tag Configuration Table 3-6.
Chapter 3 Tag Configuration Alarms These attributes include whether to enable alarms, under what circumstances a tag is in alarm, the priority level of an alarm, and how alarms are acknowledged. Each alarm limit has a priority, ranging between 1 and 15. In BridgeVIEW, 15 is the highest priority and 1 is the lowest. There are two main types of alarms: • Alarms based on status • Alarms based on tag values Configuration for alarms based on tag values is specific to data type.
Chapter 3 Tag Configuration Table 3-7. Alarms Configuration Attributes (Continued) Attribute Applies to Data Types Description HI_HI Limit analog Determines the value, in engineering units, that invokes a HI_HI alarm condition. The tag alarm state remains HI_HI until the tag value goes below the HI_HI alarm limit minus the alarm deadband. HI_HI Priority analog Determines the value (between 1 and 15) for the alarm priority for the HI_HI alarm, where 15 represents the highest priority.
Chapter 3 Tag Configuration Table 3-7. Alarms Configuration Attributes (Continued) Attribute Applies to Data Types Description Alarm on discrete, bit array Determines whether a discrete tag should be alarm on ON (high) or OFF (low). Determines whether a bit array goes into alarm if all of its bits are in alarm or if any of its bits are in alarm. This field is used only if both Alarms Enabled and Discrete Enabled fields are set to TRUE.
Chapter 3 Tag Configuration How Do You Configure Alarms for a Tag? While editing a tag, click the Enable Alarms checkbox. Alarms are generated depending on the value or state of a tag. The alarms based on value vary with the tag data type. But for any tag, if the status is bad, a Bad Status alarm is generated. By default, Bad Status Alarm is enabled and has the highest priority (15). You can change this selection from the Alarms tab of the Tag Configuration Editor, shown in Figure 3-11.
Chapter 3 Tag Configuration Discrete Tags Discrete tags have one alarm state—either the tag is in alarm or it is not. You can determine whether a tag is in alarm when it is ON (High) or OFF (Low). Figure 3-12 shows the Alarms tab of the Discrete Tag Configuration dialog box. Figure 3-12. Alarms for Discrete Tag Configuration Bit Array Tags You can enable one of two types of alarms for bit array tags. Alarm on Any indicates the overall tag is in alarm if any of the bits are in alarm state.
Chapter 3 Tag Configuration Figure 3-13. Alarms for Bit Array Tag Configuration String Tags String tags have no alarm states based on tag value. They only support Bad Status alarms. What Is Alarm Deadband on Analog Tags? Alarm Deadband is a method commonly used to avoid repetitive alarm messages because of a tag value that hovers near the alarm limit. Alarm Deadband defines how much a tag value must change from the alarm limit before it is considered normal.
Chapter 3 Tag Configuration Table 3-8. Events with Alarm Deadband = 0.0% (Continued) Time Value Event Alarm Type 9:15:15 40.1 Yes HI 9:15:20 38.5 Yes Normal This type of situation clogs event files with redundant information and can cause operators some frustration in having to acknowledge alarms constantly when the tag has not changed significantly. You can use the Alarm Deadband to alleviate this problem.
Chapter 3 Tag Configuration User Must Ack With this option enabled, an alarm remains unacknowledged until the operator acknowledges the alarm. Activity 3-1. Configure a Tag, and View the Tag Configuration Parameters and Tag Values The objective of this activity is to use the Tag Configuration Editor to configure tags for an HMI application and to become familiar with the Tag Browser and Tag Monitor utilities. As with all servers, you must register the Tanks Server VI before you can use it.
Chapter 3 Note Tag Configuration This configuration file uses data simulated by the Tanks Server. You must ensure that the Tanks Server is registered with the BridgeVIEW Engine by selecting Project»Server Tools»Server Browser. If you do not see Tanks Server in the Registered Servers list, run the Register Tanks Server.vi from the BridgeVIEW\_servers\Tanks Server directory.
Chapter 3 Tag Configuration Table 3-10. Configuration Settings for Activity 3-1 Category General Connection Operations Scaling BridgeVIEW User Manual Attribute Setting Tag Name Product Tag Group group1 Tag Description Volume of finished product in liters Tag Access Input Only Server Name Tanks Server I/O Group ALL Item tank2 Update Deadband (% of range) 1.00 Set Initial Value Enabled, 0.00 Log/Print Events Enabled Log Data Enabled Log Deadband (% of range) 5.
Chapter 3 Tag Configuration Table 3-10. Configuration Settings for Activity 3-1 (Continued) Category Attribute Alarms Setting Enable Alarms Enabled Alarm Acknowledge Mode Auto Ack on Normal Alarm Deadband (% of range) 1.00 HI_HI Enabled, Limit = 950.00, Priority = 1 Enabled, Limit = HI 800.00, Priority = 1 8.
Chapter 3 Tag Configuration Table 3-11. Configuration Modifications for Activity 3-1 (Continued) Category Alarms 9. Attribute Setting Enable Alarms Enabled Alarm Acknowledge Mode User must Ack Save the configuration by selecting File»Save. The modified .scf file is provided for you in the BridgeVIEW\Activity\Solutions directory. 10. View the tag configuration using the Tag Browser.
Chapter 3 Tag Configuration The Tag Monitor is a quick way to look at tag values and alarm states without building an HMI. It is also a great debugging tool. When you launch the Tag Monitor, it automatically launches the Engine. The Engine loads the last .scf file saved. In this case, it uses mytanks.scf. The Tag Monitor is shown in the following illustration. 13. Close the Tag Monitor. End of Activity 3-1.
Chapter 3 Tag Configuration How Do You Configure Other Engine Parameters? There are other Engine parameters you can configure within the Tag Configuration Editor. You can define your Historical Logging Configuration and Event Configuration by selecting Configure»Historical… or Events… through the BridgeVIEW Tag Configuration Editor dialog box, shown in Figure 3-1.
Chapter 3 Tag Configuration Table 3-12. Configurable Memory Allocation Parameters Parameter Description Default Value System Events display (lines Determines the maximum number of lines of text to be displayed in the System Errors and Events display of the Engine Manager. 20 Error Message repeat rate (seconds) Determines the time, in seconds, that recurring error messages should be repeated to the user. For example, an undefined tag message error repeats only after this value is exceeded.
Chapter 3 Tag Configuration How Do You Launch Server Configuration Utilities from the Tag Configuration Editor? When you register a server in your system, BridgeVIEW registers the location of its configuration utility, if it exists. You can access the server configuration utilities from the Servers menu of the Tag Configuration Editor.
4 Human Machine Interface This chapter explains what a Human Machine Interface (HMI) is and how you can monitor and control tags from your HMI.
Chapter 4 Human Machine Interface There are several general G programming principles with which you should be familiar before you build an HMI.
Chapter 4 Human Machine Interface Front Panel Objects A front panel is the user interface of a virtual instrument (VI). You build the front panel of a VI with a combination of controls and indicators representing the values of the tags. Controls are the means of supplying data to your VI, and indicators display data that your VI generates. There are many types of controls and indicators available from the Controls palette, shown in the following illustration.
Chapter 4 Human Machine Interface The HMI G Wizard associates a front panel control or indicator with a tag, and generates the necessary Wizard subdiagram for a configuration that you specify. Table 4-1 provides a list of front panel objects, and explains how the HMI G Wizard operates on each of them. Table 4-1.
Chapter 4 Human Machine Interface Table 4-1. HMI G Wizard Operations (Continued) HMI Function Display discrete values Front Panel Object Description Boolean Indicator Invoke the HMI G Wizard on a Boolean indicator to associate a discrete input tag value or an alarm state with that indicator. When you invoke the Wizard for the first time on a Boolean indicator, the Configuration dialog box is set for Tag Value. You can set blink and color options under Alarm Conditions.
Chapter 4 Human Machine Interface Table 4-1. HMI G Wizard Operations (Continued) HMI Function Front Panel Object Description Display event history information Event History Display or any Table Indicator Invoke the HMI G Wizard on a table indicator to obtain a history of past events and alarms (Event History). For an event history display, you can set the HMI G Wizard to Event History mode by setting the value of the Use this Indicator for: ring to Event History.
Chapter 4 Human Machine Interface To invoke the Wizard, pop up on a front panel object, and select HMI G Wizard…. For example, the HMI G Wizard dialog box for an analog input tag appears in Figure 4-1 by popping up on a numeric indicator. Figure 4-1. HMI G Wizard Dialog Box When you invoke the HMI G Wizard on one of the front panel objects listed in Table 4-1, a dialog box appears for that object. You can associate the front panel object with a tag, and set the various parameters.
Chapter 4 Human Machine Interface Generate the Block Diagram Once you associate a front panel object with a tag and set the various parameters, the HMI G Wizard generates the appropriate code and places it on the block diagram. For example, using the HMI G Wizard for Analog Indicator, shown in Figure 4-1, the following Wizard subdiagram appears on the block diagram.
Chapter 4 Human Machine Interface For this activity, you will use the tags configured in mytanks.scf, which you edited in Activity 3-1 and is located in the BridgeVIEW\Activity directory. Note Before you can begin this activity, you must have completed Activity 3-1, Configure a Tag, and View the Tag Configuration Parameters and Tag Values, in Chapter 3. 1. Place a real-time trend from the Controls»Graph subpalette on your front panel. Pop up on the object and select Show»Label.
Chapter 4 Human Machine Interface If you do not see a list of available tags or the tag name Mixer is not in the list when you click on the Tag menu ring, pop up on the menu ring and select Tag Browser… to select the correct .scf file. Press the Browse… button on the Tag Browser to bring up a dialog box and select mytanks.scf. This dialog box automatically appears if no .scf file is currently selected. If the Engine is running already, the Browse… button is dimmed and you cannot change the .
Chapter 4 Human Machine Interface 5. Return to the front panel and run the VI. It launches the Engine if it is not running already. The Engine reads mytanks.scf and launches the Tanks Server. 6. Now, you can see the Mixer tag values being monitored in the real-time trend. Select Operate»Stop to stop the VI. Diagrams generated by the HMI G Wizard have a lock on the top right corner of the outermost structure. You cannot edit the code inside the structure until you release the lock.
Chapter 4 Human Machine Interface How Do You Customize Front Panel Objects? You can customize BridgeVIEW controls and indicators to change their default appearance on the front panel with the Control Editor. You also can save these controls for use in other VIs. Programmatically, they function the same as standard BridgeVIEW controls. Control Editor You launch the Control Editor by selecting a control on the front panel with the Positioning tool and choosing Edit»Edit Control….
Chapter 4 Human Machine Interface If you want to use the control in other VIs, you can save it as a custom control by selecting File»Save. After you save the control, you can place it on other front panels using the Controls»Select a Control…. Importing Graphics You can import graphics from other programs for use as background pictures, as items in ring controls, or parts of other front panel controls. Before you use a picture in BridgeVIEW, you must load it into the BridgeVIEW clipboard.
Chapter 4 Human Machine Interface BridgeVIEW User Manual 4. Click on the Edit Mode button in the Control Editor toolbar. The wrench changes to a pair of tweezers to illustrate that you are in Customize mode. In Customize mode, the control is broken into several parts. You cannot operate the control while the Control Editor is in Customize mode. 5. Select Edit»Import Picture from File… from the Control Editor menu bar. A file dialog box prompts you to select a picture file to open. Open boat1.
Chapter 4 Human Machine Interface 7. Click on the pair of tweezers to return to Edit mode. You can finish editing the control in Edit mode. 8. Pop up on the housing of the slide and select Scale»Style»None. The scale for the slide disappears. 9. Change tools to the Color tool. To do this, you either can select the tool from the palette, if visible, or you can use the key to rotate through the tools until the Color tool is selected.
Chapter 4 Human Machine Interface How Do You Monitor and Control Tags? The Tags VI library and Alarms and Events VI library contain VIs for your HMI application to interact with the BridgeVIEW Real-Time Database. These are the primary VIs you use to build your HMI.
Chapter 4 Human Machine Interface Tag Data Type BridgeVIEW has a special data type called the tag data type that is aware of the available tag names and tag group names contained in the current .scf file. All BridgeVIEW functions that can operate on tags or tag groups use the tag data type. The tag data type is marked with a valve glyph. Constants and wires in the block diagram carrying this tag information are displayed in purple.
Chapter 4 Human Machine Interface You also can enter the name of the tag you want to use. The tag control performs a Type Look Ahead as you type, and displays the closest tag or group name to what you enter. By default, the tag control does not allow you to enter a name that is not contained in the current .scf file. You can configure each tag control, indicator, or constant to permit entry of names not contained in the current .
Chapter 4 Human Machine Interface The tag data type imports tag and tag group names from a tag configuration file (.scf). When you launch BridgeVIEW, the tag data type list of available tag names and tag group names is automatically updated from your default .scf file. The default .scf file is the last file you edited in the Tag Configuration Editor. If the list of names is empty, you have no default .scf file. To change the currently selected .
Chapter 4 Human Machine Interface Tag constants in your diagram (and tag controls and indicators if they are saved with default values) retain the tag name or tag group name selected when your VI is saved. The name contained in the tag control, indicator or constant is dimmed when the name is not contained in the currently selected .scf file. This might be because the tag name has been deleted from the .scf file, or the VI was created using a different .scf file.
Chapter 4 Human Machine Interface period is exceeded, whichever occurs first, then reads the database and returns the current tag information. By default, timeout is 0 seconds. If you wire nothing into the timeout input of your diagram, the VI reads the database and returns immediately. How you use the timeout input depends on whether you want to implement event-driven or polled programming techniques in your HMI.
Chapter 4 Human Machine Interface Block Diagram 2. BridgeVIEW User Manual To create the block diagram, pop up on the tank and select HMI G Wizard…. Select Product for the Tag and click OK, as shown in the following illustration.
Chapter 4 Human Machine Interface 3. The HMI G Wizard generates a diagram for you that calls the Read Tag VI, as shown in the following illustration. 4. Pop up on the lock in the top right corner of the While Loop and select Release Wizard Lock. 5. Using the Labeling tool, edit the timeout input to the Read Tag VI from its default –1.00 (indefinite) to 1.00. 6. Using the Positioning tool, select the bottom right corner of the While Loop and expand it. 7.
Chapter 4 Human Machine Interface 9. Save the VI as Monitor Product.vi in the BridgeVIEW\ Activity directory. 10. Run the VI. The Engine launches, unless it is running already. The tank level changes to reflect the changing values of the Product tag. When the value goes over 800, the in alarm Boolean changes from OFF to ON, indicating an alarm condition. End of Activity 4-3.
Chapter 4 Human Machine Interface General Principles of G HMI Programming You can choose how to monitor and control tag values as well as operator interface controls and indicators in your HMI. Normally, you use one or more While Loops in a VI diagram with a single wait operation inside of each loop. Each While Loop executes once after its wait operation completes. The wait operation might be one of the Time and Dialog functions such as the Wait Until Next ms Multiple function.
Chapter 4 Human Machine Interface alarm state indicator, and controls the blinking of the Mixer in Alarm indicator. Both loops run in parallel until shutdown is TRUE. Figure 4-3. Monitor Tag Value and Alarm VI The Mixer in Alarm Blinking attribute and the alarm state indicator are updated only when the changed? output of the Read Tag Alarm VI is TRUE. This example demonstrates how you might use the changed? output.
Chapter 4 Human Machine Interface How Do You Implement Polled Programming in G? You do not have to use a separate loop for each Tags or Alarms and Events VI. This can be cumbersome to program for a large number of tag reads, although using the HMI G Wizard makes it easy to build separate loops quickly. The alternative is to poll the database for several tags at regularly timed intervals.
Chapter 4 Human Machine Interface Figure 4-4. Process View Display VI How Do You Initialize and Shut Down Multiple-Loop Applications? When you have a multiple-loop application, you can add initialization code before executing the loops, and some cleanup or shutdown code after all the loops finish executing. You can use the Sequence structure for this purpose.
Chapter 4 Human Machine Interface How Do You Display Real-Time Trends? You can build a real-time trend by dropping a real-time trend indicator on your front panel and popping up on it to select the HMI G Wizard. Alternatively, you can assemble the diagram manually using a While Loop and the Trend Tags VI. Wire the output of the Trend Tags VI to the terminal for a real-time trend indicator.
Chapter 4 Human Machine Interface Figure 4-5. Two Trend Display VI The real-time trend indicator updates with a value for each tag every time the indicator is written to. If a VI using this indicator is executed several times, it still has previous data displayed. For this reason, you might want to initialize the real-time trend indicator before the loop begins execution. You also can control attributes of the real-time trend indicator such as time scale.
Chapter 4 Human Machine Interface This example illustrates the use of dataflow programming to enforce the order of two structures that otherwise are not related by data flow. By wiring the time interval (secs) constant through the Sequence structure and into the While Loop, the While Loop does not begin execution until the code in the Sequence structure has completed execution. Another way to enforce this order of execution is to put the While Loop inside the second frame of the Sequence structure.
Chapter 4 Human Machine Interface Figure 4-7. Using the Tag Attributes VIs to Initialize Front Panel Indicators, Frame 0 Figure 4-8 illustrates the subsequent frame of the Sequence structure. The HMI runs in a loop, monitoring the various tags and front panel controls until the BridgeVIEW Engine shuts down.
Chapter 4 Human Machine Interface Figure 4-8.
5 Alarms and Events This chapter introduces the basic concepts of alarms and events, and explains how to view, acknowledge, and configure them within the BridgeVIEW system. This chapter also provides activities that explain how to build an alarm summary display and acknowledge alarms from your HMI. What are Alarms and Events? An alarm is an abnormal process condition pertaining to a tag. In BridgeVIEW, alarms are generated based on changes in a tag value or status.
Chapter 5 Alarms and Events Alarm Priority An alarm priority indicates the severity of an alarm. Priorities range from 1 (lowest) to 15 (highest). You can filter the alarms displayed in your HMI by alarm priority. Alarm Summary An alarm summary is a collection of all the alarms that currently exist in the system. In addition, if a tag previously in alarm returns to normal but is unacknowledged, a notification is posted in the alarm summary.
Chapter 5 Alarms and Events can change the default colors of alarms, acknowledged alarms and unacknowledged tags that have returned to normal with the Color Codes for Alarm Summary control, which also is available in the Alarms and Events palette. Activity 5-1. Build an Alarm Summary Display Your objective is to use the HMI G Wizard to display alarm summary information. 1. Place an Alarm Summary Display from the Controls»Alarms and Events subpalette on a new front panel, as shown below. 2.
Chapter 5 Alarms and Events 3. Now, you can select the tags to monitor. In the tag list, select to view alarms on all the tags that have alarms configured. Click on the Add button to add all tags to the list. If you do not see a list of available tags when you click on the Tag menu ring, pop up with your right mouse button on the menu ring and select Tag Browser…. A dialog box appears and prompts you to select the desired .scf file containing the configuration of your tags. Select mytanks.scf.
Chapter 5 Alarms and Events The diagram above uses event-driven programming to wait for an alarm summary event before updating the Alarm Summary Display. The Read Alarm Summary VI returns when an alarm event occurs on any of the tags in the tag constant array. The column headers for the Alarm Summary Display are initialized when the Read Alarm Summary VI returns for the first time, and the initialize output is set.
Chapter 5 Alarms and Events How Do You Display Event History Information? To read all the alarms and events in the BridgeVIEW system that have occurred since the Engine was started (unless limited by buffer size) drop the Event History Display from the Alarms and Events palette on your front panel. Then, you can invoke the HMI G Wizard to create the diagram code for an event history. You also can build your own diagram and use the Read Event History VI in your block diagram.
Chapter 5 Alarms and Events remains at UNACK until the user presses the ACK button on the HMI and acknowledges the alarm. You can select the tags for which you want to acknowledge alarms. It is a good idea for this tag list to be identical to the list of tags you display alarms for in the Alarm Summary or Event History Display. For example, if you select group , alarms for all tags that were configured for alarms are reported as they occur.
Chapter 5 Alarms and Events 3. Select Alarm Acknowledgement for the Attach Control to: option. 4. Select the tags to monitor. In the tag list, select to view alarms on all the tags that have alarms configured. Click the Add button to add all tags to the list. Click OK. The HMI G Wizard creates the diagram shown below.
Chapter 5 Alarms and Events The Acknowledge Alarm VI is called when the front panel ACK button is pressed. This button is polled in a separate While Loop and the Read Alarm Summary VI waits for events in its own While Loop. 5. Save the VI as My Alarm Summary with Ack in the BridgeVIEW\ Activity directory. 6. Run the VI. When alarms appear in the Alarm Summary, click on the ACK button. You can see the color of the Alarms change from red to yellow.
Chapter 5 Alarms and Events How Do You Configure Logging and Printing of Alarms and Events? You can configure logging and printing options for Alarms and Events through the Event Configuration dialog box, shown in Figure 5-1. This configures the format of alarms and events written to .evt files or printed. You can reach this dialog box by choosing Project»Tag»Configuration, and then Configure»Events from the Tag Configuration Editor. Figure 5-1.
Chapter 5 Alarms and Events Table 5-1. Tag Configuration Editor Event Configuration Selections (Continued) Selection Description Start event logging on system start-up Determines whether the BridgeVIEW Engine automatically begins logging events when the Engine launches. Days to keep event files Determines how many days worth of event files are kept on disk. Anything older than the number of days specified here is deleted automatically.
Chapter 5 Alarms and Events Table 5-2. Event Configuration, Log, and Print Format Selections Selection Description Date Determines whether the date is logged or printed. Date Format A menu ring that allows you to pick a format for the date to be printed. This selection is valid only if Date is selected. The menu items are: MM/DD/YYYY and DD/MM/YYYY. Time Determines whether the time is logged or printed. Time Format Determines the format for the time logged or printed.
Chapter 5 Alarms and Events month, DD is the day, HH is the hour, MM is the minute and .evt is the extension for all event log files. There are three steps you must complete to log alarms and events: 1. Configure your tags to have Log/Print Events enabled. You configure it on a per tag basis. To select event logging for a single tag, go to the panel for configuring the tag. 2. Configure a path to a directory for the event (.evt) files.
Chapter 5 Alarms and Events There are three techniques for turning event printing on or off: • You can configure event printing in the Tag Configuration Editor. To turn on printing, select Configure»Events…. Configure the printer and set Start printing on system start-up to be TRUE. • For programmatic control, you can call the Enable Printing VI in the System palette. With this VI, you can turn event printing on or off dynamically for all the tags in the system, while the BridgeVIEW Engine is running.
Historical Data Logging and Extraction 6 This chapter explains the concept of a trend, how to log and extract historical data, and how to use the Historical Trend Viewer (HTV), a utility that displays historical data that has been logged to disk with BridgeVIEW. What Is a Trend? A trend is a display of tag values against time. BridgeVIEW displays tag values with two types of trends: real-time trends and historical trends. You can find these trends in the Controls palette.
Chapter 6 Historical Data Logging and Extraction manipulate, and analyze historical data automatically from outside the BridgeVIEW environment. For more information, see Appendix B, Citadel and Open Database Connectivity. How Do You Log Historical Data? There are three steps you must complete to log historical data: 1. Configure your tags to have historical logging enabled. You configure it on a per tag basis. To select historical logging for a single tag, go to the panel for configuring the tag. 2.
Chapter 6 Historical Data Logging and Extraction How Do You Configure Historical Logging? You can reach the Historical Logging Configuration dialog box by selecting Configure»Historical… from the Tag Configuration Editor. Figure 6-1 shows the Historical Logging Configuration dialog box and Table 6-1 lists parameters you can configure for historical logging. Figure 6-1. Historical Logging Configuration Dialog Box Table 6-1.
Chapter 6 Historical Data Logging and Extraction How Do You Extract and View Data from Historical Log Files? There are two methods for viewing historical data that has been logged to disk. One method is to use the Historical Data VIs and the other is to use the Historical Trend Viewer (HTV). Historical Data VIs There are several VIs you can use in your HMI to manipulate data logged in Citadel files. These VIs access disk files and do not require the BridgeVIEW Engine to be running.
Chapter 6 Historical Data Logging and Extraction If the Citadel Path is empty, the File Dialog function is executed. This brings up a File dialog box that lets the operator select the directory containing the historical data files. The example then uses the tag list returned by the Get Historical Tag List VI to set up a list of names in the front panel Tag List listbox, found by selecting List & Ring»Single Selection Listbox from the controls palette.
Chapter 6 Historical Data Logging and Extraction Activity 6-1. Use the Historical Data VIs The objective of this exercise is to create a VI that programmatically reads historical information from Citadel and determines statistical information of the data. In this activity, you will read previously logged data, which is included in the BridgeVIEW\Activity\Data directory. You will use mytanks.
Chapter 6 Historical Data Logging and Extraction You will display previously logged data, which is included in the BridgeVIEW\Activity\Data directory. It contains a 25-minute run of data. You can change the time axis to display the first minute of this data. 3. Run the VI. The trend displays one minute of data. You can use the panning tool to grab the plot and scroll to the left or right to show more data. Hold down the key while you pan to constrain the movement to the horizontal direction. 4.
Chapter 6 Historical Data Logging and Extraction 6. On the front panel, create an array of numeric indicators. Stretch the array indicator so that four fields are showing. Then pop up on the array indicator and select Show»Index Display to deselect the index display, as shown below. 7. Run the VI. Initially, the historical trend displays the first minute of data in the set, along with the averages for the four tags.
Chapter 6 Historical Data Logging and Extraction on the data that is displayed. You can use the panning tool to display a different section of data. The averages are updated automatically. 8. Save the VI as Historical Data.vi in the BridgeVIEW\ Activity directory. End of Activity 6-1. Historical Trend Viewer (HTV) The HTV is a stand-alone utility that enables you to look at historical data in your system. The HTV limits you to viewing no more than eight tags at a time.
Chapter 6 Historical Data Logging and Extraction How Do You Select the Tags to Display? Select File»Select Tags…, and the Select Tags dialog box appears, as shown in Figure 6-3. With this dialog box, you can select either a .scf file or a directory of Citadel files. The default is to choose a .scf file. The .scf file you choose must point to a valid directory of Citadel files. If the BridgeVIEW Engine is running, the .scf file being used by the BridgeVIEW Engine is displayed. Figure 6-3.
Chapter 6 Historical Data Logging and Extraction Panning Buttons The Panning buttons allow you to move backward and forward through the historical data in the trend. The buttons do not affect the timespan of the trend. For example, if the trend displays data from 9:45 to 9:55 on the same day, the timespan is ten minutes. Table 6-2 describes the Panning button functions. Table 6-2. Panning Button Functions Button Name Description |< Retrieve oldest data Displays the first available page of data.
Chapter 6 Historical Data Logging and Extraction How Do You Change the Timespan of Data Displayed? The timespan indicator displays the amount of relative time between the start and end points of the time axis. To change the amount of time between these points, you either can manually reenter data in the start or end point on the time axis, or pull down the ring for the timespan indicator. By default, the timespan ring contains the values 1:00, 5:00, 10:00, and 30:00.
Chapter 6 Historical Data Logging and Extraction How Do You Change the Plot Colors and Style in the Trend? Click on the Trend Legend. The pop-up window contains several options with which you can change the plot colors and styles used in the trend. How Do You Zoom In on the Trend? The HTV Trend palette contains a Zoom tool that allows you to zoom in on points of interest.
Chapter 6 Historical Data Logging and Extraction Select the Remember settings on exit checkbox if you want to update your settings each time you exit the HTV. How Do You View New Data Automatically After It Has Been Logged to Citadel? You can use Live Mode to watch incoming data after it has been logged. When the Engine is turned on with historical logging enabled, the Live button appears to the right of the panning buttons. When you click the Live button, the trend automatically updates periodically.
Chapter 6 Historical Data Logging and Extraction Activity 6-2. Use the Historical Trend Viewer The objective of this activity is to view logged data with the Historical Trend Viewer. You will use mytanks.scf in the BridgeVIEW\Activity directory, as edited in Activity 3-1, Configure a Tag, and View the Tag Configuration Parameters and Tag Values. You will view previously logged data spanning over 25 minutes, which is included in the BridgeVIEW\ Activity\Data directory. 1.
Chapter 6 Historical Data Logging and Extraction The HTV displays the trends for the Powder, Mixer, Liquid and Product tags. The Available Data display shows the start and stop timestamps of the logged data. The status of the HTV is displayed on top of the Historical Trend. You can see it change from Accessing Disk to Running. The legend to the right of the Historical Trend shows the tag names and the plot colors, as they appear on the trend and in the scales. BridgeVIEW User Manual 3.
Chapter 6 Historical Data Logging and Extraction 7. To see the value of a particular data point, use the two vertical cursors on the trend. You can see the value of the data point on each trend at the given cursor location in the Data Display. 8. Select File»Exit to terminate the HTV. End of Activity 6-2.
7 Advanced Application Topics This chapter explains advanced topics you need to understand to make optimum use of BridgeVIEW for developing applications. The advanced topics covered in this chapter are listed below: • Using the Panel G Wizard • BridgeVIEW System Control • Tag Attributes VIs • BridgeVIEW Security How Do You Build an HMI with Multiple Panels? Consider dividing your HMI into several panels so the operator can navigate through them using onscreen buttons.
Chapter 7 Advanced Application Topics How Do You Use the Panel G Wizard? The Panel G Wizard only operates on Boolean controls. To invoke the Wizard, pop up on a front panel Boolean control and select Panel G Wizard…. Popping up on a button control brings up the Panel G Wizard shown in Figure 7-1. Note Because the code created by the Panel G Wizard contains file path information, some features do not generate correct code until the calling panel is saved to disk.
Chapter 7 Advanced Application Topics You can configure the Panel G Wizard to store the file path as a relative path or as an absolute path. If the VI that you connect to the button is generally kept in a path that is relative to the top-level VI, you should select the Relative path setting. How Do You Configure Security with the Panel G Wizard? The Panel G Wizard can create code that disables or hides the button if the operator does not have sufficient security access.
Chapter 7 Advanced Application Topics BridgeVIEW User Manual 2. Save the VI as My Menu Bar.vi in the BridgeVIEW\Activity directory. 3. Pop up on the Alarms button and select Panel G Wizard…. Configure the button to open the My Alarm Summary with Ack.vi that you created in Activity 5-2, Acknowledge Alarms in the Alarm Summary Display, as shown below. 4. Examine the block diagram created by the Panel G Wizard.
Chapter 7 Advanced Application Topics 5. Make a copy of the Alarms button. Click on the button text with the labeling tool and name the button Monitor. 6. Pop up on the Monitor button and select Panel G Wizard…. Use the same settings as before, but connect this button to the Monitor Product.vi you created in Activity 4-3, Read a Tag. 7. Make a copy of the Monitor button. Rename the button Trend. Using the Panel G Wizard, connect this button to the My Tank HMI.
Chapter 7 Advanced Application Topics For example, you might find it unnecessary to load certain panels into your application until they are needed. By using these functions, you can control when your panels are loaded into memory. You can reach the VI Server functions through the Functions»Application Control palette, shown below. For more information about the VI Server, see Chapter 15, Application Control, or the Online Reference available by selecting Help»Online Reference.
Chapter 7 Advanced Application Topics How Do You Control Panel Visibility? There are several ways to control the visibility of an operator interface panel from your application. These options are listed below: • Enable the Show Front Panel when Called and Close Afterwards if Originally Closed options in the VI Setup Execution options. This option applies only to subVIs. • Enable the Show Front Panel when Called and Close Afterwards if Originally Closed options in the SubVI Node Setup options.
Chapter 7 Advanced Application Topics How Do You Start or Stop the BridgeVIEW Engine from Your Application? Use the Engine Launch VI to launch the BridgeVIEW Engine programmatically with a specified configuration file. Use the Engine Shutdown VI to stop the BridgeVIEW Engine and the servers currently executing. For more detailed information about these or any other VIs, refer to Appendix A, HMI Function Reference.
Chapter 7 Advanced Application Topics Tag Attributes VIs There is a set of VIs in the Tag Attributes palette with which you can read or change configuration information about tags programmatically. Most of these tag attributes are parameters you can configure for a tag with the Tag Configuration Editor.
Chapter 7 Advanced Application Topics When you change programmatic attributes with the Tag Configuration Editor, you can update Engine processes without shutting down and restarting the Engine, provided no changes require the Engine to reconfigure. You can change all operations, alarms, and most scaling, and raw or engineering range information dynamically. There are certain attributes you cannot change dynamically. These attributes require you to edit the .
Chapter 7 Advanced Application Topics 4. Run the VI. Because the Product tag is configured to go into HI alarm when it exceeds a value of 800, you can see that the tank color is blue while the tag value is below 800. It changes from blue to red when the value goes above 800. Leave this VI running. 5. To change the HI alarm limit of Product dynamically, open a new VI. Drop the Set Tag Attribute VI from the Functions»Tag Attributes palette. 6.
Chapter 7 Advanced Application Topics 8. Save the VI as Change Alarm Limit.vi in the BridgeVIEW\Activity directory. 9. Run this VI. This dynamically changes the HI limit for the Product tag from 800 to 500. 10. Look at Monitor Product.vi. It still should be running. However, now you should see the color change from blue to red when the value exceeds 500, instead of 800. 11. Stop and close the VIs. End of Activity 7-2.
Chapter 7 Advanced Application Topics BridgeVIEW Security BridgeVIEW security is broken into two general categories: • Environment Security (User Privileges) • Operator Interface Security Security does not take effect until you configure it. Configuration consists of adding users and assigning them access levels, privileges, and passwords. Environment Security Access to most BridgeVIEW utilities and the BridgeVIEW Engine can be configured on a per-user basis.
Chapter 7 Advanced Application Topics Table 7-1. Assignable BridgeVIEW Privileges (Continued) Type Project Privileges Engine Privileges Security Privileges Privilege Description Configure Log File Locations User can use the Tag Configuration Editor to edit the historical and event logging configuration of a tag configuration, but can not create, delete, or edit tags. Create/Edit Tags User can create, delete, and edit tags in the Tag Configuration Editor.
Chapter 7 Advanced Application Topics How Do You Log In and Out? To log in, choose Project»Security»Login. Type in your account name and password. If you do not know your login name, or have forgotten your password, contact your BridgeVIEW administrator. To log out, choose Project»Security»Logout. How Do You Find Your Access Level? After you have logged in, you can find your access level by choosing Project»Security»Access Levels….
Chapter 7 Advanced Application Topics Figure 7-3. Privileges Dialog Box For more information about BridgeVIEW user privileges, refer to Table 7-1. How Do You Change Your Password? You must be logged in to change your password. Choose Project»Security»Change Password. Type in your old password, then your new password. Type in your new password again to verify it. How Do You Check a Users Privileges? Use the Check Operator Privileges VI in the System»Security palette.
Chapter 7 Advanced Application Topics information about this or any other VI, refer to Appendix A, HMI Function Reference. How Do You Programmatically Log an Operator In to Your Application? Use the Programmatic Login VI in the System»Security palette. To use this VI, you must enter a user name and password. If successful, the user is logged in to the system, and no Login dialog box appears.
Chapter 7 Advanced Application Topics choose Project»Security»Edit User Accounts…, and the Edit User Accounts dialog box appears, as shown in Figure 7-4. Figure 7-4. Edit User Accounts Dialog Box Click the Add New Users>> button to create a new user account. Type in a name, select an access level, and provide a password for the account. To modify the privileges for the account, click the Privileges… button. Click the Add button to complete the addition of the new user account. Figure 7-5.
Chapter 7 Advanced Application Topics example, change the access level of several accounts to be the same value), hold down the key when selecting users from the list. Note Once you have defined user accounts, you must have at least one “super user” account (Access Level 255, privileges to Create/Edit user Accounts and Configure User Privileges), unless you remove all user accounts. Note You only can add, remove, or modify accounts if you have the Create/Edit User Accounts privilege.
Chapter 7 Advanced Application Topics file is that all user account information, including passwords, is included in the file. How Do You Export Users to Another Computer on the Network? You can put BridgeVIEW user accounts on other computers either by exporting the user list to a text or binary file on one machine and importing on another, or by choosing File»Export»Network BridgeVIEW.
Chapter 7 Advanced Application Topics Table 7-2.
Chapter 7 Advanced Application Topics If you choose File»Import»Network BridgeVIEW, a dialog box appears in which you can type in the name of the computer to import the accounts from, or you can browse the network. Note (Windows 95) To access the user account list on another computer over the network requires access to the Windows Registry of the remote machine.
Chapter 7 Advanced Application Topics How Do You Limit User Access to HMI Objects? You can use security information to control visibility attributes on HMI objects. There is a set of security VIs you can use to implement security in your HMI, found in the System»Security palette. For more information about these or any other VIs, refer to Appendix A, HMI Function Reference.
Chapter 7 Advanced Application Topics the security loop. This ensures that the security loop terminates when the Engine shuts down. By placing the Security Monitor in a loop, as in Figure 7-6, this HMI can handle the operator access level changing dynamically and still behave appropriately. Activity 7-3. Apply Security to the Alarm Summary Display Your objective is to assign access privileges to the Alarm Summary application created in Activity 5-2, Acknowledge Alarms in the Alarm Summary Display.
Chapter 7 Advanced Application Topics 3. After creating the two accounts, select << Done Adding Users. Click the OK button. 4. Unless you were previously logged in, a Login dialog box appears. Log in as Administrator, with Password Administration. 5. Open the My Alarm Summary With Ack.vi you created in Activity 5-2, Acknowledge Alarms in the Alarm Summary Display. 6. Edit the block diagram of Alarm Summary with Ack.vi to limit operability of the Ack button depending on the user logged in.
Chapter 7 Advanced Application Topics e. Wire the “Disabled” attribute value output of the VI to the Attribute Node. f. Invert the shutdown output of the VI and wire it to the continuation terminal of the While Loop. g. With the Wiring tool, pop up on the operability access level (0) input of the Security Monitor VI and select Create Constant. Enter 50 into the constant. h. Save the VI as Alarm Summary with Security.vi in the BridgeVIEW\Activity directory.
Chapter 7 Advanced Application Topics 8. Log in as Anyone with Password Viewer by selecting Project»Security»Login. 9. The Acknowledge button is now disabled. This is because operability access is given to users with Level 50 or above in BridgeVIEW. User Anyone has an access level of 25. 10. Close the VI and log in as Administrator again. End of Activity 7-3.
8 Servers This chapter explains how to use servers with BridgeVIEW. BridgeVIEW supports several types of servers including OPC Servers, DDE Servers, and National Instruments Standard IA Device Servers. OPC Servers are written to the OPC Foundation OPC Data Access specification and are provided by many companies. A DDE Server is any server that supports the DDE Server interface. IA Device Servers are a type of server developed by National Instruments.
Chapter 8 Servers The device servers also handle and report communications and device errors to BridgeVIEW. There are different servers available for different device families and communication networks. Each device server is a stand-alone component that might include a configuration utility as well as the run-time application that communicates with the BridgeVIEW Engine. IA Device Servers are not built into the BridgeVIEW Engine itself.
Chapter 8 Servers When you register a device server, its name appears in the list of servers shown in the various Edit Tag screens of the Tag Configuration Editor. Once you configure your server, you can create a BridgeVIEW Configuration using that server. Depending on the server, different information is written to the Common Configuration Database (CCDB) when the server is registered. The most simple servers register no more than their names and launch paths.
Chapter 8 Servers All Channels created with the NI-DAQ Channel Wizard appear as items when the DAQ OPC Server is selected in BridgeVIEW. Installing and Configuring Device Servers from the BridgeVIEW Device Servers CD The BridgeVIEW Device Servers CD contains servers for several PLCs and remote I/O devices. These device servers are DLL-based servers using the Device Server Toolkit interface to BridgeVIEW. To install the BridgeVIEW Device Servers from the BridgeVIEW Device Servers CD, follow these steps.
Chapter 8 Servers Browser utility. You can remove these servers from the server list by selecting the Unregister Server option in the Server Browser utility. How Do You Use OPC Servers with BridgeVIEW? BridgeVIEW can communicate with any server implementing the OPC Foundation OPC Server interface, a Microsoft COM-based standard. BridgeVIEW automatically finds all OPC Servers installed in your system and searches the network for OPC servers on other machines.
Chapter 8 Servers Figure 8-1. Server Browser When an OPC server is selected in the Servers list, you can press the View Server Information… button to bring up the View Server Information for OPC Servers dialog box, as shown in Figure 8-2. Figure 8-2.
Chapter 8 Servers This dialog box displays general information about the OPC Server as read from your local system registry. If the OPC server supports the Server Browse Address Space interface, the View Server Information dialog box also displays the items available from the server and their attributes. If the OPC Server does not support this interface, the No Items Found checkbox and the item table appear dimmed.
Chapter 8 Servers to use the server on another machine from your machine, use the network tree control to open the machine, and select one of the OPC servers shown on that machine and press the Add Server>> button. The information for the remote OPC server is now stored in your local machine registry, and the server will appear in your BridgeVIEW servers list with the server name format of (machine name)programID.
Chapter 8 Servers How Do You Use DDE Servers with BridgeVIEW? BridgeVIEW can communicate with any server using Microsoft Dynamic Data Exchange (DDE) as its interface. A DDE Server is treated as a simple server in which you type in a device and item string to select a specific point. For DDE Servers, you select DDE Server from the Server List in the Tag Configuration Editor, and type in APPLICATION|TOPIC for device in the I/O Group Configuration Dialog Box, and ITEM for item.
Chapter 8 Servers Use the Server Browser to unregister a device server that you no longer want to use (BridgeVIEW device servers only). This keeps the server and related information from appearing in the Edit Tag screens. Notice that this invalidates any tags that use that server. Once you have unregistered a server, you can no longer connect to it from BridgeVIEW, and you must run its configuration utility again to register it with BridgeVIEW. Figure 8-4.
Chapter 8 Note Servers Unregistering a server means that BridgeVIEW can no longer access that server, and any tag configured to use that server no longer has a valid configuration. Do this only if no tags are configured to use that server and you no longer want to access it from the Tag Configuration Editor. This does not apply to OPC or DDE Servers.
Chapter 8 Servers How Do You Develop an IA Device Server? You can write an IA Device Server as a BridgeVIEW VI. Several of the example simulation servers installed with BridgeVIEW are VI-based servers. Writing a VI-based IA server is a simple way to emulate hardware or connect BridgeVIEW to a simple device. You can use the same BridgeVIEW development environment to create the server as you used to develop your application. The toolkit for creating a VI-based device server is included on the BridgeVIEW CD.
Part II G Tutorial This section contains information about the functionality of G that you need to get started with most BridgeVIEW applications. Part II, G Tutorial, contains the following chapters. • Chapter 9, Creating VIs, introduces the basic concepts of virtual instruments and provides activities that explain how to create the icon and connector, how to use a VI as a subVI, how to use the VI Setup… option, and how to use the SubVI Node Setup… option.
9 Creating VIs This chapter introduces the basic concepts of virtual instruments and provides activities that explain the following: • How to create the icon and connector • How to use a VI as a subVI What is a Virtual Instrument? A virtual instrument (VI) is a program in the graphical programming language G. Virtual instrument front panels often have a user interface similar to physical instruments.
Chapter 9 Creating VIs using a VI library. For a list of the advantages and disadvantages of using VI libraries and individual files, see the section Saving VIs in Chapter 2, Editing VIs, of the G Programming Reference Manual. VI libraries have the same load, save, and open capabilities as other directories. VI libraries, however, are not hierarchical. That is, you cannot create a VI library inside of another VI library. You cannot create a new directory inside a VI library, either.
Chapter 9 Creating VIs You can create an indicator and wire it to an output terminal by popping up on the terminal and selecting Create Indicator. As an alternative to placing constants on the block diagram and wiring them to functions and VIs, you can pop up on a function or VI terminal and select Create Constant. You cannot delete a control or indicator from the block diagram. As with all front panel objects, you must go to the front panel, select the Positioning tool, and then delete the object.
Chapter 9 Creating VIs floating-point numbers, green wires carry Booleans, and pink wires carry strings. For more information about wire styles and colors, see the G Programming Quick Reference Card. To wire from one terminal to another, click the Wiring tool on the first terminal, move the tool to the second terminal, and click on the second terminal. It does not matter at which terminal you start. The hot spot of the Wiring tool is the tip of the unwound wiring segment.
Chapter 9 Creating VIs VI Wiring Tool Tip Strip Note When you place the Wiring tool over a node, G displays wire stubs that indicate each input and output. The wire stub has a dot at its end if it is an input to the node. Wire Stretching You can move wired objects individually or in groups by dragging the selected objects to a new location with the Positioning tool. Selecting and Deleting Wires You might wire nodes incorrectly. If you do, select the wire you want to delete and then press .
Chapter 9 Creating VIs Segment Junction Segment Bend 1 2 Selects a Segment Selects a Branch 3 Selects an Entire Wire Bad Wires A dashed wire represents a bad wire. You can get a bad wire for a number of reasons, such as connecting two controls, or connecting a source terminal to a destination terminal when the data types do not match (for instance, connecting a numeric to a Boolean). You can remove a bad wire by clicking on it with the Positioning tool and pressing .
Chapter 9 Creating VIs Activity 9-1. Create a VI Your objective is to build a VI. Imagine that you have sensors that read temperature and volume readings as voltage. You will use a VI in the BridgeVIEW\Activity directory to simulate the temperature and volume measurements in volts. You will write a VI to scale these measurements to degrees fahrenheit and liters, respectively. 1. Note Note Open a new front panel by selecting File»New.
Chapter 9 Creating VIs 7. Note Open the block diagram by choosing Windows»Show Diagram. Select the objects listed below from the Functions palette and place them on the block diagram. If the Functions palette is not visible, select Windows»Show Functions Palette to display the palette. You also can access the Functions palette by popping up in an open area of the block diagram. 8. Place each of the following objects on the block diagram.
Chapter 9 Creating VIs 10. Using the Wiring tool, wire the objects as shown. Note To move objects around on the block diagram, click on the Positioning tool in the Tools palette. 11. Select File»Save and save the VI as Temp & Vol.vi in the BridgeVIEW\Activity directory. 12. From the front panel, run the VI by clicking on the Run button. Notice values for Volume and Temperature are displayed on the front panel. 13. Close the VI by selecting File»Close. End of Activity 9-1.
Chapter 9 Creating VIs The following illustration is an example pop-up menu that appears while you are running a VI. You cannot add to or change the description while running the VI, but you can view any previously entered information. You also can view the description of a front panel object by showing the Help window (Help»Show Help) and moving the cursor over the object. Activity 9-2. Document a VI Your objective is to document a VI that you have created. BridgeVIEW User Manual 1.
Chapter 9 3. © National Instruments Corporation Creating VIs Pop up on the tank and choose Data Operations»Description…. Type the description for the indicator, as shown in the following illustration, and click OK.
Chapter 9 Creating VIs 4. Pop up on the thermometer and choose Data Operations» Description…. Type in the description: Displays simulated temperature (deg F) measurement. Click on OK. 5. Select Show Help from the Help menu. Place the cursor on Volume and then on Temp. You can see the descriptions you typed in appear in the help window. 6. Save and close the VI. End of Activity 9-2. What is a SubVI? A subVI is much like a subroutine in text-based programming languages.
Chapter 9 Creating VIs You can use buttons on the Hierarchy window toolbar or the View menu, or pop up on an empty space in the window to access the following options. For more information about the Hierarchy window see the Using the Hierarchy Window section in Chapter 3, Using SubVIs, of the G Programming Reference Manual. Redraw—Rearranges nodes after successive operations on hierarchy nodes if you need to minimize line crossings and maximize symmetric aesthetics.
Chapter 9 Creating VIs can pop up on a VI or subVI node to access a menu with options, such as showing or hiding subVIs, opening the VI or subVI front panel, editing the VI icon, and so on. Search Hierarchy You also can search currently visible nodes in the Hierarchy window by name. You initiate the search by typing in the name of the node, anywhere on the window. As you type in the text, a search string appears, which displays the text as you type it in and concurrently searches through the hierarchy.
Chapter 9 Creating VIs The tools to the left of the editing area perform the following functions: Pencil tool—Draws and erases pixel by pixel. Line tool—Draws straight lines. Press and then drag this tool to draw horizontal, vertical, and diagonal lines. Color Copy tool—Copies the foreground color from an element in the icon. Fill bucket tool—Fills an outlined area with the foreground color. Rectangle tool—Draws a rectangular border in the foreground color.
Chapter 9 Creating VIs The buttons at the right of the editing screen perform the following functions: • Undo—Cancels the last operation you performed. • OK—Saves your drawing as the VI icon and returns to the front panel. • Cancel—Returns to the front panel without saving any changes. Depending on the type of monitor you are using, you can design a separate icon for monochrome, 16-color, and 256-color mode. You design and save each icon version separately.
Chapter 9 Creating VIs The icon of a VI represents it as a subVI in the block diagram of other VIs. It can be a pictorial representation of the purpose of the VI, or a textual description of the VI. Note 1. Open Temp & Vol.vi in the BridgeVIEW\Activity directory. 2. From the front panel, pop up on the icon in the top right corner and select Edit Icon…. You also can double click on the icon to invoke the icon editor. You only can access the icon/connector for a VI from the front panel. 3.
Chapter 9 Creating VIs 8. Pop up on the connector pane and select Rotate 90 Degrees. Notice how the connector pane changes, as shown at left. 9. Assign the terminals to Temp and Volume. a. Click on the top terminal in the connector. The cursor automatically changes to the Wiring tool, and the terminal turns black. b. Click on the Temp indicator. A moving dashed line frames the indicator, as shown in the following illustration.
Chapter 9 Creating VIs Opening, Operating, and Changing SubVIs You can open a VI used as a subVI from the block diagram of the calling VI by double-clicking on the subVI icon or by selecting Project»This VI’s SubVIs. You will see a palette containing all the subVIs of the calling VI. Select the subVI you want to open. Any changes you make to a subVI alter only the version in memory until you save the subVI. The changes affect all instances of the subVI and not just the node you used to edit the VI.
Chapter 9 Creating VIs Block Diagram 5. Go to the block diagram by selecting Windows»Show Diagram. 6. Pop up in a free area of the block diagram and choose Functions»Select a VI…. A dialog box appears. Select Temp & Vol.vi in the BridgeVIEW\Activity directory. Click on Open in the dialog box. BridgeVIEW places the Temp & Vol VI on the block diagram. 7. Add the other objects to the block diagram as shown in the following illustration.
Chapter 9 Creating VIs How Do You Debug a VI? A VI cannot compile or run if it is broken. Normally, the VI is broken while you are creating or editing it, until you wire all the icons in the diagram. If it still is broken when you finish, try selecting Remove Bad Wires from the Edit menu. Often, this fixes a broken VI. When your VI is not executable, a broken arrow appears instead of the Run button. To list the errors, click on the broken Run button.
Chapter 9 Creating VIs Activity 9-5. Debug a VI in BridgeVIEW Your objective is to use the probe tool and the probe window and to examine data flow in the block diagram using the execution highlighting feature. Note 1. Open Using Temp & Vol.vi from the BridgeVIEW\Activity directory. 2. Select Windows»Show Diagram. 3. If the Tools palette is not open, select Windows»Show Tools Palette. 4. Select the Probe tool from the Tools palette.
Chapter 9 6. Creating VIs Close the Probe window by clicking in the close box at the top of the Probe window title bar. Another useful debugging technique is to examine the flow of data in the block diagram using the execution highlighting feature. 7. Return to the block diagram of the VI. 8. Begin execution highlighting by clicking on the Highlight Execution button, in the toolbar. The Highlight Execution button changes to an illuminated light bulb. 9.
10 Customizing VIs This chapter introduces the basic concepts used for customizing VIs. There are several ways to configure how your VIs execute. You access these options by popping up on the icon pane in the upper-right corner of the front panel and choosing VI Setup…. A VI Setup dialog box appears showing setup options for execution of the VI, appearance of the panel, and documentation. You can learn how to use these options in Activity 10-1, in this chapter.
Chapter 10 Customizing VIs calling VI), and choosing SubVI Node Setup…. The following illustration shows the SubVI Node Setup dialog box. Note If you select an option from the VI Setup… dialog box of a VI, the option applies to every instance of that VI. If you select an option from the SubVI Node Setup dialog box, the option applies only to that particular node. Activity 10-1.Use Setup Options for a SubVI Your objective is to build a VI that prompts the operator to enter information.
Chapter 10 Customizing VIs Block Diagram 2. Build the block diagram shown in the following illustration. 3. Create the icon for the VI as shown at left. To access the Icon Editor, pop up on the icon pane of the front panel and select Edit Icon. 4. Switch to the connector pane by popping up on the icon pane and selecting Show Connector. 5. Build the connector. Notice that the default connector pane is not what you see illustrated to the left.
Chapter 10 Customizing VIs the icon, as shown in the following illustration. After creating the connector, return to the icon display. 6. Save the VI as Get Operator Info.vi in the BridgeVIEW\ Activity directory. 7. Now you can customize the VI with the VI setup options to make it look like a dialog box. a. BridgeVIEW User Manual Pop up on the icon and select VI Setup. Configure the Execution Options as shown in the following illustration.
Chapter 10 b. Customizing VIs Select Window Options and make the selections shown in the following illustration. 8. After you finish with the VI Setup options, resize the front panel as shown in the following illustration so you do not see the three string indicators. 9. Save and close the VI. Now you will use this VI as a subVI.
Chapter 10 Customizing VIs Front Panel 10. Open a new front panel. 11. Place a Waveform Chart (Controls»Graph) on the front panel and label it Temperature Data. 12. Modify the scale of the chart, so that its upper limit is set to 90.0 and its lower limit is set to 70.0. Pop up on the chart and choose Show»Legend to hide the legend. Pop up on the chart again and choose Show»Palette to hide the palette. 13. Build the rest of the front panel as shown in the following illustration.
Chapter 10 Customizing VIs Block Diagram 14. Create a Sequence structure and add the following to frame 0, as shown in the following illustration. Get Date/Time String function (Functions»Time & Dialog)—Outputs the current date and time. Get Operator Info VI (Functions»Select a VI… from the BridgeVIEW\Activity directory)—Pops open its front panel and prompts the user to enter a name, the date, and the time. Boolean constant (Functions»Boolean)—Controls whether the input date and time string are TRUE.
Chapter 10 Customizing VIs 17. Add the objects shown in the following illustration. Temp & Vol VI (Functions»Select a VI… from the BridgeVIEW\ Activity directory)—Returns one temperature measurement from a simulated temperature sensor. Wait Until Next ms Multiple function (Functions»Time & Dialog) — Causes the For Loop to execute in ms.
11 Loops and Charts This chapter introduces structures and explains the basic concepts of charts, the While Loop, and the For Loop.
Chapter 11 Loops and Charts Charts A chart is a numeric plotting indicator which is updated with new data periodically. You can find two types of charts in the Controls»Graph palette: waveform chart (or real-time trend) and intensity chart. You can customize charts to match your data display requirements or to display more information. Features available for charts include: a scrollbar, a legend, a palette, a digital display, and representation of scales with respect to time.
Chapter 11 Loops and Charts Faster Chart Updates You can pass an array of multiple values to the chart. The chart treats these inputs as new data for a single plot. Refer to the charts.vi example located in G Examples\General\Graphs\charts.llb. Overlaid Versus Stacked Plots You can display multiple plots on a chart using a single vertical scale, called overlaid plots, or using multiple vertical scales, called stacked plots. Refer to the charts.vi example located in G Examples\General\ Graphs\charts.llb.
Chapter 11 Loops and Charts While Loops A While Loop is a structure that repeats a section of code until a condition is met. It is comparable to a Do Loop or a Repeat-Until Loop in traditional programming language. The While Loop, shown in the following illustration, is a resizable box you use to execute the diagram inside it until the Boolean value passed to the conditional terminal (an input terminal) is FALSE.
Chapter 11 Loops and Charts Front Panel Note 1. Open a new front panel by selecting File»New. 2. Place a Vertical Switch (Controls»Boolean) on the front panel. Label the switch Enable. 3. Use the Labeling tool to create free labels for ON and OFF. Select the Labeling tool, and type in the label text. With the Color tool, shown at left, make the border of the free label transparent by selecting the T in the bottom left corner of the Color palette. 4.
Chapter 11 Loops and Charts 8. Rescale the knob. Using the Labeling tool, double-click on 10.0 in the scale around the knob, and replace it with 2.0. 9. Open the block diagram and create the diagram in the following illustration. Block Diagram a. Place the While Loop in the block diagram by selecting it from Functions»Structures. The While Loop is a resizable box that is not dropped on the diagram immediately. Instead, you have the chance to position and resize it.
Chapter 11 Loops and Charts 13. Stop the VI by clicking on the vertical switch. Turning the switch off sends the value FALSE to the loop conditional terminal and stops the loop. 14. Scroll through the chart. Click and hold down the mouse button on either arrow in the scrollbar. 15. Clear the display buffer and reset the chart by popping up on the chart and choosing Data Operations»Clear Chart. Note The display buffer default size is 1,024 points.
Chapter 11 Loops and Charts a check mark in a dialog box; it becomes highlighted but does not change until you release the mouse button. Switch Until Released action —Changes the control value when you click on the control. It retains the new value until you release the mouse button, at which time the control reverts to its original value. The action is similar to that of a doorbell, and is not affected by how often the VI reads the control.
Chapter 11 Note Loops and Charts b. Pop up on the switch and choose Data Operations»Make Current Value Default. This makes the ON position the default value. c. Pop up on the switch and choose Mechanical Action»Latch When Pressed. 3. Run the VI. Click on the Enable switch to stop the acquisition. The switch moves to the OFF position momentarily and is reset back to the ON position. 4. Save the VI.
Chapter 11 Loops and Charts Wait Until Next ms Multiple function (Functions»Time & Dialog)— Multiply the knob terminal by 1,000 to convert the knob value in seconds to milliseconds. Use this value as the input to the Wait Until Next ms Multiple function. Multiply function (Functions»Numeric)—The multiply function multiplies the knob value by 1000 to convert seconds to milliseconds.
Chapter 11 Loops and Charts The subdiagram for the TRUE condition contains the work of the While Loop. The test for continuation occurs outside the Case structure, and the results are wired to the conditional terminal of the While Loop and the selector terminal of the Case structure. In the following illustration, labels represent the pretest condition.
Chapter 11 Loops and Charts The shift register contains a pair of terminals directly opposite each other on the vertical sides of the loop border. The right terminal stores the data upon the completion of an iteration. That data shifts at the end of the iteration and appears in the left terminal at the beginning of the next iteration, as shown in the following illustration. A shift register can hold any data type—numeric, Boolean, string, array, and so on.
Chapter 11 Loops and Charts For example, if a shift register contains three elements in the left terminal, you can access values from the last three iterations, as shown in the following illustration. Previous values are available at the left terminal. Contains i–1 Contains i–2 Contains i–3 Pop up on left terminal to add new elements or use Positioning tool to resize the left terminal to expose more elements. Latest value passes to the right terminal. Pop up on border for new shift register.
Chapter 11 Loops and Charts 3. After adding the vertical switch, pop up on it and select Mechanical Action»Latch When Pressed and set the ON state to be the default by choosing Operate»Make Current Values Default. 4. Build the block diagram shown in the following illustration. 5. Add the While Loop (Functions»Structures) in the block diagram and create the shift register. Block Diagram a. Pop up on the left or right border of the While Loop and choose Add Shift Register. b.
Chapter 11 Loops and Charts Wait Until Next ms Multiple function (Functions»Time & Dialog) —This function ensures that each iteration of the loop occurs no faster than the millisecond input. The input is 500 milliseconds for this activity. If you pop up on the icon and choose Show»Label, the label Wait Until Next ms Multiple appears. 6. Pop up on the input of the Wait Until Next ms Multiple function and select Create Constant. A numeric constant appears and is automatically wired to the function. 7.
Chapter 11 Loops and Charts Each time the VI is called, running average is computed from the new input and the previous three values. Then the new value is saved into the shift register, and the previous two values are moved up in the shift register. There is no input value wired to the input side of the left shift registers, so all three values are preserved for the next execution of the VI. Because this subVI has nothing wired to the condition terminal, it executes exactly once when called.
Chapter 11 Loops and Charts Activity 11-6. Create a Multiplot Chart and Customize Your Trends Your objective is to create a chart that can accommodate more than one plot. Front Panel 1. Open the Random Average.vi you created in Activity 11-5. 2. Modify the Front Panel as shown in the following illustration. © National Instruments Corporation a. Using the Positioning tool, stretch the legend to include two plots. b.
Chapter 11 Loops and Charts Block Diagram 3. Modify the block diagram, as shown in the following illustration, to display both the average and the current random number on the same chart. Bundle function (Functions»Cluster)—In this activity, the Bundle function bundles the average and current value for plotting on the chart. The bundle node appears as shown at left when you place it in the block diagram.
Chapter 11 Loops and Charts buttons to explore their operation, scroll the area displayed, or zoom in on areas of the chart. 7. Note Format the scales of the waveform chart to represent either absolute or relative time. To select the x scale time format, pop up on the x-scale and select Formatting…. a. Choose absolute time by selecting the Time & Date option from the Format and Precision menu ring. This changes the dialog box to the one shown below.
Chapter 11 Loops and Charts 9. Run the VI. 10. Save the VI as Multiple Random Plot.vi in the BridgeVIEW\ Activity directory. End of Activity 11-6. For Loops A For Loop executes a section of code a defined number of times. It is resizable, and, like the While Loop, is not dropped on the block diagram immediately. Instead, a small icon representing the For Loop appears in the block diagram, and you have the opportunity to size and position it.
Chapter 11 Loops and Charts Loop Count Numerical Input Numerical Output The For Loop executes the diagram inside its border a predetermined number of times. The For Loop has two terminals, explained below. Count terminal (an input terminal)—The count terminal specifies the number of times to execute the loop. Iteration terminal (an output terminal)—The iteration terminal contains the number of times the loop has executed.
Chapter 11 Loops and Charts terminal. As a reminder, G places a gray dot, called a coercion dot, on the terminal where the conversion takes place. For example, consider the For Loop count terminal. The terminal representation is a long integer. If you wire a double-precision, floating-point number to the count terminal, G converts the number to a long integer. Notice the gray dot in the count terminal of the first For Loop.
Chapter 11 Loops and Charts a. Place a digital indicator on the front panel and label it Maximum Value. b. Place a waveform chart on the front panel and label it Random Data. Change the scale of the chart to range from 0.0 to 1.0. c. Pop up on the chart and choose Show»Scrollbar and Show»Digital Display. Pop up and hide the palette and legend. d. Resize the scrollbar with the positioning tool. Block Diagram 2. Open the block diagram and modify it as shown in the following illustration. 3.
Chapter 11 Loops and Charts run of the VI. Therefore, you could get a maximum output value that is not related to the current set of collected data. Max & Min function (Functions»Comparison)—Takes two numeric inputs and outputs the maximum value of the two in the top right corner and the minimum of the two in the bottom right corner. Because you only are interested in the maximum value for this exercise, wire only the maximum output and ignore the minimum output. 6. Note Wire the terminals as shown.
Case and Sequence Structures and the Formula Node 12 This chapter introduces the basic concepts of Case and Sequence structures and the Formula Node, and provides activities that explain the following: • How to use the Case structure • How to use the Sequence structure • What sequence locals are and how to use them • What a Formula Node is and how to use it Both Case and Sequence structures can have multiple subdiagrams, configured like a deck of cards, of which only one is visible at a time.
Chapter 12 Case and Sequence Structures and the Formula Node Case Structure The Case structure has two or more subdiagrams, or cases, exactly one of which executes when the structure executes. This depends on the value of an integer, Boolean, string, or enum value you wire to the external side of the selection terminal or selector. A Case structure is shown in the following illustration. Note Case statements in other programming languages generally do not execute any case if a case is out of range.
Chapter 12 Case and Sequence Structures and the Formula Node Block Diagram 2. Build the diagram as shown in the following illustration. Selection Terminal 3. Place a Case structure in the block diagram by selecting it from Functions»Structures. The Case structure is a resizable box that is not dropped on the diagram immediately. Instead, you have the chance to position it and resize it. To do so, click in an area above and to the left of all the terminals you want to be inside the Case structure.
Chapter 12 Case and Sequence Structures and the Formula Node One Button Dialog function (Functions»Time & Dialog)—In this activity, the function displays a dialog box that contains the message Error...Negative Number. String Constant (Functions»String)—Enter text inside the box with the Labeling tool. The VI executes either the TRUE case or the FALSE case. If the number is greater than or equal to zero, the VI executes the TRUE case and returns the square root of the number. The FALSE case outputs –99999.
Chapter 12 Case and Sequence Structures and the Formula Node Sequence Structures The Sequence structure, which looks like frames of film, executes block diagrams sequentially. In conventional programming languages, the program statements execute in the order in which they appear. In data flow programming, a node executes when data is available at all of the node inputs, although sometimes it is necessary to execute one node before another.
Chapter 12 Case and Sequence Structures and the Formula Node The Number to Match control contains the number you want to match. The Current Number indicator displays the current random number. The # of iterations indicator displays the number of iterations before a match. Time to Match indicates how many seconds it took to find the matching number. Modifying the Numeric Format By default, BridgeVIEW displays values in numeric controls in decimal notation with two decimal places (for example, 3.14).
Chapter 12 Case and Sequence Structures and the Formula Node Setting the Data Range With the Data Range… option, you can prevent a user from setting a control or indicator value outside a preset range or increment. Your options are to ignore the value, coerce it to within range, or suspend execution. The range error symbol appears in place of the run button in the toolbar when a range error suspends execution. Also, a solid, dark border frames the control that is out of range. 6.
Chapter 12 Case and Sequence Structures and the Formula Node BridgeVIEW User Manual 12-8 © National Instruments Corporation
Chapter 12 Case and Sequence Structures and the Formula Node Frame 0 in the previous illustration contains a small box with an arrow in it. That box is a sequence local variable which passes data between frames of a Sequence structure. You can create sequence locals on the border of a frame. Then, the data wired to a frame sequence local is available in subsequent frames. However, you cannot access the data in frames preceding the frame in which you created the sequence local. 13.
Chapter 12 Case and Sequence Structures and the Formula Node Round to Nearest function (Functions»Numeric)—In this activity, the function rounds the random number between 0 and 100 to the nearest whole number. Not Equal? function (Functions»Comparison)—In this activity, the function compares the random number to the number specified in the front panel and returns a TRUE if the numbers are not equal. Otherwise, this function returns FALSE.
Chapter 12 Case and Sequence Structures and the Formula Node Formula Node The Formula Node is a resizable box that you can use to enter formulas directly into a block diagram. You place the Formula Node on the block diagram by selecting it from Functions»Structures. This feature is useful when an equation has many variables or is otherwise complicated.
Chapter 12 Case and Sequence Structures and the Formula Node The following example shows how you can perform a conditional assignment inside a Formula Node. Consider a code fragment that computes the square root of x if x is positive, and assigns the result to y. If x is negative, the code assigns –99 to y. if (x >= 0) then y = sqrt(x) else y = -99 end if You can implement the code fragment using a Formula Node, as shown in the following illustration.
Chapter 12 Case and Sequence Structures and the Formula Node Activity 12-3. Use the Formula Node Your objective is to build a VI that uses the Formula Node to calculate the following equations. 3 2 y1 = x – x + 5 y2 = m × x + b where x ranges from 0 to 10. You will use only one Formula Node for both equations, and you will graph the results on the same graph. For more information on graphs, see Chapter 14, Arrays, Clusters, and Graphs. Front Panel 1.
Chapter 12 Case and Sequence Structures and the Formula Node Block Diagram 3. Build the block diagram shown in the following illustration. Formula Node (Functions»Structures). With this node, you can enter formulas directly. Create the three input terminals by popping up on the border and choosing Add Input. You create the output terminal by choosing Add Output from the pop-up menu. When you create an input or output terminal, you must give it a variable name.
Chapter 12 5. Case and Sequence Structures and the Formula Node Save the VI as Equations.vi in the BridgeVIEW/Activity directory. End of Activity 12-3. Artificial Data Dependency Nodes not connected by a wire can execute in any order. Nodes do not necessarily execute in left-to-right, top-to-bottom order. A Sequence structure is one way to control execution order when natural data dependency does not exist.
Front Panel Object Attributes 13 This chapter describes objects called attribute nodes, which are special block diagram nodes that control the appearance and functional characteristics of controls and indicators. With attribute nodes, you can set attributes such as display colors, visibility, position, blinking, trend scales, and many more.
Chapter 13 Front Panel Object Attributes Because there are many different attributes for front panel objects, you can use the Help window to display the descriptions, data types, and acceptable values of attributes. Access the Help window by selecting Help»Show Help. For more information about accessing help in BridgeVIEW, see the section How Do You Access Online Help? in Chapter 2, BridgeVIEW Environment, of this manual.
Chapter 13 Front Panel Object Attributes Activity 13-1. Use an Attribute Node Your objective is to create a VI that indicates a high limit condition using attribute nodes. You will use the Fill Color attribute of a Tank indicator to indicate whether a randomly generated tank level has gone above the user-defined limit. Front Panel 1. Open a new front panel and create it as shown in the following illustration. 2. Rescale the tank from 0.0 to 100.0. 3. Set the default Limit Setting to 50.00. 4.
Chapter 13 Front Panel Object Attributes Not function (Functions»Boolean)—In this exercise, the Not function inverts the value of the STOP button so that the While Loop executes repeatedly until you click the STOP button. (The default state of the button is FALSE.) Random Number Generator (Functions»Numeric)—Generates raw data between 0 and 1 to fill the tank on your front panel. You multiply this value by 100 to create a value between 0 and 100.
14 Arrays, Clusters, and Graphs This chapter introduces the basic concepts of polymorphism, arrays, clusters, and graphs and provides activities that explain auto-indexing and the Graph and Analysis VIs. Arrays An array is a collection of data elements that are all the same type. An array has one or more dimensions and up to 231 – 1 elements per dimension, memory permitting. You access each array element through its index.
Chapter 14 Note Arrays, Clusters, and Graphs You also can create an array and its corresponding control on the front panel and then copy or drag the array control to the block diagram to create a corresponding constant. For more information on how to create array controls and indicators on the front panel, see Chapter 14, Array and Cluster Controls and Indicators, in the G Programming Reference Manual. There are several ways to create and initialize arrays on the block diagram.
Chapter 14 Arrays, Clusters, and Graphs tunnel By default, auto-indexing is disabled for every array wired to a While Loop. Pop up on the array tunnel of a While Loop to enable auto-indexing. Activity 14-1. Create an Array with Auto-Indexing Your objective is to create an array using the auto-indexing feature of a For Loop and plot the array in a waveform graph. You will build a VI that generates an array using the Generate Waveform VI and plots the array in a waveform graph.
Chapter 14 Arrays, Clusters, and Graphs 3. Place a digital indicator from Controls»Numeric inside the element display of the array shell, as the following illustration shows. This indicator displays the array contents. 4. Place a waveform graph from Controls»Graph in the front panel. Label the graph Waveform Graph. 5. Enlarge the graph by dragging a corner with the Resizing cursor. 6. Hide the legend and palette. 7.
Chapter 14 Arrays, Clusters, and Graphs Bundle function (Functions»Cluster)—Assembles the plot components into a cluster. You need to resize the Bundle function icon before you can wire it properly. Place the Positioning tool on the lower-left corner of the icon. The tool transforms into the Resizing cursor shown at left. When the tool changes, click and drag down until a third input terminal appears. Now, you can continue wiring your block diagram as shown in the previous illustration.
Chapter 14 Arrays, Clusters, and Graphs In the previous block diagram, you specified an initial X and a delta X value for the waveform. The default initial X value is zero and the delta X value is 1. So, you can wire the waveform array directly to the waveform graph terminal without the initial X and delta X specified, as the following illustration shows. 1D Array 13. Return to the block diagram. Delete the Bundle function and the numeric constants wired to it.
Chapter 14 Arrays, Clusters, and Graphs 15. Continue building your block diagram as shown in the preceding block diagram. Sine function (Functions»Numeric»Trigonometric)—In this activity, you use the function in a For Loop to build an array of points that represents one cycle of a sine wave. Build Array function (Functions»Array)—In this exercise, you use this function to create the proper data structure to plot two arrays on a waveform graph, which in this case is a 2D array.
Chapter 14 Arrays, Clusters, and Graphs Activity 14-2. Use Auto-Indexing on Input Arrays Your objective is to open and operate a VI that uses auto-indexing in a For Loop to process an array. 1. Open the Separate Array Values VI by selecting File»Open…. The VI is located in Examples\G Examples\General\arrays.llb. 2. Open the block diagram. The following illustration shows the block diagram with both TRUE and FALSE cases visible.
Chapter 14 Arrays, Clusters, and Graphs Using Auto-Indexing to Set the For Loop Count Notice that the count terminal is left unwired. When you use auto-indexing on an array entering a For Loop, the loop executes according to the size of the array, eliminating the need to wire a value to the count terminal. If you use auto-indexing for more than one array, or if you set the count in addition to auto-indexing an array, the actual number of iterations is the smallest number possible. 3. Run the VI.
Chapter 14 Arrays, Clusters, and Graphs Build Array function (Functions»Array)—You can use it to create an array from scalar values or from other arrays. Initially, the Build Array function appears with one scalar input. You can add as many inputs as you need to the Build Array function, and each input can be either a scalar or an array. To add more inputs, pop up on the left side of the function and select Add Element Input or Add Array Input.
Chapter 14 Arrays, Clusters, and Graphs if element is a long integer with the value of five and dimension size has a value of 100, the result is a 1D array of 100 long integers all set to five. You can wire the inputs from front panel control terminals, as shown in the preceding illustration, from block diagram constants, or from calculations on other parts of your diagram.
Chapter 14 Arrays, Clusters, and Graphs 3 2 5 1 4 2 2 3 Size = 2 Rows 3 Columns 2D Array Array Subset You can use this function to extract a portion of an array or matrix. Array Subset returns a portion of an array starting at index and containing length elements. The following illustrations show examples of Array Subsets. Notice that the array index begins with 0.
Chapter 14 Arrays, Clusters, and Graphs Index Array The Index Array function accesses an element of an array. The following illustration shows an example of an Index Array function accessing the third element of an array. Notice that the index of the third element is 2 because the first element has index 0. 1D Array 3 2 5 7 1 4 Index 2 5 Element 2 You also can use this function to slice off one or more dimensions of a multi-dimensional array to create a subarray of the original.
Chapter 14 Arrays, Clusters, and Graphs Notice that the index terminal symbol changes from a solid to an empty box when you disable indexing. To restore a disabled index, use the Enable Indexing command from the same menu. You can extract subarrays along any combination of dimensions. The following illustration shows how to extract a 1D row or column arrays from a 2D array.
Chapter 14 Arrays, Clusters, and Graphs Thus, you can interpret the lower left preceding example as a command to generate a 1D array of all elements at column 0 and row 3. You can interpret the upper right example as a command to generate a 2D array of page 1. The new, 0th element is the one closest to the original, as shown in the preceding illustration. Activity 14-3. Use the Build Array Function Your objective is to use the Build Array function to combine elements and arrays into one bigger array.
Chapter 14 Arrays, Clusters, and Graphs Block Diagram 7. Place a Build Array function (Functions»Array) on the block diagram. Expand it with the Positioning tool to have five inputs. 8. Pop up on the first input in the Build Array node and select Change to Array. Do the same for the fourth input. 9. Wire the arrays and scalars to the node.
Chapter 14 Arrays, Clusters, and Graphs What is Polymorphism? Polymorphism is the ability of a function to adjust to input data of different types, dimensions, or representations. Most G functions are polymorphic. For example, the following illustrations show some of the polymorphic combinations of the Add function. Combination Result Scalar + Scalar Scalar Scalar + Array Array Array + Array Array In the first combination, the two scalars are added together, and the result is a scalar.
Chapter 14 Arrays, Clusters, and Graphs block diagram). In G, use the Bundle function to assemble a cluster. For more information about Clusters refer to Chapter 14, Array and Cluster Controls and Indicators, in the G Programming Reference Manual. Graphs A graph is a two-dimensional display of one or more data arrays called plots.
Chapter 14 Major Grids Arrays, Clusters, and Graphs Minor Grids Y Scale Legend X Scale Palette Graph Cursors You can place cursors and a cursor display on all the graphs in G, and you can label the cursor on the plot. You can set a cursor to lock onto a plot, and you can move multiple cursors at the same time. There is no limit to the number of cursors a graph can have. The following illustration shows a waveform graph with the cursor display.
Chapter 14 Arrays, Clusters, and Graphs Graph Axes You can format the scales of a graph to represent either absolute or relative time. Use absolute time format to display the time, date, or both for your scale. If you do not want G to assume a date, use relative time format. To select absolute or relative time format, pop up on the chart and select the scale you want to modify. Select Formatting…. This enables the Formatting dialog box, which you can use to specify different attributes of the chart.
Chapter 14 Arrays, Clusters, and Graphs The Temperature waveform chart displays the temperature as it is acquired. After acquisition, the VI plots the data in Temp Graph. The Mean, Max, and Min digital indicators display the average, maximum, and minimum temperatures. Block Diagram 2. Build the block diagram as shown in the following illustration: Digital Thermometer VI (Functions»Select a VI from the BridgeVIEW\Activity directory)—Returns one temperature measurement.
Chapter 14 Arrays, Clusters, and Graphs Wait Until Next ms Multiple function (Functions»Time & Dialog)— In this exercise, this function ensures the For Loop executes every 0.25 seconds (250 ms). Numeric constant (Functions»Numeric)—You also can pop up on the Wait Until Next ms Multiple function and select Create Constant to automatically create and wire the numeric constant.
Chapter 14 Arrays, Clusters, and Graphs Intensity Plots BridgeVIEW has two methods for displaying 3D data: the intensity chart and the intensity graph. Both intensity plots accept 2D arrays of numbers, where each number is mapped to a color. You can define the color mapping interactively, using an optional color ramp scale, or programmatically, using an attribute node for the chart. For examples using the intensity chart and graph, refer to intgraph.llb in the Examples\General\Graphs directory.
15 Application Control This chapter introduces the VI Server and provides an activity that explains how to use it within BridgeVIEW. The VI Server allows you to control when a VI is loaded into memory, run, and unloaded from memory.
Chapter 15 Application Control What is the VI Server? The VI Server is a G programming mechanism that lets you programmatically control properties and the execution of VIs. You can use the VI Server to open, call, and close other VIs dynamically, and to manipulate VI properties. The VI Server is used from the Open VI Reference, Invoked Node, and Close Application or VI Reference functions in the Application Control menu.
Chapter 15 Application Control the TRUE value is passed into a Case structure and each case contains the appropriate subVI, as shown in the previous illustration. The disadvantage of the above approach is that all subVIs are in memory at all times, regardless of which ones are needed. If each subVI is large, your main menu VI might require a large amount of memory. To avoid using so much memory, you can use the VI Server to load and execute VIs dynamically.
Chapter 15 Application Control Activity 15-1. Use the VI Server Your objective is to build a top-level VI that uses the VI Server to open, run, display, and close two other VIs. The top-level VI will load both subVIs dynamically. Then, the top-level VI will open and run the subVI chosen by the user. Front Panel 1. Open a new front panel. Place a waveform chart and label it Trend #1. Place a rectangular stop button and label it Close. Save the VI as HMI#1.vi in the BridgeVIEW\Activity directory. 2.
Chapter 15 Application Control 3. Save this VI as VI Control2.vi in the BridgeVIEW\Activity directory. This VI will call the HMI#1 and HMI#2 VIs. 4. Build the block diagram of VI Control2.vi, as shown in the following illustrations.
Chapter 15 Application Control The elements of the VI are described below. Open VI Reference (Functions»Application Control)—Opens the two VIs dynamically and loads them into memory. Path Control (Right-click on the Path input of the Open VI Reference and choose Create Control)—Provides the path to the subVIs to be called. Array String constant (Functions»Array)—Provide the name of the subVIs to be called, HMI#1.vi and HMI#2.vi.
Chapter 15 Application Control Not Function (Functions»Comparison)—The node inverts the Boolean state of the While Loop. 5. Save the VI. 6. Build the block diagram of HMI#1, as shown in the following illustration. 7. Save HMI#1.vi Save a copy of this VI as HMI#2.vi in the BridgeVIEW\Activity directory. 8. Close HMI#1.vi and HMI#2.vi. 9. Run VI Control2.vi. Make sure that you have entered the correct path in the VI path to HMI#1.vi & HMI#2.vi section. Click on the HMI#1 button.
16 Program Design Now that you are familiar with many aspects of G programming, you need to apply that knowledge to develop your own applications. This chapter suggests some techniques to use when creating programs and offers programming-style recommendations. Use Top-Down Design When you have a large project to manage, incorporate top-down design. G has an advantage over other programming languages with respect to top-down design because you can start with the final user interface then animate it.
Chapter 16 Program Design Operator Panel Initialize Manage State Terminate Read Data Process Data Write Data In some cases you might not need all these blocks or you might need different blocks. For example, some applications might include monitoring only, thus, you would not need to write data to the Real-Time Database. Alternatively, you might need additional blocks, such as blocks representing user prompts.
Chapter 16 Program Design Create the Program Now you are ready to create the program in G: • Use a modular approach by building subVIs where you find a logical division of labor or the potential for code reuse. • Solve your general problems along with your specific ones. • Test your subVIs as you create them. You might need to construct higher-level test routines, but you can catch the bugs in one small module more easily than in a hierarchy of several VIs.
Chapter 16 Program Design output that is used as the input to another subVI, try to align the input and output connections. This technique simplifies your wiring patterns. SubVIs with Required Inputs On the front panel, you can edit required inputs for subVIs by clicking the icon pane on the upper-right side of the window and choosing Show Connector»This Connection Is. From the submenu, choose between the Required, Recommended, or Optional options. The following illustration displays the submenu options.
Chapter 16 Program Design For example, examine the following diagram in which three similar operations run independently. An alternative to this design is a loop, which performs the operation three times. You can build an array of the different arguments and use auto-indexing to set the correct value for each iteration of the loop. If the array elements are constant, you can use an array constant instead of building the array on the block diagram.
Chapter 16 Program Design The BridgeVIEW Engine handles system events and errors reported by device servers. However, your VIs must handle any error conditions within their diagrams. For example, if a VI is unable to open a file properly, you might want the VI to halt or inform the user of the error through a dialog box. You also might want the VI to use an alternative path before alerting the user of the error. You can make these error-handling decisions in the block diagram of your VI.
Chapter 16 Program Design One of the main advantages in using the error input and output clusters is that you can use them to control the execution order of dissimilar operations. The error information generally is represented using a cluster containing a numeric error code, a string containing the name of the function that generated the error, and an error Boolean for quick testing. The following illustration shows how you can use this technique in your own applications.
Chapter 16 Program Design Notice that the preceding example still does not check for errors. For instance, if the file does not exist, the program does not display a warning. The following version of the block diagram illustrates one technique for handling this problem. In this example, the block diagram uses the error I/O inputs and outputs of these functions to propagate any errors to the Simple Error Handler VI.
HMI Function Reference A This appendix describes error handling for BridgeVIEW VIs and contains an explanation of the VIs in the BridgeVIEW VI library. In this appendix, the VIs are arranged alphabetically, first by VI Library name (Alarms and Events, Historical Data, System, Tags, and Tag Attributes), then by VI name. Error Handling in the BridgeVIEW VI Library Errors that occur in the VIs in the BridgeVIEW VI Library can be handled in one of two ways: by the BridgeVIEW Engine or by each VI.
Appendix A HMI Function Reference message. Using error in and error out clusters is a convenient way to check errors and to specify execution order by wiring the error output from one subVI to the error input of the next. status is TRUE if an error occurred before this VI was called, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code can be 0 or a warning code. code is the number identifying an error or warning. If status is TRUE, code is a nonzero error code.
Appendix A HMI Function Reference BridgeVIEW VI Library Many of the VIs in the BridgeVIEW VI Library are specific to BridgeVIEW, and are not part of the standard G library. These VIs include Alarms and Events VIs, Historical Data VIs, System VIs, Tags VIs, and Tag Attributes VIs. This section contains an explanation of the VIs specific to BridgeVIEW. The VIs are arranged alphabetically, first by VI palette name, then by VI name.
Appendix A HMI Function Reference Alarms and Events VIs Use the Alarms and Events VIs to acknowledge alarms, display alarm summary or event history information, or obtain alarm summary status information. The Alarms and Events subpalette is shown in the following illustration.
Appendix A HMI Function Reference Acknowledge Alarm Use the Acknowledge Alarm VI to acknowledge alarms on a tag or a group. Call this VI when an Acknowledge button is pressed in your HMI. You can call this VI multiple times from your HMI. group/tag names is the list of tags that have alarms to be acknowledged. ack alarm(T) determines whether alarms on tags in group/tag names is acknowledged. If FALSE, this VI does nothing except return the shutdown status. If unwired, this input is TRUE by default.
Appendix A HMI Function Reference Get Alarm Summary Status Use the Get Alarm Summary Status VI to check the status of alarms in the BridgeVIEW system. You can call this VI multiple times from your HMI. group/tag names determines the tags for which alarm status is to be read. Use group to get the status of all of the tag alarms in the system. read parameters is a cluster of parameters for filtering out the alarms for which status is checked. min priority is the minimum priority of alarms to read.
Appendix A HMI Function Reference Read Alarm Summary Use the Read Alarm Summary VI to display current alarm information for a set of tags or tag groups within a given alarm priority range. You also can filter out acknowledged alarms. This VI formats the alarm summary information for display in an Alarm Summary Display in your HMI. If you specify a timeout value greater than 0, this VI returns when the current alarm information changes, or the timeout value is exceeded, whichever occurs first.
Appendix A HMI Function Reference max priority is the maximum priority of alarms to read. If left unwired, alarms corresponding to priority level 15 and below are reported. filter ACK alarms? determines whether acknowledged alarms are read. group/tag names determines the tags for which alarm conditions are read. timeout (secs) (1) specifies how many seconds to wait before reading the tag alarms. If timeout is 0, the alarms are read immediately.
Appendix A HMI Function Reference Alarm Message determines whether to display the user-configured alarm message. This applies to discrete tags only. color codes is a cluster of parameters that determine the colors for the messages in the Alarm Summary Display. event determines the color for events. The Alarm Summary Display does not include events. ack alarm determines the color for acknowledged alarms. unack alarm determines the color for unacknowledged alarms.
Appendix A HMI Function Reference shutdown indicates that the BridgeVIEW Engine is shutting down. In this case, the Read Alarm Summary VI returns immediately with shutdown TRUE. You can use shutdown to exit any While Loop that calls Read Alarm Summary VI. changed? is TRUE if a new alarm was read. If changed? is FALSE, the Read Alarm Summary VI probably timed out before the Alarm Summary Display was updated.
Appendix A HMI Function Reference Read Event History Use the Read Event History VI to display all the alarms and events that have occurred for a set of tags or tag groups within a given alarm priority range. You also can filter out acknowledged tags. The Read Event History VI formats the event history information for display in an Event History Display indicator in your HMI.
Appendix A HMI Function Reference max priority is the maximum priority of alarms read. If left unwired, alarms corresponding to priority level 15 and below are reported. filter ACK alarms? determines whether acknowledged alarms are read. group/tag names determines the tags for which alarm conditions and events are read. timeout (secs)(1) specifies how many seconds to wait before reading the tag alarms and events. If timeout is 0, the alarms and events are read immediately.
Appendix A HMI Function Reference Operator Name determines whether to display the operator name. Alarm Message determines whether to display the user-configured alarm message. This applies to discrete tags only. color codes is a cluster of parameters that determine the colors for the messages in the Alarm Summary Display. event determines the color for events. ack alarm determines the color for acknowledged alarms. unack alarm determines the color for unacknowledged alarms.
Appendix A HMI Function Reference error indicates that an error occurred when executing the Read Event History VI. It was probably a problem with the group/tag name. shutdown indicates that the BridgeVIEW Engine is shutting down. In this case, the Read Event History VI returns immediately with shutdown TRUE. You can use shutdown to exit any While Loop that calls the Read Event History VI. changed? is TRUE if a new alarm or event was read.
Appendix A HMI Function Reference Read Tag Alarm Use the Read Tag Alarm VI to read detailed alarm status for a tag from the Real-Time Database. You probably want to use the Read Tag Alarm VI in the portion of your program where you monitor alarm information for specific tags. The Read Tag Alarm VI indicates whether a tag is in alarm, which alarm state it is in, when the alarm occurred, at which value it occurred, and whether it has been acknowledged.
Appendix A HMI Function Reference error indicates that an error occurred when executing Read Alarm Tag, or that the value returned by Read Tag Alarm is not valid. shutdown indicates that the BridgeVIEW Engine is shutting down. In this case, the Read Tag Alarm VI no longer waits for a change in the tag alarm state and returns immediately with both timeout and shutdown TRUE. You can use shutdown to exit any loop that uses the Read Tag Alarm VI.
Appendix A HMI Function Reference Historical Data VIs Use the Historical Data VIs to obtain or read historical data about a tag, resample trend data, compute statistical data for a historical trend, or convert historical trend data to a spreadsheet format. The Historical Data subpalette is shown below.
Appendix A HMI Function Reference Call HTV Use the Call HTV VI to include the Historical Trend Viewer (HTV) in your HMI application programmatically. Wire no inputs to launch the HTV in its default state, or wire one or more inputs to override the defaults. If the HTV is running when this VI is called, already running returns TRUE and the HTV appears at the front of the screen. The inputs are not used in this case. scf path is the path of the .
Appendix A HMI Function Reference error in is a cluster that describes the error status before this VI executes. For more information about this control, see the section Errors Not Reported by the BridgeVIEW Engine in this appendix. start time is the time to be displayed at the beginning of the trend. stop time is the time to be displayed at the end of the trend. already running indicates whether the HTV is running when the Call HTV VI executes. If the HTV is running, this VI returns TRUE.
Appendix A HMI Function Reference Decimate Historical Trend Use the Decimate Historical Trend VI to take XY historical trend data, and decimate (resample) it from the start timestamp to the stop timestamp. The decimated trend output is a 1D array of the value at each time interval from the start timestamp to the stop timestamp. check start/stop time? determines whether the requested start and stop times are checked against data available in the historical trends input.
Appendix A HMI Function Reference Decimate Historical Trends Use the Decimate Historical Trends VI to decimate (resample) XY historical trend data over the time interval specified from start timestamp to stop timestamp. The decimated trend output is a 2D array of instantaneous values, each time interval seconds apart, starting at start timestamp. Each column in the 2D array contains one decimated trend.
Appendix A HMI Function Reference decimated trends is a list of decimated historical trends starting at first timestamp. Each trend value is time interval seconds apart. first timestamp is the actual time associated with the first point in the decimated trend. last timestamp is the actual time associated with the last point in the decimated trend.
Appendix A HMI Function Reference Get Historical Tag List Use the Get Historical Tag List VI to obtain the list of tags that have historical data available in the historical database. Citadel path in is the path to the directory containing the Citadel historical database. If this path is empty, the VI attempts to use the historical data directory configured in the active .scf file. If this has not been configured, the VI prompts you to select a data directory.
Appendix A HMI Function Reference Get Historical Trend Info Use the Get Historical Trend Info VI to obtain the first and last timestamp available in the historical database for a given tag, and the type of the tag, whether analog or discrete. Citadel path in is the path to the directory containing the Citadel historical database. If this path is empty, the VI attempts to use the historical data directory configured in the active .scf file.
Appendix A HMI Function Reference Historical Trend Statistics Use the Historical Trend Statistics VI to compute statistical data for a historical trend. Statistics include minimum value, maximum value, average and standard deviations. The statistics skip invalid input points (where value = NaN). The average and standard deviation are weighted according to the time duration of each valid input point.
Appendix A HMI Function Reference The last point in the trend is not included in the standard deviation, because there is no known time interval associated with it. # stops is the number of transitions from logging on to logging off in the trend. # starts is the number of transitions from logging off to logging on in the trend.
Appendix A HMI Function Reference Historical Trends to Spreadsheet Use the Historical Trends to Spreadsheet VI to converts a set of historical trends into the tab delimited string format, which spreadsheet programs can read. The columns created are date, time, tag name 1 value, tag name 2 value, and so on. A header is created labelling the date, time, and tag names. The output of this VI can be saved in a file, and then imported into a spreadsheet program. You can wire in the delimiter you want.
Appendix A HMI Function Reference sample interval (1 sec) determines the time interval for each historical trend. If unwired, the data is sampled at one-second intervals. error in (no error) is a cluster that describes the error status before this VI executes. For more information about this control, see the section Errors Not Reported by the BridgeVIEW Enginein this appendix. start timestamp is the timestamp for which the spreadsheet rows start.
Appendix A HMI Function Reference Historical Trends to Spreadsheet File This VI stores the data from a set of historical trends into a spreadsheet file format. The columns created are date, time, tag1data, tag2data, and so on. A header is created labelling the date, time, and tag names. The default delimiter is the tab character; sending a different value via the format info input (such as a comma) will change the character used to separate columns.
Appendix A HMI Function Reference time format (System default) determines whether a 12-hour (AM/PM) or 24-hour format is used. seconds format (1 sec) determines how many digits of precision are displayed for timestamps. file path is the name of the spreadsheet file to store the historical data. If file path is empty (default value), or is Not A Path, the VI displays a file dialog box from which you can select a file. Error 43 occurs if the user cancels the dialog.
Appendix A HMI Function Reference Read Historical Trend Use the Read Historical Trend VI to read the historical data for a given tag from user specified start and stop dates and times, up to the maximum number of points specified. If start timestamp and stop timestamp are not wired, all historical data for the tag is returned, up to the maximum points per trend specified. If max points per trend is left unwired, all points between the start timestamp and stop timestamp are returned.
Appendix A HMI Function Reference historical trend is the tag trend data read from the historical database, starting at the date and time specified by start timestamp, and stopping at the date and time specified by stop timestamp or up to max points per trend, whichever is smaller. If these start timestamp and stop timestamp values are left unwired, all the logged data up to max points per trend for the tag is returned. timestamp is the date and time for value.
Appendix A HMI Function Reference Read Historical Trends Use the Read Historical Trends VI to read the historical data for a given set of tags from a user specified start and stop date and time, up to max points per trend. If the inputs for start timestamp and stop timestamp are not wired, all historical data for the tags is returned, up to the max points per trend specified. If max points per trend is left unwired, all points between start timestamp and stop timestamp are returned.
Appendix A HMI Function Reference historical trends is the tag trend data read from the historical database, starting at the date and time specified by start timestamp, and stopping at the date and time specified by stop timestamp or up to max points per trend, whichever is smaller. If these start and stop timestamp values are unwired, all the logged data up to max points per trend for the tag is returned. timestamp is the date and time for the value. value is the value of the tag at the timestamp.
Appendix A HMI Function Reference System VIs Use the System VIs to obtain information or monitor the access level of the current operator, to launch or shut down BridgeVIEW, or to enable or disable event logging, historical data logging or printing. The System subpalette is shown below.
Appendix A HMI Function Reference Enable Event Logging Use the Enable Event Logging VI to turn on or off logging of alarms and events for all tags in the system programmatically. Enable evt log (T) determines whether to turn event logging on or off. error in (no error) is a cluster that describes the error status before this VI executes. For more information about this control, see the section Errors Not Reported by the BridgeVIEW Engine in this appendix.
Appendix A HMI Function Reference Enable Historical Data Logging Use the Enable Historical Data Logging VI to turn on or off data logging for all tags in the system programmatically. Enable hst logging (T) determines whether to turn historical data logging on or off. error in (no error) is a cluster that describes the error status before this VI executes. For more information about this control, see the section Errors Not Reported by the BridgeVIEW Engine in this appendix.
Appendix A HMI Function Reference Enable Printing Use the Enable Printing VI to turn on or off printing of alarms and events for all tags in the system programmatically. Enable printing (T) determines whether to turn printing on or off. error in (no error) is a cluster that describes the error status before this VI executes. For more information about this control, see the section Errors Not Reported by the BridgeVIEW Engine in this appendix.
Appendix A HMI Function Reference Engine Launch Use the Engine Launch VI to launch the BridgeVIEW Engine programmatically. Normally the BridgeVIEW Engine is launched automatically when you execute any of the VIs that access the Real-Time Database. Use this VI if you want to control when the Engine is launched explicitly. If configuration file to use is unwired, BridgeVIEW automatically uses the last configuration file you viewed or edited. Use launch engine to control whether the Engine is launched.
Appendix A HMI Function Reference Engine Shutdown Use the Engine Shutdown VI to shut down the BridgeVIEW Engine from your HMI. You must terminate your application immediately after calling this VI. The BridgeVIEW Engine does not shut down until all VIs that are accessing the Real-Time Database finish. If you do not terminate your application, after a few seconds a dialog box prompts you to stop your application so that the BridgeVIEW Engine can complete shutdown.
Appendix A HMI Function Reference Get Engine Status Use this VI to query the BridgeVIEW engine status. The outputs indicate whether the engine is loaded, running, or shutting down, and which configuration file is being used. configuration file in use indicates which BridgeVIEW configuration file currently is in use. loaded indicates whether the BridgeVIEW engine currently is loaded. running indicates whether the BridgeVIEW engine currently is running.
Appendix A HMI Function Reference Get Tag Status Info Use the Get Tag Status Info VI to obtain status information associated with tags. Tag status information can be broken down into two types: • Status information from BridgeVIEW—This status can be from the Engine or a Server. It consists of details about the status and whether it is an error or warning. • Status information from a Server—Only the status code is reported. Check your server documentation for a description of this status.
Appendix A HMI Function Reference Post System Error or Event Use this VI to post an error or event message from your HMI to the System Error/Event display on the Engine Manager. The message you post is logged to the system log file in the BridgeVIEW\Syslog directory. The format of the message is as follows: EVENT/ERROR
Appendix A HMI Function Reference Tag Status Handler Use the Tag Status Handler VI to obtain a description of the tag status, by breaking it down into warning or error conditions coming from BridgeVIEW as well as the device server. It also identifies where the error or warning occurred.
Appendix A HMI Function Reference returned by the device server. The part of the message describing the server error code comes from the input you specify in server error descriptions. It also contains information about the source of the error.
Appendix A HMI Function Reference Security VIs BridgeVIEW User Manual A-46 © National Instruments Corporation
Appendix A HMI Function Reference Check Operator Privileges Use this VI to check the current user’s privileges and produce a Boolean output indicating if the currently logged in user has the privilege. Additional inputs can be sent to display a dialog box with a message (OK or OK/Cancel) and/or launch the login prompt if the current user does not have the requested privilege. privilege to check inspects the privileges of the current BridgeVIEW user to see if he or she has been granted this privilege.
Appendix A HMI Function Reference Get Operator Name Use the Get Operator Name VI to obtain the current operator name, access level, and access level name. operator name is the login name of the current BridgeVIEW user. access level is the numeric access level assigned to the current BridgeVIEW user. access level name is a descriptive name associated with the numeric access level assigned to the current BridgeVIEW user.
Appendix A HMI Function Reference Invoke Login Dialog Use the Invoke Login Dialog VI to launch the BridgeVIEW Login dialog box. If the user selects Cancel in the Login dialog box, the previous user remains active. operator name is the login name of the current BridgeVIEW user. access level is the numeric access level assigned to the current BridgeVIEW user. access level name is a descriptive name associated with the numeric access level assigned to the current BridgeVIEW user.
Appendix A HMI Function Reference Programmatic Login Use the Programmatic Login VI to programmatically log in a user. user name is the name of the user to be logged in to BridgeVIEW. user password is the password of the user to be logged in to BridgeVIEW. user name out is the name of the user to be logged in to BridgeVIEW. If the login fails, this is the name of the user currently logged in to BridgeVIEW. access level is the numeric access level assigned to the current BridgeVIEW user.
Appendix A HMI Function Reference Programmatic Logout Use this VI to log out the current user, so no operator is logged into the system. logout (T) determines if the current BridgeVIEW user should be logged out of the system. If TRUE, the current user is logged out of the BridgeVIEW system. If FALSE, the logout operation does not occur. logout message describes the result of the logout operation.
Appendix A HMI Function Reference Security Monitor Use this VI to monitor the access level of the current BridgeVIEW operator. By default, this VI times out after one second, returning to the current operator access level. When an operator logs in, this VI returns immediately. timeout (secs) (1) specifies how long to wait for a user to log in. visibility access level (0) determines the value of “Visible” attribute setting.
Appendix A HMI Function Reference User Account List Use this VI to generate a list of BridgeVIEW user accounts. user accounts is a list of BridgeVIEW user accounts. Tags VIs Use the Tags VIs to read the latest value for a tag, write a new value to a tag, or obtain data for a real-time trend. The Tags subpalette is shown below.
Appendix A HMI Function Reference Read Tag Use the Read Tag VI to read the latest value of a tag from the Real-Time Database. For immediate polling of the tag value, leave timeout (secs) unwired. To wait until the value is updated before reading it, wire a timeout value in seconds to timeout. The Read Tag VI returns with the most recent Real-Time Database value when it is updated, the timeout is exceeded, or the Real-Time Database is shutting down, whichever occurs first.
Appendix A HMI Function Reference value timestamp returns the timestamp for when the tag value was updated. error indicates that an error occurred when executing the Read Tag VI, or that the value output returned by Read Tag is not valid. See value status for the specific error condition. shutdown indicates that the BridgeVIEW Engine is shutting down. In this case, the Read Tag VI no longer waits for tags to be updated and returns immediately with both timeout and shutdown TRUE.
Appendix A HMI Function Reference Read Tag (bit array) Use the Read Tag (bit array) VI to read the latest value for a given bit array tag from the Real-Time Database. For immediate polling of the tag value, leave timeout (secs) unwired. To wait until the value is updated before reading it, wire a timeout value, in seconds, to the timeout input.
Appendix A HMI Function Reference value is the latest bit array value of the bit array tag read from the Real-Time Database. value timestamp returns the timestamp for when the tag value was last updated. error indicates that an error occurred when executing the Read Tag (bit array) VI, or that the value output returned by Read Tag (bit array) is not valid. See value status for the specific error condition. shutdown indicates that the BridgeVIEW Engine is shutting down.
Appendix A HMI Function Reference Read Tag (discrete) Use the Read Tag (discrete) VI to read the latest value for a given discrete (or Boolean) tag from the Real-Time Database. For immediate polling of the tag value, leave timeout (secs) unwired. To wait until the value is updated before reading it, wire a timeout value in seconds to timeout.
Appendix A HMI Function Reference value is the latest value of the discrete tag read from the Real-Time Database. value timestamp returns the timestamp for when the tag value was last updated. error indicates that an error occurred when executing the Read Tag (discrete) VI, or that the value output returned by Read Tag(discrete) is not valid. See value status for the specific error condition. shutdown indicates that the BridgeVIEW Engine is shutting down.
Appendix A HMI Function Reference Read Tag (string) Use the Read Tag (string) VI to read the latest value for the tag from the Real-Time Database. If timeout is 0, Read Tag (string) VI returns the current Tag value and update timestamp from the Real-Time Database, otherwise the Read Tag (string) VI waits up to the specified timeout for the tag to be updated in the Real-Time Database, and returns the new value. Note Use a separate Read Tag (string) VI for each tag you want to monitor.
Appendix A HMI Function Reference value timestamp returns the timestamp for when the tag value was last updated. error indicates that an error occurred when executing the Read Tag (string) VI, or that the value output returned by Read Tag(string) is not valid. See value status for the specific error condition. shutdown indicates that the BridgeVIEW Engine is shutting down. In this case, Read Tag (string) no longer waits for Tags to be updated and returns immediately with both timeout and shutdown TRUE.
Appendix A HMI Function Reference Trend Tags Use the Trend Tags VI to set data for a real-time trend chart in your HMI. The Trend Tags VI supports analog, discrete, and bit array tags. The Trend Tags VI formats data for one or more tags such that it can be wired directly to a trend (waveform chart). The Trend Tags VI returns after each time interval with the next set of points for the trend. Place each Trend Tags VI in its own While Loop, assuming that each loop is running at a different time interval.
Appendix A HMI Function Reference Write Tag Use the Write Tag VI to update the Real-Time Database with a new value for memory, output, and Input/Output tags. The value also is sent to the server if it is an output or Input/Output tag. If the tag is an input only tag, the Write Tag VI causes a system error because input tags only can be updated by servers. If the tag is configured as an Input/Output tag, the tag value is passed to the server when Write Tag VI is called but not written to the RTDB.
Appendix A HMI Function Reference Write Tag (bit array) Use the Write Tag (bit array) VI to update the Real-Time Database with a new value for memory, output, and Input/Output tags. The value also is sent to the server if it is an output or Input/Output tag. If the tag is an input only tag, the Write Tag (bit array) VI causes a system error because input tags only can be updated by servers.
Appendix A HMI Function Reference Write Tag (discrete) Use the Write Tag (discrete) VI to update the Real-Time Database with a new value for memory, output, and Input/Output tags. The value also is sent to the server if it is an output or Input/Output tag. If the tag is an input only tag, the Write Tag (discrete) VI causes a system error because input tags only can be updated by servers.
Appendix A HMI Function Reference Write Tag (string) Use the Write Tag (string) VI to update the Real-Time Database with a new value for memory, output, and Input/Output tags. The value also is sent to the server if it is an output or Input/Output tag. If the tag is an input only tag, the Write Tag (string) VI causes a system error because input tags only can be updated by servers.
Appendix A HMI Function Reference Write Tag on Change Use the Write Tag on Change VI to update the Real-Time Database with a new value for memory, output, and Input/Output tags. The value also is sent to the server if it is an output or Input/Output tag. The value is updated and sent to the server only if the tag value is different from the previous time the VI was executed. Use this VI if you do not need to pass output values to the RTDB and server unless there really is a value change.
Appendix A HMI Function Reference Write Tag on Change (bit array) Use the Write Tag on Change (bit array) VI to update the Real-Time Database with a new value for memory, output, and Input/Output tags. The value also is sent to the server if it is an output or Input/Output tag. The value is updated and sent to the server only if the tag value is different from the previous time the VI was executed.
Appendix A HMI Function Reference Write Tag on Change (discrete) Use the Write Tag on Change (discrete)VI to update the Real-Time Database with a new value for memory, output, and Input/Output tags. The value also is sent to the server if it is an output or Input/Output tag. The value is updated and sent to the server only if the tag value is different from the previous time the VI was executed.
Appendix A HMI Function Reference Write Tag on Change (string) Use the Write Tag on Change (string) VI to update the Real-Time Database with a new value for memory, output, and Input/Output tags. The value also is sent to the server if it is an output or Input/Output tag. The value is updated and sent to the server only if the tag value is different from the previous time the VI was executed. Use this VI if you do not need to pass output values to the RTDB and server unless there really is a value change.
Appendix A HMI Function Reference Tag Attributes VIs Use the Tag Attributes VIs to get and set tag configuration parameters currently used by the BridgeVIEW Engine for tag processing programmatically. The Tag Attributes subpalette is shown below.
Appendix A HMI Function Reference Get Analog Tag Alarm Limit Use the Get Analog Tag Alarm Limit VI to obtain limit information for a single tag value alarm for an analog tag. Use the Alarm type input (HI_HI, HI, LO, LO_LO) to specify the desired alarm limit information. tag name is the name of the tag about whether you want to obtain information. alarm type determines the type of alarm for which information is queried. For analog tags, the various alarm types are HI_HI, HI, LO and LO_LO.
Appendix A HMI Function Reference Get Bit Array Tag Alarm Setting Use the Get Bit Array Tag Alarm Setting VI to obtain alarm setting information for bit array tags. tag name is the name of the tag about which you want to obtain information. error in (no error) is a cluster that describes the error status before this VI executes. For more information about this control, see the section Errors Not Reported by the BridgeVIEW Engine in this appendix.
Appendix A HMI Function Reference Get Discrete Tag Alarm Setting Use the Get Discrete Tag Alarm Setting VI to obtain alarm setting information for discrete tags. tag name is the name of the tag about which you want to obtain information. error in (no error) is a cluster that describes the error status before this VI executes. For more information about this control, see the section Errors Not Reported by the BridgeVIEW Engine in this appendix.
Appendix A HMI Function Reference Get Group List Use the Get Group List VI to returns a list of all configured groups in the system. By default, this VI includes the group in the list. include (T) determines whether the group should be included in the list. The default is TRUE. error in (no error) is a cluster that describes the error status before this VI executes. For more information about this control, see the section Errors Not Reported by the BridgeVIEW Engine in this appendix.
Appendix A HMI Function Reference Get Tag Alarm Enabled Use the Get Tag Alarm Enabled VI to indicate whether alarms are enabled for the tag. This VI also indicates whether alarms are acknowledged automatically when a tag previously in alarm returns to normal. tag name is the name of the tag about which you want to obtain information. error in (no error) is a cluster that describes the error status before this VI executes.
Appendix A HMI Function Reference Get Tag Attribute Use the Get Tag Attributes VI to obtain the value of a tag attribute. The tag attribute input provides a large list for selection. Each attribute is selected by specifying its numeric code. The value of the attribute selected is returned upon execution. If the attribute returns a numeric, use the value output. If the attribute returns a Boolean, use the value (discrete) output.
Appendix A HMI Function Reference Get Tag Bad Status Alarm Info Use the Get Tag Bad Status Alarm Info VI to determine whether alarms are enabled for the tag. This VI also returns whether the bad status alarm is enabled, and its priority. tag name is the name of the tag about which you want to obtain information. error in (no error) is a cluster that describes the error status before this VI executes.
Appendix A HMI Function Reference Get Tag Description Group Use the Get Tag Description Group VI to obtain a tag data type (analog, discrete, bit array, or string), description, and the group to which the tag belongs. tag name is the name of the tag about which you want to obtain information. error in (no error) is a cluster that describes the error status before this VI executes. For more information about this control, see the section Errors Not Reported by the BridgeVIEW Engine in this appendix.
Appendix A HMI Function Reference Get Tag I/O Connection Info Use the Get Tag I/O Connection Info VI to obtain information on how the tag is connected to a real-world I/O point. Outputs include data type (analog, discrete, bit array, or string), server, I/O group, item, access rights (Memory, Input, Output, I/O), and length. For bit array tags, length is the number of discrete points in the tag. For string tags, length is the number of bytes. This output is not used for analog and discrete tags.
Appendix A HMI Function Reference Get Tag List Use the Get Tag List VI to return a list of all tags in a group. By default, group is , so the VI returns all configured tags. group () determines what tags are in a list. The default is , so that the VI returns all configured tags in tag list. error in (no error) is a cluster that describes the error status before this VI executes.
Appendix A HMI Function Reference Get Tag Logging Info Use the Get Tag Logging Info VI to determine whether a tag is configured for logging historical data or alarms and events to disk. tag name is the name of the tag about which you want to obtain information. error in (no error) is a cluster that describes the error status before this VI executes. For more information about this control, see the section Errors Not Reported by the BridgeVIEW Engine in this appendix.
Appendix A HMI Function Reference Get Tag Range and Units Use the Get Tag Range and Units VI to obtain the engineering range for the tag in a cluster of Minimum, Maximum, and Increment. You can wire this format to a scale attribute node for a graph, slide, or vessel. Increment is set to 0, which means that BridgeVIEW calculates the scale increment automatically. units is the tag engineering units. tag name is the name of the tag about which you want to obtain information.
Appendix A HMI Function Reference Set Multiple Tag Attributes Use the Set Multiple Tag Attributes VI to reconfigure several attributes for a list of tags or groups of tags programmatically. You must have the Engine running for the changes to take effect. Otherwise, this VI returns an error.
Appendix A HMI Function Reference Set Tag Attribute Use the Set Tag Attribute VI to reconfigure an attribute for a list of tags or groups of tags programmatically. You must have the Engine running for the change to take effect. Otherwise, this VI returns an error. For more information about the tag attributes you can change with this VI, refer to any of the five configuration attributes tables in the section How Do You Configure Tags? in Chapter 3, Tag Configuration, in this manual.
B Citadel and Open Database Connectivity This appendix describes the Citadel database and the Open Database Connectivity (ODBC) driver, and includes a table that lists data transform commands. The Citadel historical database includes an Open Database Connectivity (ODBC) driver. This driver enables other applications to directly retrieve data from Citadel using Structured Query Language (SQL) queries.
Appendix B Citadel and Open Database Connectivity BridgeVIEW User Manual 5. Choose the Citadel driver and select Setup…. 6. Make changes as appropriate. Select the historical logging directory that was configured in your Tag Configuration (*.scf) file for each data source. For example, if you want to query the historical data created by the Tanks System example, directory, modify the database path to C:\BridgeVIEW\Examples\User Applications\Tank System\Data.
Appendix B Note Citadel and Open Database Connectivity Some applications are not completely ODBC compliant. If you plan to use Microsoft Query, Microsoft Access or Visual Basic, ensure Maximum Column Name Length does not exceed 62 characters. These packages cannot handle longer tag names. Other packages that are truly ODBC compliant should be able to handle tag names up to 126 characters long. All threads whose tag names exceed the Maximum Column Name Length are excluded from queries.
Appendix B Citadel and Open Database Connectivity How Do You Access Citadel Data? The ODBC driver presents Citadel data to other applications as a Threads table. The table contains a field or column for each data member logged to the Citadel database. Threads Table The Threads table contains three fields you can use to specify query criteria and to time-stamp retrieved data: Interval, LocalTime, and UTCTime. Interval allows you to specify the query value sample rate.
Appendix B Citadel and Open Database Connectivity Table B-1. Data Transform Commands Data Transform Command Description Min{tag name} Returns the minimum for tag name across the interval. Max{tag name} Returns the maximum for tag name across the interval. Avg{tag name} Returns the average for tag name across the interval. StDev{tag name} Returns the standard deviation for tag name across the interval.
Appendix B Citadel and Open Database Connectivity Assume, for example, that you want to find out how many times a compressor motor started in December. You also want to know its total runtime for the month.
Appendix B • Citadel and Open Database Connectivity Retrieves an oven’s temperature set point and value at 3:00 p.m. and shows the highest, lowest, and average temperatures between 2:00 p.m. and 3:00 p.m. SELECT LocalTime, "OVEN1_SP", "OVEN1_PV", "Max{OVEN1_PV}", "Min{OVEN1_PV}", "Avg{OVEN1_PV}" FROM Threads WHERE LocalTime >= "14:00" AND LocalTime < "15:00" AND Interval = "1:00:00" Queries Using Specific Applications The following sections include information on queries using specific applications.
Appendix B Citadel and Open Database Connectivity Note If MS Query is unable to connect to a Citadel data source, you have not yet logged data to Citadel; or the Database path you specified in the ODBC Setup dialog box is incorrect. Note If the Citadel data source is not listed in the Select Data Source dialog box, you might not have accessed it yet. Choose Other… and select Citadel from among the ODBC data sources. If Citadel is not listed as an ODBC Data Source, you need to install it.
Appendix B Citadel and Open Database Connectivity To view a data transform value, enter the function directly into a blank column. For example, to view the minimum value of Liquid, you would enter "min{Liquid}". Take special note of the use of quotation marks and braces. The above data set was retrieved using no specifying criteria, so the ODBC driver used the default criteria. There are several ways to specify criteria. For this example, we’ll use the criteria pane. Click the View Criteria button.
Appendix B Citadel and Open Database Connectivity When you enter qualifying criteria values, be sure to use the syntax demonstrated in the where clauses of the SQL Examples found in this chapter. To specify a starting time of 9:45 today, for example, you would enter >= "9:45". As soon as you specify a criteria, Microsoft Query immediately retrieves the specified data. You can save your query at any stage of its development. As you build your query, the application builds an SQL statement.
Appendix B Citadel and Open Database Connectivity Using Microsoft Excel with Citadel Note The exact operation of Microsoft Excel might change from version to version. Look in the online help for Microsoft Excel for how to connect to an ODBC Data Source for the exact instructions for your version of Microsoft Excel. To extract data from Citadel, activate Excel and choose Data»Get External Data…. This Excel command directly activates Microsoft Query.
Appendix B Citadel and Open Database Connectivity Using Microsoft Access with Citadel The exact operation of Microsoft Access might change from version to version. Look in the online help for Microsoft Access for how to connect to an ODBC Data Source for the exact instructions for your version of Microsoft Access. Note The SQL/92 standard states that a delimited identifier is any string of not more than 128 characters enclosed in quotation marks.
Appendix B Citadel and Open Database Connectivity In the Import Objects dialog box, choose Threads. The new table attaches to your database. Now you can build queries in Access that extract data directly from the Citadel database. Using Visual Basic with Citadel The exact operation of Visual Basic might change from version to version. Look in the online help for Visual Basic for how to connect to an ODBC Data Source for the exact instructions for your version of Visual Basic.
Appendix B Citadel and Open Database Connectivity Using the Citadel ODBC Driver in Visual Basic is the same as using any other ODBC driver. To retrieve and view data, create a Data control and at least one text control. First place a Data control on an open form. Set its Connect property to DSN=Citadel (or the name of the Citadel data source) and double click its Record Source property to identify Threads as its source table.
Customer Communication C For your convenience, this appendix contains forms to help you gather the information necessary to help us solve your technical problems and a form you can use to comment on the product documentation. When you contact us, we need the information on the Technical Support Form and the configuration form, if your manual contains one, about your system configuration to answer your questions as quickly as possible.
Fax-on-Demand Support Fax-on-Demand is a 24-hour information retrieval system containing a library of documents on a wide range of technical information. You can access Fax-on-Demand from a touch-tone telephone at 512 418 1111. E-Mail Support (Currently USA Only) You can submit technical support questions to the applications engineering team through e-mail at the Internet address listed below. Remember to include your name, address, and phone number so we can contact you with solutions and suggestions.
Technical Support Form Photocopy this form and update it each time you make changes to your software or hardware, and use the completed copy of this form as a reference for your current configuration. Completing this form accurately before contacting National Instruments for technical support helps our applications engineers answer your questions more efficiently.
BridgeVIEW Hardware and Software Configuration Form Record the settings and revisions of your hardware and software on the line to the right of each item. Complete a new copy of this form each time you revise your software or hardware configuration, and use this form as a reference for your current configuration. Completing this form accurately before contacting National Instruments for technical support helps our applications engineers answer your questions more efficiently.
Documentation Comment Form National Instruments encourages you to comment on the documentation supplied with our products. This information helps us provide quality products to meet your needs. Title: BridgeVIEW™ User Manual Edition Date: May 1998 Part Number: 321294C-01 Please comment on the completeness, clarity, and organization of the manual.
Glossary Prefix Meanings Value m- milli- 10 –3 µ- micro- 10 –6 n- nano- 10 –9 A access level Numeric value between 0 and 255 that can be used to control access to your HMI. ACK (Acknowledge) The sequence action that indicates recognition of a new alarm. alarm An abnormal process condition. In BridgeVIEW, an alarm occurs if a tag value goes out of its defined alarm limits or if a tag has bad status.
Glossary B bit array tag A multibit value representation of a connection to a real-world I/O point or memory variable. In BridgeVIEW, this type of tag can be comprised of up to 32 discrete values. block diagram A pictorial description or representation of a program or algorithm. In BridgeVIEW, the block diagram, which consists of executable icons called nodes and wires that carry data between the nodes, is the source code for the VI. The block diagram resides in the Diagram window of the VI.
Glossary cluster A set of ordered, unindexed data elements of any data type including numeric, Boolean, string, array, or cluster. The elements must be all controls or all indicators. coercion dot A gray dot on a terminal to indicate that one of two terminals wired together has been converted to match the data type representation of the other. connector Part of the VI or function node that contains its input and output terminals, through which data passes to and from the node.
Glossary dynamic attributes Tag attributes that do not require the BridgeVIEW Engine to be restarted when they are edited or reconfigured. Examples of dynamic attributes include enabling logging operations, alarm attributes, and some scaling attributes. See also static attributes. E Engine See BridgeVIEW Engine. engineering units (EU) Terms of data measurement, as degrees Celsius, pounds, grams and so on.
Glossary G G The graphical programming language used to develop BridgeVIEW applications. group See tag group or I/O group. H Help window Special window that displays the names and locations of the terminals for a function or subVI, the description of controls and indicators, the values of universal constants, and descriptions and data types of control attributes. The window also accesses the Online Reference.
Glossary item A channel or variable in a real-world device that is monitored or controlled by a BridgeVIEW device server. L LabVIEW Laboratory Virtual Instrument Engineering Workbench. A program development application used commonly for test and measurement purposes. log deadband The range through which a tag value must change before it is logged to Citadel. log resolution The smallest change in a tag value stored in the historical database.
Glossary operator The person who initiates and monitors the operation of a process. output tag A tag that sends values to a device server whenever it is updated in the Real-Time Database. P palette A display of pictures that represent possible options. Panel G Wizard A utility in BridgeVIEW that automates the process of creating front panel controls. Panel window VI window that contains the front panel, the execution palette and the icon/connector pane.
Glossary R range The region between the limits within which a quantity is measured, received, or transmitted expressed by stating the lower and upper range values. Real-Time Database (RTDB) An in-memory snapshot of all tags in the system. real-time trend A plot of data (values versus time) that is updated as each new point is acquired in the Real-Time Database. reentrant execution Mode in which calls to multiple instances of a subVI can execute in parallel with distinct and separate data storage.
Glossary static attributes Tag attributes that require the BridgeVIEW Engine to be restarted if they are edited or reconfigured. Examples of static attributes are general attributes and I/O connection attributes, such as server, device, or item. See also dynamic attributes. string tag An ASCII character representation of a connection to a real-world I/O point. structure Program control element, such as a Sequence, Case, For Loop, or While Loop. subVI A VI called on the diagram of another VI.
Glossary Tag Monitor A utility to view the current value of a tag, along with its status and alarm state. tag status A variable that determines the validity of a tag value. A negative status represents an error, a positive status represents a warning, and a status of zero represents a good tag value. terminal Object or region on a node through which data passes. timestamp The exact time and date at which a tag value was sampled. Tag values are stored with their timestamps in the RTDB.
Glossary W While Loop Post-iterative test loop structure that repeats a section of code until a condition is met. Comparable to a Do loop or a Repeat-Until loop in conventional programming languages wire Data path between nodes. wiring tool Tool used to define data paths between source and sink terminals. Wizard See HMI G Wizard and Panel G Wizard.
Index A purpose and use, 1-6, 5-1 tag configuration, 3-31 alarm deadband on analog tags, 3-36 analog tags, 3-34 Auto Ack on Normal option, 3-37 configuration attributes (table), 3-31 discrete tags, 3-35 enabling alarms, 3-34 keeping alarms unacknowledged, 3-37 string tags, 3-36 types of alarms, 3-31 User Must Ack option, 3-38 viewing, 5-14 Alarms and Events VIs, A-4 Acknowledge Alarm, A-5 effect on startup and shutdown, 4-24 Get Alarm Summary Status, A-6 locating, A-4 purpose and use, 4-16, 4-20 Read Alarm
Index attributes alarm, 3-3 connection, 3-2 general, 3-2 operation, 3-2 scaling, 3-2 static vs.
Index BridgeVIEW environment, 2-1 Engine Manager, 2-12 G programming language online help, 2-23 Project menu items (table), 2-10 system errors and events, 2-15 Tag Browser utility, 2-16 Tag Monitor, 2-18 BridgeVIEW server, 3-6 BridgeVIEW System Log file, 2-14 BridgeVIEW VI Library Alarms and Events VIs, A-4 Acknowledge Alarm, A-5 effect on startup and shutdown, 4-24 Get Alarm Summary Status, A-6 locating, A-4 purpose and use, 4-16, 4-20 Read Alarm Summary, A-7 Read Event History, A-11 Read Tag Alarm, A-15
Index Read Tag (discrete), A-58 Read Tag (string), A-60 Trend Tags, A-62 Write Tag, A-63 Write Tag (bit array), A-64 Write Tag (discrete), A-65 Write Tag (string), A-66 Write Tag on Change, A-67 Write Tag on Change (bit array), A-68 Write Tag on Change (discrete), A-69 Write Tag on Change (string), A-70 broken VIs, 9-21 Browse OPC Servers on Network dialog box, illustration, 8-7 Build Array function activity, 14-15 multiplot graph, 14-6 purpose and use, 14-10 Bundle function auto-indexing, 14-5 creating mu
Index Control Editor, 4-12 controlling panel visibility, 7-7 controls and indicators, 2-6 adding to VIs, 9-2 array, 14-2 Boolean, 2-7 HMI G Wizard operations (table), 4-4 numeric, 2-6 string, 2-7 tag, 2-8 Controls palette, 2-5, 4-3 cursors, graph, 14-19 customer communication, xxiii charts, 11-2 See also graphs.
Index Quit Engine, 2-13 Run/Stop Engine, 2-13 Server Browser, 2-13 Show/Hide System Event Display, 2-13 Engine Shutdown VI, A-39 engineering units assigning to an analog tag, 3-28 conversion by BridgeVIEW Engine, 1-8 environment security. See security.
Index customizing, 4-12 Control Editor, 4-12 importing graphics, 4-13 overview, 2-2 Panel G Wizard, 7-1 Functions palette, 2-5 functions, adding to VIs, 9-8 stopping and starting programmatically, 7-8 turning on at startup, 3-44 printing, 5-13 stopping and starting programmatically, 7-8 purpose and use, 1-3, 1-7 types of events, 1-7 viewing, 5-14 execution highlighting, 9-23 Execution Options, 10-4 exporting a list of users to a file, 7-19 exporting users to another computer on the network, 7-20 extractin
Index H Get Alarm Summary Status VI, A-6 Get Analog Tag Alarm Limit VI, A-72 Get Bit Array Tag Alarm Setting VI, A-73 Get Discrete Tag Alarm Setting VI, A-74 Get Engine Status VI, A-41 Get Group List VI, A-75 Get Historical Tag List, A-23 Get Historical Tag List VI example, 6-4 purpose and use, A-23 Get Historical Trend Info VI, A-24 Get Operator Name VI, A-48 Get Tag Alarm Enabled VI, A-76 Get Tag Attribute VI, A-77 Get Tag Bad Status Alarm Info VI, A-78 Get Tag Description Group VI, A-79 Get Tag IO Conn
Index HMI G Wizard alarm acknowledgement (activity), 5-7 building alarm summary (activity), 5-3 copying tags, 4-7 creating tags, 4-7 dialog box, 4-7 editing tags, 4-7 front panel object and Wizard subdiagram association, 4-8 generating block diagram, 4-8 invoking, 4-7 operations on front panel objects (table) Boolean control, 4-4 Boolean indicator, 4-5 historical trend or XY graph indicator, 4-6 numeric control, 4-4, 4-5 numeric indicator, 4-4, 4-5 real-time trend or waveform chart indicator, 4-6 table ind
Index importing a list from users to a file, 7-20 importing users from another computer on the network, 7-21 Increment function, 12-10 Index Array function, 14-13 industrial automation device servers. See servers.
Index M Not function adding to subVI, 10-8 VI Server, 15-7 numeric constants adding to subVI, 9-20 auto-indexing, 14-5 Case structure, 12-3 For Loop, 11-23 graph and analysis VIs (activity), 14-20 Sequence structure, 12-9 shift register, 11-23 numeric controls and indicators, 2-6 numeric conversion, 11-21 Man Machine Interface. See Human Machine Interface. manual. See documentation.
Index adding extra unconnected terminals, 16-3 subVIs with required inputs, 16-4 top-down design, 16-1 designing VI hierarchy, 16-1 list of user requirements, 16-1 writing the program, 16-3 Programmatic Login VI, A-50 Programmatic Logout VI, A-51 Project menu, 2-10 Historical Trend Viewer, 2-10 Launch Engine, 2-11 Security»Access Levels, 2-11 Security»Change Password, 2-11 Security»Edit User Accounts, 2-11 Security»Login, 2-11 Security»Logout, 2-11 Security»Privileges, 2-11 Server Tools»Server Browser, 2-1
Index identifying current operator, 7-17 logging in and out, 7-15 modifying access privileges, 7-22 modifying list of available user access levels, 7-19 Privileges dialog box, 7-16 prompting operator to log in, 7-16 restricting access, 7-17 environment security importing a list of users from a file, 7-20 Operator Interface Security, 7-22 controlling visibility attributes, 7-23 limiting user access to operator interface panels, 7-23 overview, 1-7 Project menu items Security»Access Levels, 2-11 Security»Chan
Index Server Browser, 8-5 using OPC servers with BridgeVIEW, 8-5 using remote OPC servers, 8-7 viewing server configuration registered server device and item parameters, 8-11 Server Browser, 8-5 View Server Device Information dialog box, 8-6 Set Multiple Tag Attributes VI, A-84 Set Tag Attribute VI, A-85 setting file paths, 3-44 shift configuration, 3-44 shift registers, 11-11 creating, 11-11 creating multiplot chart and customizing trends (activity), 11-17 displaying running average on chart (activity), 1
Index System Event Display illustration, 2-14 items displayed, 2-14 showing/hiding, 2-13 using, 2-14 System VIs, 7-7, A-35 Enable Event Logging, 7-8, A-36 Enable historical data logging, 7-8, A-37 Enable printing, 7-8, A-38 Engine Launch, 7-8, A-39 Engine Shutdown, A-39 Get Engine Status, A-41 Get Tag Status Info, A-42 locating, 4-16, A-35 Post System Error or Event, A-43 Security. See Security VIs.
Index tag configuration, 3-10 See also Tag Configuration Editor accessing or changing in your application, 3-46 activity, 3-38 configuration settings (table), 3-40 historical logging and alarm acknowledgement (table), 3-41 registering Tanks Server, 3-38 saving configuration file, 3-42 viewing tag configuration, 3-42 viewing tag value and status, 3-42 alarms, 3-31, 3-34 alarm deadband on analog tags, 3-36 analog tags, 3-34 bit array tags, 3-35 discrete tags, 3-35 enabling alarms, 3-34 keeping alarm unacknow
Index operations, 3-22 increasing engine throughput using deadband, 3-24 logging data or events, 3-25 setting deadband, 3-24 Tag Operations dialog box, 3-22 operations configuration attributes (table), 3-23 Initial Value, 3-24 Log Data, 3-23 Log Data Deadband, 3-23 Log Resolution, 3-23 Log/Print Events, 3-23 Set Initial Value, 3-24 Update Deadband, 3-23 scaling analog tags, 3-27 bit array tags, 3-29 discrete tags, 3-25 string tags (note), 3-26 scaling configuration attributes (table), 3-25 Coerce, 3-26 Eng
Index Status Details dialog box, 2-20 viewing tag value and status, 3-42 tag operations types of operations, 1-6 tag scaling purpose and use, 1-6 Tag Status Handler VI, A-44 tags creating, 3-5 data types. See tag data types.
Index VI Server activity, 15-4 block diagram, 15-5 front panel, 15-4 locating, 15-1 memory considerations, 15-2 purpose and use, 15-2 using to load and execute VIs dynamically, 15-3 VI Server functions activity Invoke Node, 15-6 Open VI Reference, 15-6 Property Node front panel open property, 15-6 controlling panel visibility, 7-7 VI Setup dialog box, 10-1 View Server Device Information dialog box, 8-11 viewing new data automatically after logging, 6-14 VIs, 2-1 See also BridgeVIEW VI Library; program desi
Index preventing code execution, 11-10 purpose and use, 1-4, 11-4 timing, 11-9 activity, 11-9 overview, 11-9 Windows Options, 10-5 wires, 9-3 bad wires, 9-6 purpose and use, 9-3 selecting and deleting, 9-5 stretching, 9-5 tip strips, 9-4 Wiring tool, 2-4, 9-4 Wiring tool hot spot, 9-4 Wizard lock, 4-8 Write Tag VI, A-63 Write Tag (bit array) VI, A-64 Write Tag (discrete) VI, A-65 Write Tag (string) VI, A-66 Write Tag on Change VI, A-67 Write Tag on Change (bit array) VI, A-68 Write Tag on Change (discrete)