Building A SCADA System
Building A SCADA System
Proprietary Notice The manual and software contain confidential information which represents trade secrets of GE Fanuc International, Inc. and/or its suppliers, and may not be copied or disclosed except as provided in the license with GE Fanuc International, Inc. The information in this manual is subject to change without notice and should not be construed as a commitment by GE Fanuc International, Inc. GE Fanuc International, Inc. assumes no responsibility for any errors that may be in this document. 2003 GE Fanuc International, Inc. ALL RIGHTS RESERVED.
Trademarks 2003 GE Fanuc International, Inc. All rights reserved. Microsoft is a registered trademark of Microsoft Corporation. All other brands or names are property of their respective holders. iFIX Version 3.5 - 07.03
Contents
Why You Should Read This Manual ................................................................................................ xiii 1. Introduction...................................................................................................................................... 1 Understanding a Database....................................................................................................... 2 Understanding Database Blocks ................................................................................. 3 Understanding Chains ................................................................................................. 4 Processing the Database ............................................................................................ 5 Using the Process Database .................................................................................................... 6 Trending Process Data ................................................................................................ 6 Creating Scripts and Schedules with Process Data .................................................... 7 Archiving Process Data ............................................................................................... 7 Sample Application................................................................................................................... 8 2. Getting Started................................................................................................................................. 9 Starting and Stopping Database Manager ............................................................................... 9 Using the Database Spreadsheet........................................................................................... 10 Understanding Spreadsheet Properties .................................................................... 10 Working with the Pop-up Menu ................................................................................. 10 Editing the Spreadsheet ............................................................................................ 10
Contents
iii
Working with the Database Manager Toolbar ........................................................................ 11 Setting Database Manager Preferences ................................................................................ 12 Creating a Process Database: Overview................................................................................ 13 3. Implementing a Process Database .............................................................................................. 15 Sample Process Application................................................................................................... 15 Designing a Chain .................................................................................................................. 16 Describing the Sample Process Application .............................................................. 18 Analyzing the Sample Process .................................................................................. 19 Designing an Automation Strategy for the Sample Process...................................... 20 Writing an Automation Algorithm for the Sample Process......................................... 21 Matching Process Steps to Block Types ................................................................... 21 Drawing a Flowchart for the Sample Chain ............................................................... 24 Understanding Chain Designs ................................................................................................ 28 Building Large Databases ...................................................................................................... 29 Saving Large Databases ........................................................................................... 30 Working with Analog and Digital Blocks ................................................................................. 30 4. Working with Database Blocks .................................................................................................... 31 Block Types and Descriptions ................................................................................................ 31 Understanding Primary Blocks .................................................................................. 33 Understanding Secondary Blocks ............................................................................. 35 Understanding Control Blocks ................................................................................... 36 Understanding Statistical Process Control Blocks..................................................... 37 Understanding Batch Blocks ..................................................................................... 37 Understanding SQL Blocks ....................................................................................... 38 Understanding Database Dynamos........................................................................... 38 Block Fields ............................................................................................................................ 40 Locating Block Fields................................................................................................. 41 Completing Block Dialog Boxes ................................................................................ 41
iv
Scan Times............................................................................................................................. 41 Understanding Time-Based Processing .................................................................... 42 Understanding Exception-Based Processing ............................................................ 44 Understanding One Shot Processing ........................................................................ 47 Phasing................................................................................................................................... 48 Assigning Phase Times ............................................................................................. 50 Overphasing .............................................................................................................. 51 Block Modes ........................................................................................................................... 52 Understanding PMAN Mode ...................................................................................... 55 Understanding Blocks in PAUT Mode ....................................................................... 55 Placing Blocks On and Off Scan ............................................................................................ 56 I/O Drivers .............................................................................................................................. 59 Using the Simulation Driver ....................................................................................... 61 Using Signal Generation Registers in the SIM Driver................................................ 64 Using the Simulation 2 Driver .................................................................................... 67 Generating Bad Data with the SM2 Driver................................................................. 68 Using the SM2 C API................................................................................................. 68 Understanding Alarm Statuses .................................................................................. 73 Connecting to an OPC Server ................................................................................... 75 Understanding Signal Conditioning ........................................................................................ 75 Understanding EGU Limits ........................................................................................ 77 5. Working With the Process Database ........................................................................................... 81 Creating a New Database ...................................................................................................... 81 Opening and Closing a Database........................................................................................... 81 Adding Blocks......................................................................................................................... 82 Adding Multiple Blocks .............................................................................................. 83
Contents
Duplicating Blocks .................................................................................................................. 86 Copying and Pasting Blocks................................................................................................... 87 Moving Blocks ........................................................................................................................ 88 Modifying Blocks..................................................................................................................... 89 Deleting Blocks....................................................................................................................... 90 Displaying Block Information ..................................................................................... 90 Saving a Database ................................................................................................................. 91 Saving a Database from a Script or a Program Block ............................................... 91 6. Locating and Displaying Data ...................................................................................................... 93 Finding Data in a Spreadsheet ............................................................................................... 93 Replacing Data ....................................................................................................................... 94 Using Go To ........................................................................................................................... 95 Updating and Pausing the Spreadsheet ................................................................................. 95 Customizing the Spreadsheet ................................................................................................ 96 Coloring the Spreadsheet .......................................................................................... 96 Creating a Non-Scrolling Column .............................................................................. 96 Defining a Spreadsheet Layout ................................................................................. 98 Saving and Loading Spreadsheet Layouts............................................................................. 99 Overriding the Default Layout ................................................................................................. 99 7. Querying and Sorting Data ......................................................................................................... 101 Understanding Query Syntax ............................................................................................... 101 Using Boolean Operators ........................................................................................ 103 Using Wildcards in a Query ..................................................................................... 104 Grouping Queries .................................................................................................... 105
vi
Editing a Query..................................................................................................................... 105 Refining and Expanding a Query.......................................................................................... 106 Saving and Loading a Query ................................................................................................ 107 Overriding the Default Query................................................................................................ 107 Understanding Sort Orders................................................................................................... 108 Saving and Loading a Sort Order ......................................................................................... 109 Changing the Default Sort Order .......................................................................................... 109 8. Managing Databases................................................................................................................... 111 Verifying Databases ............................................................................................................. 111 Reloading Databases ........................................................................................................... 113 Reloading a Database from a Visual Basic Script ................................................... 113 Displaying a Database Summary ......................................................................................... 114 Exporting Databases ............................................................................................................ 115 Editing the Export File ............................................................................................. 116 Importing Databases ............................................................................................................ 119 9. Advanced Topics......................................................................................................................... 121 Changing a Databases Scanning Order .............................................................................. 121 Understanding a Databases Scanning Order ......................................................... 122 Changing the Order of Solve ................................................................................... 124 Customizing the Toolbar....................................................................................................... 125 Customizing the Tools Menu ................................................................................................ 125 Index ................................................................................................................................................. 127
Contents
vii
viii
Figures
Figure 1-1: Figure 1-2: 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 4-1: Figure 4-2: Figure 4-3: Figure 4-4: Figure 4-5: Figure 4-6: Figure 4-7: Figure 4-8: Figure 5-1: Figure 6-1: Figure 8-1: Figure 9-1: Figure 9-2: Figure 9-3: Figure 9-4: I/O Data and the Database ....................................................................................... 2 SAC Processing I/O Data ......................................................................................... 6 pH Adjustment Tank ............................................................................................... 18 Creating an Automation Algorithm .......................................................................... 21 Chain Flowchart ...................................................................................................... 24 Sample pH Problem ................................................................................................ 25 Chain Modification .................................................................................................. 26 Modified Flowchart .................................................................................................. 27 Proper pH Adjustment Trend .................................................................................. 27 Trend Block Insertion .............................................................................................. 28 Sample Data Acquisition and Control Chain ........................................................... 28 Sample Monitoring Chain........................................................................................ 29 Chain Showing Secondary Blocks .......................................................................... 35 Exception-Based Chain Processing........................................................................ 46 Improved Exception-Based Chain Processing........................................................ 46 Processing Blocks Without Phasing........................................................................ 48 Phasing for Block 1 ................................................................................................. 49 Phasing Block Scan Times for Multiple Blocks ....................................................... 49 Scaling Values ........................................................................................................ 77 Block Limit Accuracy ............................................................................................... 79 Removing a Block from a Chain.............................................................................. 89 Defining a Non-Scrolling Column ............................................................................ 97 Allocating Memory for Database Blocks ............................................................... 115 Sample Calculation Chain..................................................................................... 121 Blocks Assigned to a Scan Sequence .................................................................. 123 Blocks Deleted from a Scan Sequence................................................................. 124 Blocks Added to a Scan Sequence....................................................................... 124
Figures
ix
Tables
Table 2-1: Table 3-1: Table 3-2: Table 4-1: Table 4-2: Table 4-3: Table 4-4: Table 4-5: Table 4-6: Table 4-7: Table 4-8: Table 4-9: Table 4-10: Table 4-11: Table 4-12: Table 4-13: Table 4-14: Table 4-15: Table 4-16: Table 4-17: Table 4-18: Table 4-19: Table 4-20: Table 4-21: Table 5-1: Table 6-1: Table 7-1: Table 7-2: Table 7-3: Table 8-1: Table 8-2: Database Manager Preferences ............................................................................. 12 Automating the Sample Process with iFIX .............................................................. 16 Sample Process Analysis........................................................................................ 20 Database Options ................................................................................................... 31 Block Summary ....................................................................................................... 32 Standard Primary Blocks......................................................................................... 34 Standard Secondary Blocks.................................................................................... 35 Control Blocks ......................................................................................................... 36 Statistical Process Control Blocks........................................................................... 37 Batch Blocks ........................................................................................................... 37 SQL Blocks ............................................................................................................. 38 Intellution Database Dynamos ................................................................................ 39 Field Formats .......................................................................................................... 40 Scan Time Ranges ................................................................................................. 42 Time-Based Scan Time Examples.......................................................................... 42 Program and Statistical Data Block Considerations................................................ 45 Phase Time Formats............................................................................................... 50 Blocks in Automatic and Manual Modes ................................................................. 54 SIM Analog and Digital Values ............................................................................... 62 SIM Signal Generation Registers............................................................................ 64 SM2 Address Examples.......................................................................................... 67 C API Functions ...................................................................................................... 69 Example Block EGU Limits ..................................................................................... 76 Available EGU Limits .............................................................................................. 79 Pattern Types.......................................................................................................... 85 Database Manager Default Layout ......................................................................... 99 Relational Operators ............................................................................................. 101 Available EGU Limits ............................................................................................ 102 Boolean Operators ................................................................................................ 103 Resolving Verification Messages .......................................................................... 112 Block Type Abbreviations ..................................................................................... 118
Tables
xi
xii
xiii
xiv
1. Introduction
iFIX provides process information for plant managers, supervisors, and operators in the form of reports, displays, archived data, alarms, messages, and statistical charts. The sources of this information are OPC servers or process hardware the controllers, sensors, motors, switches, and other devices required to manufacture your product. iFIX reads process information from these devices and saves it in one or more process databases residing on your SCADA servers. The database plays an integral part in your industrial automation strategy; it is the primary source of process data for most iFIX applications. Whether you collect historical values or generate shift reports, iFIX enables you to create a database that supports your specific industrial control and automation needs. Database Manager Your main tool for creating and managing process databases is Database Manager. This program lets you open and configure the database of any SCADA server. You can also: Query and sort the database. Find and replace database information. Import and export a database. Generate multiple database blocks automatically. Customize your display.
Chapter 1. Introduction
Understanding a Database
Every SCADA server loads a process database at start-up. Once loaded, the database: Receives values from an I/O driver or OLE for Process Control (OPC) server. Manipulates values according to its configuration (a control strategy). Compares the values to alarm limits you define. Outputs adjusted values to the I/O driver or OPC server. Sends alarms to operator displays, printers, files, and network alarm destinations.
The following figure illustrates how values enter a database, travel through a sequence of blocks, and exit the database as output.
Database Input
Output
iFIX provides different types of blocks, each capable of performing a unique function. For a brief description of each block, refer to the section Block Types and Descriptions. By default, when you install iFIX, it creates an empty database for your SCADA server. Using Database Manager, you can add the blocks you require to this database.
Chapter 1. Introduction
Next, you configure the block by entering: The blocks name. How it receives data from an I/O driver, OPC server, or from another block. Where it sends information. If it manipulates values. How it reacts to critical value changes (called alarming). How it scales values for operator displays.
Understanding Chains
Blocks by themselves perform specific tasks in the database. By combining two or more blocks together, you can form chains. Each chain performs the tasks of its component blocks by passing data from one block to the next. When properly configured, chains can generate alarms, acquire data, and verify, automate, and maintain a process. In automating large processes involving a number of I/O devices, a database can contain many chains, each designed to automate and maintain a specific function or process step.
Each chain can contain up to 30 blocks, with each block configured to perform a specific processing function. Note that some blocks are designed to work in chains while others are designed to operate on their own. Specific types of blocks, their functions, and their relationship to one another are summarized in the section Block Types and Descriptions. Familiarize yourself with the available blocks. Having a good understanding of the blocks and their capabilities allows you to quickly design optimum strategies for your application.
The following figure shows SAC reading process values, sending these values through database chains, and returning the output values.
Chapter 1. Introduction
SAC
I/ODriver
OPC Server
For more information on collecting historical values, refer to the Trending Historical Data manual. For more information on trending real-time data for operators, refer to the Creating Pictures manual.
Chapter 1. Introduction
Sample Application
To help you understand how to create process databases for yourself, this manual uses a sample application for manufacturing fertilizer and monitoring chemical consumption and equipment usage. The blocks and chains that comprise the application were developed by the Enviro company which collects sludge generated by municipal sewage plants and converts it into different grades of agricultural fertilizer in briquette form. The Enviro companys manufacturing process encompasses: Continuous control Batch control Discrete parts
2. Getting Started
You can begin creating process databases by verifying that your SCADA servers are set up and functioning. Once you set up these computers: [1] [2] Install iFIX on each SCADA server. Configure each server with the System Configuration Utility (SCU). Refer to the Setting up the Environment manual to learn how to enable SCADA support. Set up the alarm area database for each server. This database contains the alarm areas you can assign to the blocks on the SCADA server. If you want to share an alarm area database across multiple servers, change the Alarm Area path in the SCU to reference a file server before you create your process databases.
[3]
By configuring these properties you can customize the spreadsheet as needed. To learn more about these properties, refer to the chapters Locating and Displaying Data and Querying and Sorting Data.
10
To change multiple fields for a particular block, you can double-click the block to display its dialog box. To change the same field for multiple blocks, you can find and replace data in a spreadsheet column. Refer to the chapter Locating and Displaying Data to learn more about finding and replacing data. Exchanging Data Database Manager also lets you edit blocks by copying or exporting them. Whenever you complete these tasks, the program converts the selected blocks into comma separated value (CSV) format, enabling you to paste or import the data into your favorite text editor or spreadsheet. Once you edit the data, you can copy or import the data back to Database Manager. Often a quicker way to convert blocks into CSV format is by holding down the Control key and dragging and dropping the blocks from Database Manager and into Microsoft Excel. The blocks you move appear in CSV format, allowing you to edit them. When you finish, you can drag them back. To learn more about using Excel with the Database Manager, refer to the section Copying and Pasting Blocks.
11
Copy
Show Block
Help
Paste
Modify Block
12
Table 2-1: Database Manager Preferences (continued) The Display preferences Let you View or hide: Spreadsheet row numbers The status bar The Database Manager toolbar
You also have the option to set the automatic refresh rate. Editing preferences Open block dialog boxes in view or modify mode when you double-click a cell in the spreadsheet. In view mode, you can examine the block configuration but not modify it. The block and its chain remain on scan at all times. In modify mode, you can examine and change the block configuration. The block and its chain are placed off scan even if you do not modify the block. You also have the option to place edited blocks and chains on scan automatically when you finish editing them. By default, this option is disabled and Database Manager prompts you to place modified blocks on scan.
[3] [4]
13
To learn how to create database blocks, refer to the section Adding Blocks. For information on using standard VBA naming conventions when creating tags, refer to VBA Naming Conventions. For information on verifying and correcting database errors, refer to the section Verifying Databases.
14
After you have this data, you are ready to design a database. To help illustrate how to do this, this chapter walks you through the process of designing a chain for the Enviro company, introduced in the section Sample Application. Using these examples, you should be able to create your own blocks and chains for your process database. As you read this chapter, you may find it helpful to skip ahead and learn how to add a block with Database Manager so that you can create the sample chains described here. By creating sample chains, working with Database Manager, and correcting errors, you learn how to avoid mistakes before you create your actual database.
15
The key elements of this application also apply to processes in other industries, such as chemical processing, food processing, and even discrete parts manufacturing. Table 3-1: Automating the Sample Process with iFIX Production Tasks: Schedule production with sales orders. Process sludge into fertilizer. Produce different grades of fertilizer on demand. Monitor chemical usage and maintain inventory. Maintain equipment. Maintain fertilizer count. Archive processing data. iFIX Application: Schedule recipes for batch processing. Perform supervisory control, direct digital control, and alarming. Download a recipe for each grade of fertilizer. Trend chemical levels and print chemical usage reports. Trend pump/value usage and print maintenance reports. Historically trend the process. Calculate the total product weight according to batch and perform statistical quality control. Economic Benefits: Increase production through scheduling. Produce a higher quality product. Increase plant availability by scheduling preventative maintenance. Lower operating costs by making better use of materials and lowering labor cost. Increase responsiveness to market conditions by varying product size, compound, color, and water content. Increase profit.
Designing a Chain
Once you know the tasks you want to accomplish, you can design the chains for your database. The easiest and most efficient way to design a functional chain is to use the following design steps:
16
Chain Design Steps [1] Analyze your process and make a record of the data you need, including: [2] I/O addresses of the device controller (a wiring list) Device types Signal conditioning The EGU range
Design an automation strategy that explains how you want your process automated. For example: What types of alarms and alarm limits do you want to establish? How often do you want the chain processed? When do you want operators notified of process events? How do you want process disruptions handled?
[3]
Create an algorithm that combines your process analysis and automation strategy. This determines how iFIX automates your process and provides the specific processing instructions you will enter into block dialog boxes. Match the steps in your algorithm to blocks capable of performing these steps. Draw a flowchart listing the block types that perform each step along with the specific processing instructions for each block.
[4] [5]
The example presented in the following subsections illustrates the thought process involved in designing a simple chain.
17
[4]
The remainder of this chapter focuses on the second step: pH adjustment. Sludge from the collection tank is periodically pumped into a large tank where water is added to make the sludge easier to mix. A sensor in the tank registers the sludges pH level. If the sludge is acidic, a device controller turns on a pump that adds an alkaline solution into the tank to raise the pH; if the sludge is alkaline, the device controller turns on a pump that adds an acidic solution into the tank to lower the pH. In either case, the sludges pH is properly adjusted according to the grade of fertilizer that is needed before it is pumped to the filter press. The following figure shows the pH adjustment tank and its equipment.
Device Controller
Alkaline
Acid
18
The next step is to design a chain that examines and adjusts the sludges pH by: Retrieving information from the pH sensor (data acquisition). Sequencing pumps and maintaining pH (Direct digital control).
Once you complete these tasks, you can add blocks to monitor pH fluctuations, chemical usage, pump usage, down time, and other statistical information. You can also historically trend this information, print it in reports, and display it to operators.
[3]
Although this analysis describes how the process works, it lacks important information about your control devices. You need to add detailed information on I/O driver or OPC server addresses, the type of controller equipment, signal conditioning, and maximum ranges the equipment can accept. In short, record all detailed information on how the process equipment operates.
19
After you obtain this information, you can go on to write a detailed analysis of your process. The following table presents a sample analysis of the pH monitoring and adjustment process. Table 3-2: Sample Process Analysis The pH sensor analog address: Acid pumps digital address: Alkali pumps digital address: Device controller: Signal conditioning: EGU range: 1:1:30001 1:1:40004:8 1:1:40004:5 MB1 LIN 0.0 to 14.0
Notice how this automation strategy incorporates an alarming plan for handling process upsets, such as extreme pH fluctuations (rate of change). This helps to assure that empty drums of acidic and alkaline solutions do not go unnoticed and equipment failures do not interrupt your treatment process. 20
Building a SCADA System
Process Analysis pH Sensor address Pump1 address Pump2 address Device Type Signal Conditioning EGU Range
Automation Strategy
Perform automatic pH checking Set alarm limits HIHI, HI, LO, LOLO, ROC Maintain pH between 5.5 and 8.5
Automation Algorithm Step 1 Check pH at set intervals using sensor address, device type, and signal conditioning. Step 2 Alarm on HIHI, HI, LO, LOLO, and ROC limits. Step3 If current value is >= 8.5, add acid using acid pump address. If current value is <= 5.5, add alkali using alkali pump address.
Figure 3-2: Creating an Automation Algorithm The algorithm forms the basis of your chain; it identifies the order in which the process proceeds, where each step acquires information, and how iFIX gathers, processes, and verifies information.
21
Automation Algorithm Step 1 Check pH at set intervals using sensor address, device type, and signal conditioning. Step 2 Alarm on HIHI, HI, LO, LOLO, and ROC limits. Step3 If current value is >= 8.5, add acid using acid pump address. If current value is <= 5.5, add alkali using alkali pump address. Block Type? Block Type? Block Type?
When matching blocks to steps, select a block that can perform the function of a step. In many cases, one block type can handle more than one step, whereas some steps may include too many functions or too many complex operations for any one block. For your pH adjustment process, the following blocks satisfy the algorithm: [1] An Analog Input block can receive analog signals from the pH sensors address.
Analog Input
[2]
The Analog Input block can also accommodate the alarming requirements, so this task is assigned to this block.
22
[3]
The pumps are turned on or off based upon the value that the Analog Input block receives from the pH sensor. The block required for this step must be able to monitor an analog input and, depending on the value of the input, open or close a digital output point.
Turn acid on above 8.5 Turn acid off below 7.5 Turn alkali on below 5.5 Turn alkali off above 6.5
On-Off Control
The digital outputs are sent directly to the acid and alkali pump addresses. The On-Off Control block can perform this function.
On-Off Control
Alkaline Acid
Since the On-Off Control block can turn the pumps on and off without the use of any other block, this completes step 3.
23
At this point youve identified the blocks that can perform all the steps in your algorithm.
The flowchart is a visual representation of the chain and shows the instructions you will enter into each block as you add them to the database. The following figure shows a flowchart for the pH adjustment process.
pH Sensor Address
Analog Input
On-Off Control
Tag name, Address, Device Type, Signal Conditioning, EGU range, Alarm limits, and Next Block
Tag name Turn acid on above 8.5 Turn acid off below 7.5 Turn alkali on below 5.5 Turn alkali off above 6.5
Figure 3-3: Chain Flowchart Typically, your chain designs are seldom perfect the first time you implement them. With Database Manager, you can always re-evaluate the design of your chain, add blocks, remove blocks, modify block configurations, or change block types to those that accommodate more sophisticated automation functions.
24
The best approach to re-evaluating the design of your chain is to examine the original automation algorithm and determine if other blocks provide more flexibility or features over the existing blocks. For example, after testing the sample chain, Enviro engineers found it works well most of the time, but every so often the adjustment process exceeds acceptable pH limits by pumping in too much acidic solution, which lowers the pH beyond acceptable limits. The following figure illustrates this problem.
Scan Periods
Acceptable pH Range 0 5 10 15
Figure 3-4: Sample pH Problem You want the capability of pumping in acid at short intervals. In the original design, iFIX scans the chain every four minutes. This allows the acid more time to react with the sludge before more acid enters the tank. An additional improvement would be to shorten the chains scan time, providing more pH sampling to determine which solution needs to be pumped into the tank. By re-examining the automation algorithm, you can determine where to make improvements to the chain. Reproduced below is the original automation algorithm that called for the On-Off Control block.
If the pH is below 5.5, turn on the pump to add an alkaline solution. If the pH is above 8.5, turn on the pump to add an acid solution. Acid pump digital address: 1:1:40004:8 Alkaline pump digital address: 1:1:40004:5 If the pH is between 5.5 and 8.5, stop all pumps.
What you want to do is modify this algorithm to run the acid pump for shorter intervals, giving the acid time to decrease the pH before the acid is turned on again. To do this, you need to examine if other blocks can perform this task.
25
One block capable of turning a pump on or off is the Program block. You can replace the On-Off Control block with the Program block. However, the Program block cannot establish direct digital contact with the acid and alkali pumps. For this you need to use two Digital Output blocks, one for each pump. The following figure shows the replacement of the On-Off Control block with the Program block and the two Digital Output blocks, and represents how information passes from one block to the next.
Digital Output
Alkaline Pump
Figure 3-5: Chain Modification NOTE: The figure Chain Modification illustrates how the data flows from one block to another, not the actual chain structure. The following figure provides the new programming instructions required to operate the Program and Digital Output blocks.
26
Digital Output
Alkaline Pump
If pH is <= 5.5, turn alkali pump on Wait 1 minute Check pH: If pH is <= 6.5, repeat first step else continue Turn pump off If pH is >= 8.5, turn acid pump on Wait 1 minute Check pH: If pH is >=7.0, repeat first step else continue Turn pump off
Figure 3-6: Modified Flowchart With this modification and with the Analog Input blocks scan time reduced to one minute, the chain handles pH adjustment more efficiently by allowing the Program block to run short programs that adjust the pH. The following figure shows how the modified chain handles pH adjustment.
Scan Periods
Acceptable pH Range 0 5 10 15
Figure 3-7: Proper pH Adjustment Trend With the pH adjustment complete, you might want to consider how to provide more control over the monitoring process. For example, if your operators need to monitor pH fluctuations, you can use a chart to provide a real-time trend for operators.
27
Data trended by a chart is not stored. To store the real-time data use a Trend block. Then with a chart you can view these values directly on an operator display. The following figure shows the same control chain with a Trend block added to the chain.
pH Sensor Address
Digital Output Analog Input Trend Program
Acid Pump
Digital Output
Alkaline Pump
Figure 3-8: Trend Block Insertion Adding other blocks, such as the Statistical Data block, allows you to display statistical data in a graph.
Analog Input
Calculation
Trend
Analog Output
Primary
Secondary
Secondary
Primary
28
You can also create chains that collect data for monitoring purposes. These types of chains usually receive inputs from an I/O driver or OPC server through an input block but may not return the inputs, since no process adjustment is required. The following figure shows a sample monitoring chain design.
Analog Input1
Calculation
Trend
Figure 3-10: Sample Monitoring Chain The number of chains you can construct is limited only by memory.
For more information on these topics, refer to the section Scan Times.
29
30
Continuous, PID, direct, and digital control. Statistical data analysis and calculations, alarming, supervisory control, and display of statistical data. State-driven, interlocked, and batch control. Read and write access to a relational database on a remote server.
Understanding Control Blocks to learn more about control blocks. Understanding Statistical Process Control Blocks to learn more about SPC blocks. Understanding Batch Blocks to learn more about batch blocks. Understanding SQL Blocks to learn more about SQL blocks.
31
Table 4-2 summarizes the differences among all the blocks. For detailed information on blocks, refer to the Database Manager online help. Table 4-2: Block Summary Block Type Analog Alarm (AA) Analog Input (AI) Analog Output (AO) Analog Register (AR) Boolean (BL) Calculation (CA) Dead Time (DT) Device Control (DC) Digital Alarm (DA) Digital Input (DI) Digital Output (DO) Digital Register (DR) Event Action (EV) Extended Trend (ETR) Fanout (FN) Histogram (HS) Lead Lag (LL) Multistate Digital Input (MDI) On-Off Control (BB) x x x x x x x x x x x x x x (Control) x x x x x x x x (SPC) x (Control) Primary x x x x x x x Secondary Standard x x x x x x x (Control) x (Batch) Optional
32
Table 4-2: Block Summary (continued) Block Type Pareto (PA) PID (PID) Program (PG) Ramp (RM) Ratio/Bias (RB) Signal Select (SS) SQL Data (SQD) SQL Trigger (SQT) Statistical Control (SC) Statistical Data (SD) Text (TX) Timer (TM) Totalizer (TT) Trend (TR) x x x x x x x x x x x x x x x x Primary x x Secondary Standard Optional x (SPC) x (Control) x (Batch) x (Control) x (Control) x (Control) x (SQL) x (SQL) x (SPC) x (SPC)
33
Most primary blocks, listed in the following table, also include a scan time. The scan time controls when SAC scans the blocks in the database. Refer to the section Scan Times to learn more about them. Table 4-3: Standard Primary Blocks The block Analog Alarm (AA) Analog Input (AI) Analog Output (AO) Function: Provides read/write access to analog data and lets you set and acknowledge alarms. Provides read/write access to analog data and lets you set alarm limits. Sends analog data to an I/O driver or OPC server when the upstream block, an operator, a Program block, a script, or an Easy Database Access (EDA) program supplies a value. Provides read/write access to analog data only when a Data link connected to the block appears on an operator display. Performs boolean calculations based upon up to eight inputs. Provides read/write access to digital data and lets you set and acknowledge alarms. Provides read/write access to digital data and lets you set alarm limits. Sends digital data to an I/O driver or OPC server when the upstream block, an operator, a Program block, a script, or an Easy Database Access (EDA) program supplies a value. Provides read/write access to digital data only when a Data link connected to the block appears on an operator display. Retrieves digital data for up to 3 inputs from an I/O driver or OPC server, combines the inputs into one raw value, and lets you set alarm limits. Lets you read and write a devices text information.
Analog Register (AR) Boolean (BL) Digital Alarm (DA) Digital Input (DI) Digital Output (DO)
34
Analog Input
Calculation
Trend
Analog Output
Figure 4-1: Chain Showing Secondary Blocks Note that the first block in the chain is a primary block. This block is the primary source of data for the next block in the chain and determines the scan time for the entire chain. The following table lists the available standard secondary blocks. Table 4-4: Standard Secondary Blocks The block Calculation (CA) Event Action (EV) Extended Trend (ETR) Fanout (FN) Signal Select (SS) Timer (TM) Function: Performs mathematical calculations using values from the upstream block and up to seven other constants or block values. Monitors values or alarm conditions of the upstream block and performs actions based on the upstream blocks output. Allows you to collect up to 600 real-time values from an upstream block. You can display these values as a graph by adding charts to your pictures. Sends the value it receives from its upstream block to up to four additional blocks. Samples up to six inputs, manipulating the inputs according to a user-selected mode, and outputs a value to the next block. Counts time by incrementing or decrementing its value.
35
Table 4-4: Standard Secondary Blocks (continued) The block Totalizer (TT) Function: Maintains a floating-point total for values passed to it from upstream blocks. This block sends values up to six digits in precision to other blocks. It can display up to fifteen digits of precision in an operator display. Allows you to collect up to 80 real-time values from an upstream block. You can display these values as a graph by adding charts to your pictures.
Trend (TR)
Ratio/Bias (RB)
36
37
For more information about how these blocks work and how to use them, refer to the Using SQL manual and the Database Manager online help.
38
Intellution also makes the following Database Dynamos available: Table 4-9: Intellution Database Dynamos The Database Dynamo Analog Input with Freeform Scaling (AIS) Breakpoint Linearization (BPL) Transition Counter (CTR) 16 Bit Digital Status (D16) Group Alarm (GAB) Momentary Digital Output (MDO) Improved PID (PI2) Signal Generator (GEN) Time Date Stamp (TDS) Text Lookup Block (TXT) Text Register (TXR) Function: Essentially the same as an Analog Input block, but will also calculate a slope for EGU limit values when signal conditioning does not apply. Converts a level measurement from a non-linear tank into a volume measurement. Counts the transitions of a digital signal. Monitors up to 16 bits in a digital register, and enables or disables 16 independent messages. Organizes and consolidates the display of alarm information within a large system. Sends a brief pulse to a digital output (for example, to start a motor). Essentially the same functionality as the PID block, with more options. Demonstrates, simulates, or tests. A time-based primary block. Takes a snapshot of the time of an event. Monitors a status or command register in a PLC. Allows the operator to see and enter meaningful strings. Monitors devices where the raw data is an ASCII string. Similar to the Text block (TX), but not scanned.
These Database Dynamos are updated regularly to comply with updates to iFIX. For more description, or to download the Database Dynamos provided by Intellution, visit the Intellution web site at http://www.gefanucautomation.com.
39
Block Fields
Whenever you add a block, its configuration dialog box appears. The dialog box fields and controls represent locations in the block called fields. These fields store the information you enter into the dialog box. This information includes such data as the blocks name, description, scan time, I/O address, and scan status. Other block fields receive information from your process hardware or from other blocks. For example, a primary blocks current value comes from an I/O device. However, a secondary block receives its current value from an upstream block. All block fields use a common naming convention:
format _ name
The format indicates the type of data that the field stores. The following table lists the available formats: Table 4-10: Field Formats Format: A_ F_ T_ Description: ASCII Format. Floating-point Format. Graphic Format. Used in... Data links and objects in pictures. Data links, objects in pictures, and block-to-block references. Charts.
Refer to the Creating Pictures manual for more information on Data links, objects in pictures, and charts. The name indicates the specific information in the field. For example, the current value of a block is identified by the name:
CV
40
The combination of the field format and the field name provides you with the information you want. For example, if you want the current value of a block displayed as a number, you select the field F_CV. If you want the current value of a block displayed as text, you select the field A_CV.
Scan Times
All primary blocks have a scan time. The scan time determines how often SAC processes the block and sends the current value to the next block in the chain. SAC processes all secondary blocks chained to a primary block according to the primary blocks scan time. SAC can process a chain using one of the following methods: Time-based processing Exception-based processing One shot processing
41
Time-based processing is best used when you want to regularly scan a block. If you only need to scan a block when its value changes, use exception-based processing instead. Similarly, you can use one shot processing if you need to scan a block when the process database initially loads.
SAC scans chains with hour and minute scan times based on the system clock of the local SCADA server. Scan times are set relative to midnight (00:00:00 hours). SAC scans chains with second and subsecond scan times based on the computers start up time, as the following tables describes. Table 4-12: Time-Based Scan Time Examples When a block has a scan time of 1 hour 1 minute 10 seconds SAC processes it every...
Hour on the hour. Minute on the minute. 10 seconds from your computers start-up time.
42
Assigning Time-Based Scan Times You can assign a time-based scan time to a block by completing its Scan Time field with the following format:
time unit
The following table lists the valid units and their abbreviations. If you do not enter a unit of time, iFIX assumes the unit is seconds.
Entry M H
Example: Assigning Time-Based Scan Times To scan a block every 3 hours, enter:
3H
Because SAC processes this scan time based to the system clock, it scans the block at 0:00, 3:00, 6:00, 9:00, and 12:00 regardless of when you place it on scan.
43
Follow these guidelines when you assign scan times: Assign scan times larger than the poll rate assigned in the I/O driver. This ensures that the I/O driver has time to read and send new values to SAC before SAC scans each block again. See your I/O driver manual for more information about the poll rate. Phase (stagger) scan times to reduce the risk of overloading the CPU. Refer to the section Phasing to learn more about phasing. Assign critical process chains a more frequent scan time than non-critical chains. If you need to have a chain scanned every 2 minutes, assign a 2-minute scan time, not a 5-second scan time. Remember that very short scan times require more CPU time and SAC processing than longer scan times. If a chain does not need processing at a set time, assign exception-based processing. Doing so will require less CPU time and improve performance.
Using exception-based processing generally requires less CPU time and improves performance because SAC does not have to scan blocks at defined intervals. However, if a blocks value changes very frequently, time-based processing may be more efficient. You can use exception-based processing only if your I/O driver supports it. Consult your I/O driver client manual to learn if your I/O driver supports exception-based processing. NOTE: The SM2 driver supports exception-based processing; the SIM driver does not support exception-based processing.
44
CAUTION: Do not assign the same I/O address to exception-based and time-based blocks. Doing so will cause the exception-based blocks to occasionally miss an incoming value. Blocks that Work Best with Exception-Based Processing While you can use exception-based processing with most blocks, certain blocks perform better with exception-processing than others. You can use the following blocks in exception-based chains as needed:
Analog Input Analog Output Digital Input Digital Output Fanout Histogram
Using Program and Statistical Data Blocks Typically, the blocks listed in the following table are used as stand-alone blocks and have limitations when incorporated in an exception-based chain. Table 4-13: Program and Statistical Data Block Considerations When you add the block In an exception-based chain, do not use the... CALL, DELAY, WAITFOR, or WAITSTAT commands. WAIT TIME fields.
45
Blocks that Receive Multiple Inputs The Boolean, Calculation, Event Action, and Signal Select blocks can use values from multiple blocks, but SAC only processes them according to their upstream primary blocks scan time. Therefore, use these blocks with care in exception-based chains. For example, the following figure shows a sample chain containing a Calculation block that receives values from Analog Input blocks outside the chain.
AI3
AI2
AI1
CA1
AO1
Figure 4-2: Exception-Based Chain Processing In this chain, if SAC scans AI1 by exception, then CA1 only accesses values from the remaining Analog Input blocks when that exception occurs. CA1 does not access values based upon the scan times of the Analog Input blocks outside the chain. This means that regardless of whether AI2 and AI3 change in value, CA1 does not recalculate its output unless triggered by AI1. The following figure shows an improved chain design using the blocks from the previous figure. This chain allows CA1 to recalculate its value whenever an exception occurs to any of the Analog Input blocks and ensures all blocks are processed before the recalculating the output.
AI1
AI2
AI3
CA1
AO1
46
Blocks that Define a Time Constant PID, Lead Lag, and Dead Time blocks use the local computers system time to define a time constant. For this reason, Intellution recommends not using them in exceptionbased chains. Using Analog Alarm and Digital Alarm Blocks Analog Alarm and Digital Alarm blocks support exception-based processing. However, you must leave the Re-alarm Time and the Delay Time fields unmodified; otherwise, SAC places these blocks (and their chains) off scan when iFIX starts or when you reload the database. SAC processes exception-based Analog Alarm and Digital Alarm blocks only when an operator acknowledges an alarm from the Intellution WorkSpace. If an operator acknowledges the alarm with the Remote Acknowledge field, SAC does not process the block. Assigning Exception-Based Scan Times You can assign an exception-based scan time to a block by selecting Process by Exception from the blocks dialog box. If you are configuring an exception-based chain with multiple primary blocks, you must enter 0 in the Scan Time field of every primary block that does not start the chain, and select the Off Scan option button. Configuring the primary blocks that do not start the chain in this manner ensures that SAC processes the chain properly.
47
Phasing
Phasing staggers the time at which SAC scans your blocks. This is particularly important for large databases because it can dramatically improve performance. Even for small databases, phasing blocks results in more efficient use of CPU time. For example, if you have 3 unphased blocks with a 5-second scan time, SAC processes all 3 blocks at the same time. The following figure shows the CPU usage when SAC processes these blocks simultaneously.
Block3
12:00
11
12
13
14 15
16
Figure 4-4: Processing Blocks Without Phasing By phasing these blocks, you specify when SAC processes each block. For example, if you specify a 1-second phase for the first block, SAC scans the block as the following figure shows:
48
CPU Usage
12:00
11
12
13
14 15
16
Figure 4-5: Phasing for Block 1 If you specify a 2-second phase for Block 2, and a 3-second phase for Block 3, you can avoid processing the blocks simultaneously and evenly distribute the block processing and the CPU work load, as the following figure shows.
12:00
11
12
13
14 15
16
49
Phasing Second and Subsecond Blocks Normally, when you specify a phase for a block with a second or subsecond scan time, SAC offsets the blocks initial scan by the phase time when iFIX starts or when the database is reloaded. However, SAC ignores the phase when: A Program or an Event Action block places the phased block on scan. An operator or script places the block on scan. An EDA program places the block on scan.
For example, if the scan time is 5 minutes, you enter a phase of 1 minute and 30 seconds as follows:
1:30
50
Overphasing
You can also overphase your blocks. An overphased block is one that has a larger phase than scan time. For example, assume you have the chain shown in Figure 4-2. In this chain, AI2 and AI3 have 5-second scan times. AI1 is overphased with a 5second scan time and a 10-second phase. This delays AI1 by 10 seconds and ensures that SAC scans AI2 and AI3 before AI1. This means that the Calculation block receives the most recent values on which to perform its functions. Overphasing and Long Scan Times SAC only lets you overphase blocks with second or subsecond scan times. For blocks with a scan time of a minute or more, you can create an initial offset from the time that SAC would normally scan the block. For example, assume you want to scan a block every 6 hours with an offset of 2 hours and 10 minutes. You can configure the offset by entering the following phase in the Phase field:
2:10
Because the scan time is linked to the system clock, SAC always scans the block at 2:10, 8:10, 14:10, and 20:10 regardless of when it was placed on scan. Also remember, SAC scans blocks with scan times of one minute or longer immediately when iFIX starts or when the database is reloaded. To forego this initial scan, start SAC with the S command line parameter. Refer to the section Controlling SAC Startup in the Setting up the Environment manual for more information on specifying SAC command line parameters.
51
Block Modes
Blocks can receive data from the following sources: Other blocks. An I/O driver or OPC server. The keyboard (using Data links). Recipes. Easy Database Access programs. Visual Basic for Applications (VBA) scripts.
You can control from where a block receives data by setting its mode, as the following figure shows:
52
Automatic Mode In Automatic mode, blocks receive data from the I/O driver or the upstream block. I/O Driver
Analog Input
Calculation
Trend
Analog Output
Manual Mode In Manual mode, blocks receive data from Program blocks (using a SETOUT statement), Fanout blocks, operators using a keyboard to enter values, recipes, VBA scripts, or Easy Database Access (EDA) programs.
Placing a block in Manual mode does not place it off scan; SAC still processes the block using its last value. Manual mode only prevents a block from receiving data from an I/O driver, an OPC server, or the upstream block. SAC also scans exceptionbased blocks when they change mode (from Automatic to Manual mode or vice versa). While in Manual mode, SAC accepts any input within the EGU range and immediately scans the block. No deadband checking is made on these values. You can toggle a block's mode from an operator display by adding an object to the display and then using the Toggle Tag Auto/Manual Expert from the Task Wizard. To display a block's mode from an operator display, add a Data link that references the block's A_AUTO field. If you have enabled in-place data entry when configuring the data link, you can then modify that block's mode from the operator display by clicking on the Data link and entering AUTO or MANL. You can also modify a block's mode from the Database Manager by entering AUTO or MANL in the Curr Mode column for the selected block. NOTE: Blocks perform alarming in both Automatic and Manual modes.
53
The exact function of certain blocks depends on their mode, as the following table describes Table 4-15: Blocks in Automatic and Manual Modes The block Analog Input In automatic mode Reads and writes data every scan cycle. And in manual mode Receives data from operators entering values, scripts, Program blocks, recipes, or Easy Database Access (EDA) programs, but does not output values. Suspends execution until the block is placed in Automatic mode. Receives data from operators entering values, scripts, Program blocks, recipes, or EDA programs, but does not output values. Suspends automatic PID outputs. This allows you to change the output from the block. Block values, such as the set point and tuning parameters, can be changed from the keyboard. Suspends execution of its statements until the block is placed in Automatic mode. When the block is switched back to Automatic mode, it continues from where it stopped. Suspends feedback.
Executes all statements without interruption. Reads and writes data every scan cycle. Performs PID adjustments. Set points can be changed through a Data link in this mode. Executes all statements without interruption.
PID
Program
Statistical Control
Feeds information back into your process when the Statistical Data block generates an alarm. Performs online statistical process control on incoming data from other blocks.
Statistical Data
Suspends online data observations. Used for offline statistical process control.
54
55
Example: Blocks in PAUT Mode For blocks with short scan times, this means that the next scan time occurs relative to the last scan. For example, suppose SAC scans AI1 at 1:15:30. This block has a 30second scan time. If an operator changes the blocks mode to Automatic, SAC: [1] [2] Puts the block into PAUT mode. Scans the block again at 1:16:00, placing it in Automatic mode.
For blocks with long scan times, SAC synchronizes the next scan to the system clock. For example, assume AI2 has a one hour scan time and a 30-minute phase. If an operator places the block into Automatic mode, SAC: [1] [2] Puts AI2 into PAUT mode. Scans the block again on the half hour, placing it into Automatic mode.
56
and its chain on scan when you finish editing it. Refer to the section Setting Database Manager Preferences to learn more about Database Manager options. You delete any block within a chain. Refer to the section Deleting Blocks to learn more about removing blocks from the process database. Statements in Program blocks, Event Action blocks, or an EDA program place a chains primary block off scan. You connect the blocks in a chain incorrectly and SAC cannot scan the chain. Use Database Managers Verify command to determine which blocks are improperly chained. Refer to the section Verifying Databases to learn about examining your database for errors. A Program block finishes processing its statements and exits, the Program block does not execute again until the database is reloaded or the block is turned off and placed back on scan. You can place a block off scan from the Scan Status column displayed in the spreadsheet. An operator clicks an object with a VBA script that places a block off scan. You can quickly add such a script to an object with the Turn Tag Off Scan button. To use this button, you must first drag it from the CommandTasks toolbar category onto a toolbar. To learn how to display toolbar categories and add a button to a toolbar, refer to the section Customizing Toolbars in the Understanding iFIX manual.
57
Placing a primary block off scan turns that blocks entire chain off scan. You can put the chain back on scan by: Opening an operator display, selecting an object connected to the chains primary block, and running a script that places the block on scan. Setting up a Program or an Event Action block that places the chain back on scan. Changing the text in the Scan status column from OFF to ON. Adding or modifying a block with Database Manager or the Intellution WorkSpace. Depending on the options selected, both programs can automatically place the block on scan. An operator clicks an object with a VBA script that places a block on scan. You can quickly add such a script to an object with the Turn Tag On Scan button. To use this button, you must first drag it from the CommandTasks toolbar category onto a toolbar. To learn how to display toolbar categories and add a button to a toolbar, refer to the section Customizing Toolbars in the Understanding iFIX manual.
Blocks with Long Scan Times Blocks that have long scan times react differently to on/off scan changes than blocks that have short scan times. If you change the blocks scan status, it enters a pending state: PON (pending on) or POFF (pending off). This state indicates that a scan status change was requested and is pending, but SAC has not placed the block off or on scan. While a block is in PON, new values are ignored. Example: Placing Blocks with Long Scan Times On Scan Assume you have a block with a one hour scan time and you place it on scan 45 minutes into its scan cycle. The block enters the PON state and remains there for 15 minutes in order to synchronize it with SAC. Once synchronized, SAC changes the blocks state and places it on scan.
58
Using the S Parameter By default, SAC changes a blocks scan status shortly after entering the pending state. However, if SAC was started with the S command line parameter, the block remains in the pending state until SAC is ready to scan it.
I/O Drivers
In order for each primary block in the database to receive data, you must connect to your I/O using an I/O driver. The driver you select depends on your process hardware. Intellution sells drivers for many types of hardware. Contact your Intellution Sales Representative or visit the Intellution web site at http:// www.gefanucautomation.com/products/fixiodrivers/default.asp for a list of available drivers. Once you purchase a driver and install it, you can start specifying I/O points you want the current block to use. If the I/O point does not exist, Database Manager starts your I/O driver configuration program so you can add it. Refer to your I/O driver documentation to learn how to add an I/O point to your driver configuration. Simulation Drivers iFIX also supplies two simulation drivers, SIM and SM2, that you can use to test your chains before you connect to real I/O. The simulation drivers are matrixes of addresses. Database blocks read values from and write values to these addresses. If one block writes to a specific address, other blocks can read the same value from the same address. You can save these values when you save the process database; however, iFIX removes them from memory when SAC starts or you reload the database. Both drivers have the following in common: Provide a matrix of addresses that database blocks can read from and write to. Support analog and digital database blocks. Support text blocks.
59
The SM2 driver Provides three independent sets of registers. Analog blocks automatically access the analog registers, digital blocks automatically use the digital registers, and Text blocks automatically access the text registers. Changing a register in one set does not change the same register in the other set. For example, if you change the value of the analog register 1000, the value of the digital register 1000 is unchanged. Provides 20,000 analog, 20,000 16-bit digital registers, and 20,000 text registers. Stores analog values in 4-byte (32-bit) floating point registers, numbered 0 to 19999. Incoming values are not scaled. Digital values are stored in 16-bit integer registers, numbered 0 to 19999. Text values are stored in 8-bit registers numbered 0 to 19999. Each register holds one text character for a total of 20,000 bytes of text. Provides a register to simulate communication errors.
The SIM driver Provides one set of registers shared by both analog, digital, and text blocks.
Changing an analog register in the SIM driver modifies the register for analog, digital, and text reads. For example, if you change the value of the analog register 1000, you also modify the value of the same digital register. Provides 2000 analog and digital registers, a total of 32,000 bits. Stores analog values in 16-bit integer registers, numbered 0 to 2000. Incoming 32bit values are scaled to 16-bit values (0 65535). Digital values are stored in 16-bit integer registers, numbered 0 to 2000. Text values are stored in the same area as analog and digital values, numbered 0 to 2000. Cannot simulate communication errors. However, the SIM driver does provide registers RA through RK and RX through RZ to generate random numbers. For more information, refer to the Using Signal Generation Registers in the SIM Driver section. Does not support a C API for accessing SIM values.
Supplies a C API that allows applications to access SM2 analog, digital, and text values.
60
The SM2 driver Supports exception-based processing. Supports latched data for Analog Input, Analog Alarm, Digital Input, Digital Alarm and Text blocks when a simulated communication error is enabled. Can read and write the individual alarm status of each SM2 register. Does not provide alarm counters.
The SIM driver Does not support exception-based processing. Does not support latched data.
Cannot read and write the individual alarm status of any SIM register. Provides alarm counters that show the general alarm state of a SCADA server. For more information, refer to the Using Alarm Counters chapter of the Implementing Alarms and Messages manual.
To use the SIM driver: [1] [2] Enter SIM in the primary blocks Driver field. Complete the I/O Address field with the following syntax:
register:bit
For analog values, the register ranges from 0 to 1999. The bit is not used. For digital values, the register ranges from 0 to 1999. The bit is 0 to 15. The full range of register/bit settings is 0:0 to 1999:15.
61
The SIM driver shares only one set of registers for Analog and Digital blocks. As a result, you can address all 2000 registers as analog or digital values. The following table shows the digital bit values when a SIM register contains an analog value. Table 4-16: SIM Analog and Digital Values When the Analog Value is... 65535 The Bits for Digital Values are...
15 11111111
8 7 11111111
32768
15 10000000
8 7 00000000
62
Table 4-16: SIM Analog and Digital Values (continued) When the Analog Value is... 32767 The Bits for Digital Values are...
255
15 00000000
8 7 11111111
Database Manager does not accept entries into the Hardware Options and Signal Conditioning fields when using the SIM driver. In addition, the SIM driver supports: Only five-digit precision instead of the standard seven-digit precision. Time-based processing; you cannot use exception-based processing. The output of good values. The SIM driver does not output bad values. If you are testing your system for fault tolerance, remember that the SIM driver does not send communication errors (BAD values).
63
The bit portion is needed only when using a digital block. Example To ramp a value with the RA register, enter the following text in the I/O Address field:
RA
The following table lists the available registers. Table 4-17: SIM Signal Generation Registers The register RA RB RC Lets you Valid Entry Read only Read only Read only
Ramp a value from 0 to 100% of the EGU range at a rate controlled by the RY register. Count from 0 to 65535 at a rate of twenty counts per second. Shift one bit through a 16-bit word at a rate controlled by the RZ register.
64
Table 4-17: SIM Signal Generation Registers (continued) The register RD RE Lets you Generate a sine wave from 0 to 100% of the EGU range at a rate controlled by the RY register. Generate a sine wave from 0 to 100% of the EGU range at a rate controlled by the RY register. The sine wave is delayed 90 degrees relative to the RD register. Generate a sine wave from 0 to 100% of the EGU range at a rate controlled by the RY register. The sine wave is delayed 180 degrees relative to the RD register. Generate random values between 25% and 75% of the EGU range. Ramp up a value to 100% of the EGU range and then ramp it down to 0% again at a rate controlled by the RJ register. Control the ramp direction of the value in the RH register. When zero, register RH ramps down; when one, RH ramps up. The value automatically changes when RH reaches 0 or 100% of its EGU value. Control the ramp speed (in cycles per hour) for the value in register RH. The default value is 60 (1 cycle per minute). Enable or disable the generation of the value in the RH register. Enter zero to freeze (disable) ramp and a nonzero value to enable it. Enable or disable the generation of values in the other registers. Enter zero to freeze (disable) all registers and a non-zero value to enable all registers. Valid Entry Read only Read only
RF
Read only
RG RH
RI
Numeric Value (0 or 1)
RJ
RK
RX
65
Table 4-17: SIM Signal Generation Registers (continued) The register RY Lets you Control the speed (in cycles per hour) at which new values are generated for registers RA, RD, RE, and RF. By default, the RY register is set to 60 (1 cycle per minute). Control the speed (in bits per minute) that the register RC changes its value. By default, the RZ register is set to 180 (3 bit shifts per second). Valid Entry Numeric Value (2 to 3600) Numeric Value (2 to 1200)
RZ
All SIM registers support Analog Input, Analog Register, Digital Input, and Digital Register blocks. However, as the following table describes, certain blocks provide optimum performance when used with certain registers.
The block Analog Input Analog Output Analog Register Digital Input Digital Register
Works best with the register RA, RD, RE, RF, RG, and RH RJ, RY, and RZ RA, RD, RE, RF, RF, RH, RI, RJ, RK, RX, RY, and RZ RB and RC RB, RC, RI, RK, and RX
NOTE: The RB and RC registers support Digital Register offsets of A_0 to A_15.
66
Accessing SM2 Registers The SM2 driver matrix consists three independent sets of registers, one for analog values, one for digital values, and one for text values. Analog database blocks read from and write to analog registers only. Once a block writes a value, other analog blocks can read the value from the register written to. Digital database blocks work the same way, reading and writing from the digital registers. iFIX clears all SM2 values when iFIX starts. The SM2 driver does not use the Hardware Options or Signal Conditioning fields. To use the SM2 register: [1] [2] Enter SM2 in the primary blocks Device field. Complete the I/O Address field with the following syntax: For Analog values: register For Digital values: register:bit For Text values: register Table 4-18: SM2 Address Examples Analog Examples 1000 16435 Digital Examples 5000:10 23:15 Text Examples 2000 off
67
68
Table 4-19: C API Functions Syntax UINT16 GetAnalog(UINT16 index, FLOAT *data); Values read, written, and returned GetAnalog reads an analog value (32-bit float) to the register indicated by 'index'. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range. UINT16 SetAnalog(UINT16 index, FLOAT data); SetAnalog writes an analog value (32-bit float) to the register indicated by 'index' and causes an exception for the specified register even if the data has not changed. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range. UINT16 GetDigital(UINT16 index, UINT16 *data); GetDigital reads 16 digital values (all 16 bits in one of the 20,000 digital registers) to the register indicated by 'index'. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range. NOTE: The API can only read and write the entire 16 bit digital register at one time. If you want to change 1 bit, you can read the register, modify the desired bit and write the register. However, when you modify a single bit, ensure that only one thread in one application is accessing a digital register at one time.
69
Table 4-19: C API Functions Syntax UINT16 SetDigital(UINT16 index, UINT16 data); Values read, written, and returned SetDigital writes 16 digital values (all 16 bits in one of the 20,000 digital registers) to the register indicated by 'index' and causes an exception for all 16 bits of the specified register even if the data has not changed. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range. NOTE: The API can only read and write the entire 16 bit digital register at one time. If you want to change 1 bit, you can read the register, modify the desired bit and write the register. However, when you modify a single bit, ensure that only one thread in one application is accessing a digital register at one time. UINT16 SetDigitalEx(UINT index, UINT16 data, UINT16 mask) SetDigitalEx writes 16 digital values (all 16 bits in one of the 20,000 digital registers) to the register indicated by 'index' and causes an exception for specific bits selected from a mask. An exception is triggered for the bits set in the mask even if the data has not changed. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range. NOTE: The API can only read and write the entire 16 bit digital register at one time. If you want to change 1 bit, you can read the register, modify the desired bit and write the register. However, when you modify a single bit, ensure that only one thread in one application is accessing a digital register at one time. UINT16 GetCommError(UINT16 *data); GetCommError reads the communication error flag to the S register. The flag is a 1 bit integer value. FE_OK is returned always.
70
Table 4-19: C API Functions Syntax UINT16 SetCommError(UINT16 data); Values read, written, and returned SetCommError writes the communication error flag to the S register. The flag is a 1-bit integer value. You should only pass 0 or 1 to the SetCommError function. Using any other value can have unpredictable results. FE_OK is returned always. UINT16 SetAnalogAlarm(UINT16 index, INT16 alm); SetAnalogAlarm writes an alarm status to an analog register indicated by 'index' and causes an exception for the specified register even if the data or alarm has not changed. To learn more about available alarm statuses, refer to Understanding Alarm Statuses. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range. UINT16 GetAnalogAlarm(UINT16 index, INT16 *alm); GetAnalogAlarm reads an alarm status from an analog register indicated by 'index'. To learn more about available alarm statuses, refer to Understanding Alarm Statuses. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range. UINT16 SetDigitalAlarm(UINT16 index, INT16 alm); SetDigitalAlarm writes an alarm status to a digital register indicated by 'index' and causes an exception even if the data or alarm has not changed. The same alarm is associated with all 16 bits in the digital register. To learn more about available alarm statuses, refer to Understanding Alarm Statuses. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range.
71
Table 4-19: C API Functions Syntax UINT16 GetDigitalAlarm(UINT16 index, INT16 *alm); Values read, written, and returned GetDigitalAlarm reads an alarm status from a digital register indicated by 'index'. To learn more about available alarm statuses, refer to Understanding Alarm Statuses. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range. UINT16 SetText(UINT16 index, char *data, int size) SetText writes the text specified by data to text registers starting at the register indicated by index. The number of characters to write is indicated by size. Exception-based processing is not supported for text values. SetText does not automatically add a null terminator to the text being written. If you require null-terminated strings, make sure your program adds a null terminator prior to writing the text. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range. UINT16 GetText(UINT16 index, char *data, int size) GetText reads the text specified by data from text registers starting at the register indicated by index. The number of characters to read is indicated by size. GetText does not automatically add a null terminator to the text being read. If you require null-terminated strings, make sure your program adds a null terminator after reading text. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range.
72
Table 4-19: C API Functions Syntax UINT16 SetTextAlarm(UINT16 index, INT16 alm) Values read, written, and returned SetTextAlarm writes an alarm status to a text register indicated by 'index'. When a block reads data from the SM2 driver, the alarm status of the first byte is returned. The status of additional bytes is ignored. To learn more about available alarm statuses, refer to Understanding Alarm Statuses. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range. UINT16 GetTextAlarm(UINT16 index INT16 alm) GetTextAlarm reads an alarm status from a text register indicated by index. To learn more about available alarm statuses, refer to Understanding Alarm Statuses. FE_OK is returned if the operation succeeds. FE_IO_ADDR is returned if the register index is out of range.
Severity 16 (highest) 7
Description Communication Error ("BAD" value). Change From Normal (Digital block only).
73
Severity 7
Description The block is in the HIHI alarm state (High High), or the block is in the LOLO alarm state (Low Low). Value exceeds rate of change setting since last scan period. The block is in the HI alarm state (High), or the block is in the LO alarm state (Low). Deviation from the set point. The block is in normal state.
6 6
5 0 (lowest)
IA_DEV IA_OK
Using the preceding table, you can see that if a driver returns a HIHI alarm to a block that is in HI alarm, iFIX changes the alarm state to HIHI because the driver alarm is more severe. However, if the alarms are of equal severity, iFIX does not change the alarm state of the block. For example, if the block is in HI alarm and the driver returns a LO alarm, the blocks alarm state does not change because both alarms have equal severity. Once an operator acknowledges the HI alarm, iFIX changes the blocks alarm state. NOTE: If you set a communication error to the S register with the SetCommError function, then all SM2 registers show a COMM alarm status. When examining the alarm status of text, only the status of the first character (byte) is read. You can control the alarm status functions of the SM2 driver using its C API only. Refer more information about this API, refer to the Using the SM2 C API section.
74
where ServerName is the name of your OPC server, GroupName is the name of the OPC group you want to access, and ItemID is the name of the OPC item you want to read or write. Including the AccessPath is optional and instructs the server how to access its data. For more information about connecting to your OPC server, refer to your OPC PowerTool documentation.
75
Example: Understanding Signal Conditioning Suppose you have a 700-gallon water tank and you want to display how much water is in the tank. You can display the tanks water level as: Unscaled integer received from your process hardware Gallons Percent filled
For this example, assume the I/O driver sends an unsigned integer to the process database (that is, 0 to 65535). The following table lists sample high and low EGU limits you could assign to the input block. These settings scale the incoming values to display the tanks water level in percent filled and in gallons. Table 4-20: Example Block EGU Limits Operator Display: Unsigned Integer Percent Gallons Limit Settings: 0 to 65535 0 to 100 0 to 700
The following figure shows the values that are displayed when the tank is full, half full, and empty.
76
Gallons 700
Percentage 100%
Half Full
32767
350
50%
Empty
0%
is adjusted to read:
SETOUT AI1 50.00
77
Changing the EGU Limit Range To change the EGU limits range, you must change all references to this block manually. For example, if you create an Analog Input block with limits of 0.0 to 100.0 and then change the range to 0.0 to 700.0, all references to this blocks EGU limits are unaffected until you edit them. In this case, assume you have a Program block that outputs a value equal to half of this blocks original range, as shown below:
SETOUT AI1 50.0
You must modify this Program blocks SETOUT statement to reflect the new range, as shown below:
SETOUT AI1 350.0
EGU Limit Formats Database Manager accommodates the EGU limit formats listed in the table Available EGU Limits. Each format is accurate to six digits. Because of compiler limitations, round-off errors may occur in the seventh digit. The following figure shows sample values and their accuracy.
78
Figure 4-8: Block Limit Accuracy Table 4-21: Available EGU Limits Format: Standard Integer Accepts Limits From: -32768 to 32767 0 to 65535 0 to 999 0 to 4095 (signed int) (unsigned int) (3BCD) (12 Binary)
-9999999 to 9999999 Using this format, you can specify up to six places after the decimal point. Make sure you enter the same number of decimal places in fields that require both high and low limits. Note that this range would be 1E7 to +1E7 in scientific notation. 3.4E-38 to 3.4E+38 Use this format to display large or small numbers. Again, only the first seven digits are accurate. If you prefer, you can also use scientific notation for numbers that iFIX can display in decimal notation. Using decimal notation with scientific notation, you can specify up to six places after the decimal point.
Scientific Notation
NOTE: Refer to your I/O driver manual for additional integer ranges supported by your equipment.
79
80
81
You can establish a connection with a different server by opening a different database. Once you select the new server you want to connect to, Database Manager disconnects from the existing server and opens the selected servers current database. You can also disconnect from a SCADA server by closing the database. If the database has unsaved changes, Database Manager prompts you to save them before breaking the connection.
Adding Blocks
After you open or create a new database, you can begin adding blocks to your database. Database Manager lets you add blocks by: Double-clicking a blank cell in the spreadsheet. Right-clicking a cell in the spreadsheet and selecting Add block from the popup menu. Clicking the Add button from Database Managers toolbar. Entering the name of a nonexistent block in the Next field of a block dialog box and clicking the arrow button. Refer to the VBA Naming Conventions section of the Writing Scripts manual for information on appropriate names. Using the Generate Wizard.
When any of the first four methods are used, you can select the type of block you want to add. Once you do this, a block configuration dialog box appears. By completing the dialog box and clicking OK, you can add the block to the database. For more information on completing a block configuration dialog box, refer to the Database Manager online help. NOTE: Whenever you add or delete a block in the database, we recommend you resolve your pictures. For more information about resolving pictures, refer to the Creating Pictures manual.
82
Prefix F
Starting number 1
Ending number 20
Increment 1
Suffix T1
The Generate Wizard cannot create a block with a name that already exists. If the information you specify results in an existing block name, the Wizard skips that block and continues on to the next one. Using the Generate Wizard, you also have the option of customizing up to 5 fields. Customizing these fields lets you fine tune the blocks configuration. For example, if you need to create 50 Digital Input blocks, each one will have a different I/O address. You can use the Generate Wizard to assign these addresses if they occur in a sequential order. You can customize a field by selecting it and entering a prefix, suffix, starting number, ending number, and increment value. The Wizard handles this information identically to the block name values you entered. If the resulting sequence of field values ends before the Wizard creates all the new blocks, the sequence repeats from
83
the beginning. For example, suppose you want to create 10 Analog Input blocks, AI1 through AI10 and you customize the I/O address of each block with the following information:
Prefix
Starting number 10
Ending number 50
Increment
Suffix
10
:7
Block AI1 AI2 AI3 AI4 AI5 AI6 AI7 AI8 AI9 AI10
Address N10:7 N20:7 N30:7 N40:7 N50:7 N10:7 N20:7 N30:7 N40:7 N50:7
84
You also have the option of enabling the Use Custom Format check box. When you enable this check box, the Wizard lets you enter multiple patterns for the five fields you have selected. A pattern acts as a programming statement for generating a range of numeric or string values. The following table lists the syntax for each type of pattern. Table 5-1: Pattern Types Type Numeric Syntax <start:end:increment> where start is the initial value of the pattern, end is the ending value, and increment is the amount to add to the current pattern value. Alphanumeric List <string1, string2,... string> where string1 is the first string, string2 is the second string, and string is the last string. Each string must be enclosed in quotation marks. Literals string where string is up to 40 alphanumeric characters. Constants string where string is up to 40 alphanumeric characters, including the quotation marks. Alarms Elapsed Time Analog Input Curr Value > 100 I/O Addr < 500 PLC:N7:<766:780:1>/15 <A, B, C, D> <Area A, Area B, Area C> <Pump 1, Pump 2, Pump 3> Example <1:10:1> generates a range of numbers from 1 to 10. <1:20:3> generates the numbers 1,4,7,10,13,16, and 19.
85
Notice that the difference between literals and constants is minor. Both are strings and can be up 40 characters. However, quotation marks ( ) are required for constants when the string contains any mark of punctuation or non-alphanumeric symbol such as an angle bracket or a colon. If the string contains only numbers or letters, the quotation marks are optional. Also notice that negative and floating point numbers are not supported within patterns. You can generate these types of numbers by enclosing a minus sign or a decimal point in quotation marks outside of the pattern. Negative increments are not supported. Consider the following examples:
By combining different pattern types, you can generate a wide range of block field entries. For example, if you want to customize the Description field for a group of blocks, you could enter a pattern such as Alarm Status from Area <A, B, C>. Notice that the text outside the pattern does not require quotation marks.
Duplicating Blocks
Another way you can add similar blocks to the database is by duplicating them. Like the Generate Wizard, you can duplicate multiple blocks. However, you cannot customize specific block fields; you can only specify a new name for the duplicated blocks. As a result, the new blocks are identical to the original ones. For example, suppose you have an Analog Input block monitoring the speed of a pump and want to monitor five other pumps in a similar way. By duplicating the block, you can reproduce it and create the additional blocks you need.
86
Pasting CSV-based blocks into Database Manager converts and adds them to the process database in memory. If the names of these blocks are already in use, Database Manager prompts you to replace the existing blocks with the ones you are pasting. If you do not replace them, Database Manager generates an error for each
87
duplicate block. You can avoid creating these errors by loading a database that does not contain the blocks you are pasting or by modifying the names of the blocks prior to pasting them into Database Manager. Database Manager also displays errors if you attempt to paste a block from Excel that is not in the correct format. The easiest way to ensure the block is in the correct format is to export a block of that type from the process database or paste a block into Excel, modify it, and paste the modified block back into Database Manager.
Moving Blocks
In addition to sharing blocks by copying and pasting them, you can cut and paste them. Cutting blocks from the database is similar to copying them; the main difference is that cut blocks are physically moved and placed on the clipboard, allowing you to move blocks to other databases. Prior to removing blocks from their chains, Database Manager takes each chain off scan. Make sure you place the chain on scan when you finish editing it. iFIX provides several ways to do this. For more information about placing a block or chain on scan, refer to the section Placing Blocks On and Off Scan. If you cut a block from the middle of the chain, Database Manager attempts to connect the two portions of the chain, as the following figure shows.
88
Assume you want to remove the Trend block from this chain.
Analog Input
Calculation
Trend
Analog Output
Analog Input
Calculation
Trend
Analog Output
While the block is highlighted, select Cut or Delete to remove the block from the chain.
Analog Input
Calculation
Analog Output
Once the block is removed, Database Manager fills in the hole and connects the Calculation and Analog Output blocks.
Analog Input
Calculation
Analog Output
Modifying Blocks
You can modify any database block displayed in the spreadsheet. Typically, you need to modify a block: After you copy it into the database. If you discover an incorrect field value. Whenever your database needs change.
89
NOTE: While you can modify Analog Register and Digital Register blocks, we do not recommend that you modify the current value of these blocks using Database Manager. To learn more about using Analog Register and Digital Register blocks, refer to the section Working with Analog and Digital Blocks.
Deleting Blocks
Whenever you find that specific blocks are no longer needed, you can delete them from the database. Database Manager lets you delete blocks by selecting the blocks you want to remove and cutting them without subsequently pasting them, or by selecting the Delete button from Database Managers toolbar. The difference between these methods is the Delete button removes the selected blocks completely and does not let you retrieve them if you change your mind. By cutting blocks, you instruct Database Manager to save a copy on the clipboard allowing you to paste them back into the database until the next copy or cut occurs. Regardless of the method you choose to remove the blocks, Database Manager displays a message box with the following text:
Following tag(s) selected for deletion from database
Click Cancel to retain the blocks and continue using Database Manager. If you click Delete All, Database Manager deletes the blocks and takes the chains containing them off scan. Make sure you place the chain on scan when you finish editing it. iFIX provides several ways to do this. For more information about place a block or chain on scan refer to the section Placing Blocks On and Off Scan. If the deleted block was in the middle of the chain, Database Manager attempts to connect the two portions of the chain as Figure 5-1 shows.
90
Saving a Database
When you finish making changes to a database, you can save the database to disk. By saving the database, you enable the SCADA server to reload the database in memory when you restart iFIX.
Make sure you have enough disk space available when saving your database to disk. If your SCADA server does not have enough disk space, you may lose the changes you have just made. For example, if you build a 3MB database, make sure you have 3MB of free disk space available.
The -N command line parameter enables you to save a database on a remote SCADA server. The -D command line parameter enables you to save a database to another PDB file name. Both command line parameters are optional; if you do not use them, you save the current database on the local SCADA server. When you save a database from a VBA script, use routines similar to the following:
Private Sub FixEvent1_OnTrue() Dim save_pdb As String Dim return_value As Double Dim nodename As String Dim database As String nodename = "MIXER1" database = "BACKUP" save_pdb = System.ProjectPath + "\DBBSAVE" + " -N" + nodename + " -D" + database return_value = Shell (save_pdb, 0) End Sub
91
End SubRefer to the Database Manager online help system for more information about the RUNTASK from the Program block. For information about the Shell function, refer to the iFIX Automation Interfaces Help file.
92
93
You can also find whole or partial words with the Match Whole Word Only option. Database Manager treats the search string as a whole word when you enable the option. By disabling the option, you can find the specified string inside other words. For example, if you search for the string line with the Match Whole Word Only option disabled, Database Manager matches the following descriptions with the search string: Alarms for Line 1 Alkaline Pump Linear accelerator for proton chamber
Replacing Data
In addition to finding text, you can find and replace it. Finding and replacing text is similar to just finding it. Both tasks require you to select the cell or column you want to search in and enter a search string. However, when finding and replacing data, you can also enter a replacement string. This text is the data with which you want to replace the search string. Find Options You can enter up to 29 alphanumeric characters for both the search and replacement strings. Both strings also accept the Match Case and Match Whole Words Only options. However, while you can toggle the case sensitivity of the search string with the Match Case option, the replacement string is always case sensitive. This means that when replacing data, Database Manager inserts text exactly as you enter it. You also have the option to replace the text in the current selection (a cell or column) or the current column. The Selection option button lets you replace text in the current selection. The Entire Column option button lets you replace text in the entire column. 94
Using Go To
While working with your database, you may want to display the text in a specific row or column. When the number of rows or columns is small, using the scroll bars to move through the spreadsheet is a quick way to display the necessary information. However, as the spreadsheet grows, you may find scrolling through it slow and timeconsuming. To speed up locating information, you can jump to any row or column. You can also jump to any block in the spreadsheet when do not know the blocks row number by entering its name instead.
95
By completing these tasks, you can create a custom display for yourself and other database developers.
96
Figure 6-1: Defining a Non-Scrolling Column Using this feature, you can display related information without resizing or rearranging the spreadsheet columns. For example, if you configure the Type column to stop scrolling, you can easily relate block values, names, and types, allowing you to identify the block containing the values in each column. When you create a non-scrolling column, all columns to the left of it no longer scroll until you unlock them.
97
The columns you can select correspond to common and block-specific fields. Columns corresponding to common block fields appear with only the field name. For example, the following text appears for the common field Current Value:
Curr Value
The type is a two or three-character abbreviation for the block type and the fieldname is the name of the block field. For example, suppose you see the following text:
AI Smooth
AI is the block abbreviation and identifies the field as an Analog Input specific field. The text Smooth indicates the field name and corresponds to a block field (in this case the A_SMOTH field). Table 8-2 lists the abbreviations for each block. NOTE: If you remove a column from the spreadsheet that Database Manager uses to sort data, the column is also removed from the sort order.
98
By saving spreadsheet layouts, you eliminate the need to recreate them. Database Manager saves your spreadsheet layout in format files residing in the FIX Local path by default. These files have the extension .FMT. Loading a format file is like creating a spreadsheet layout. It appears in the Properties dialog box, allowing you to modify it as needed. In addition, when Database Manager opens the format file, the program replaces the current set of spreadsheet columns with the ones listed in the format file. If a block does not include a field that corresponds to one of the new columns, the text ---- appears in that cell.
99
Table 6-1: Database Manager Default Layout Default Column I/O Dev I/O Addr Curr Value Corresponding Field A_IODV A_IOAD A_CV
If you prefer a different default arrangement of the spreadsheet columns, you can override the preset default layout with your own by saving the current settings. You can also restore the original layout as the default by loading the format file and selecting Save Settings from the Tools menu.
100
or
value operator {column}
where column is a column heading you want to display, enclosed in curved brackets, operator is one of the relational operators listed in the table Relational Operators, and value is a number or string enclosed with quotation marks ( ). Table 7-1: Relational Operators Operator = <= Meaning Equal to Less than or equal to
101
Table 7-1: Relational Operators (continued) Operator < != >= > Meaning Less than Not equal to Greater than or equal to Greater than
Case Sensitivity Strings entered in a query are not case sensitive. For example, a query such as:
{Tag Name} = AI*
retrieves blocks with names that start with AI. It also retrieves blocks with names that start with: Ai ai aI
When entering a number, the blocks EGU range determines the maximum and minimum values you can enter. The following table lists these limits. To learn more about the EGU range, refer to the section Understanding EGU Limits. Table 7-2: Available EGU Limits The format Standard Integer Accepts EGU Limits From -32768 to 32767 0 to 65535 0 to 999 0 to 4095 (signed int) (unsigned int) (3BCD) (12 Binary)
102
Table 7-2: Available EGU Limits (continued) The format Expanded Decimal Notation Scientific Notation Accepts EGU Limits From -9999999 to 9999999 +/-3.4E-38 to +/-3.4E+38
to display all the blocks in security area Packaging with a scan time of 3 seconds. Table 7-3: Boolean Operators The operator AND OR NOT NOR XOR NAND Instructs Database Manager to Select the block when both query A and query B are true. Select the block if either query A or query B is true. Invert query. If query A is true, its value becomes false. Select the block when both query A and query B are false. Select the block if query A and query B are not both true or both false. Select the block when query A and query B are not both true. Example A AND B A OR B NOT A A NOR B A XOR B A NAND B
103
Retrieves... Every block in the database. Every block whose name that begins with an A. All Analog Input and Digital Input blocks.
Other operators, such as the greater than (>) or less than (<) operators, treat wildcards literally.
104
Retrieves... No blocks, because the question mark is treated literally and 1M through 9M have a lesser ASCII value than ?M. All blocks with a scan time from 1 minute to 9 minutes.
{Scan Time} = ?M
Grouping Queries
You can group queries together using parenthesis. For example, consider the following query:
{Tag name} = A* AND ({Type} = AI OR {Type} = AO)
Database Manager evaluates this query from left to right. Expressions enclosed in parenthesis are treated as a unit. Consequently, as Database Manager evaluates the above query, it retrieves every block that begins with an A. From this list of blocks, the program then displays all the Analog Input or Analog Output blocks. Be careful where you place parenthesis in a query. The following query yields a very different spreadsheet compared to the query given above.
({Tag name} = A* AND {Type} = AI) OR {Type} = AO
This query displays every Analog Input block that begins with an A and every Analog Output block in the database.
Editing a Query
After you create a query, it remains the current query until you change it. Using this feature, you can append a new query to the existing one and re-query the database. For example, suppose you create the following query:
{Type} =AI AND {Alarm Areas} =Boston
105
This query displays all the Analog Input blocks in the Boston alarm area. By appending the query:
AND {AI LOLO Alarm}<= 10
you can display only those Analog Input blocks in the alarm area which have a LOLO alarm value less than or equal to ten. To locate blank cells in the database: [1] [2] Select Properties from the View menu. Select the Query tab and enter the following query.
{TAG NAME} = "*" AND {column_name}=
For example, to find blank cells in the Description column use the query:
{TAG NAME} = "*" AND {Description}=
This query displays all the blocks in the database that have no text in their Description fields.
Once Database Manager retrieves these blocks, you can refine the query by adding other queries to it. For example, you could add the following query to display only the Analog Input blocks with a scan time of two seconds:
106
Similarly, you could increase the number of blocks in the spreadsheet by displaying all the Analog Input blocks and then, to the original query, add all Analog Output blocks in the database with the following query:
OR {Type} = AO
107
How Sort Orders Work Database Manager sorts the spreadsheet, by: [1] [2] [3] Identifying which columns to sort. Sorting the first column in ascending or descending order. Repeating the previous step for the remaining columns in the sort order.
When sorting by ascending or descending order, Database Manager sorts: Special characters (such as marks of punctuation) by ASCII value. Numbers by numeric value. Letters in alphabetical order.
For example, suppose you want to sort the spreadsheet by the Type and Scan Time columns in ascending order. Once you select these columns: [1] Database Manager sorts the spreadsheet by the Type column alphabetically (ascending order). Next, the program sorts the Scan Time column in numeric order.
[2]
108
109
110
8. Managing Databases
Database Manager lets you manage your process databases in many different ways. For example, you can verify them to ensure they do not contain any errors. You can also reload, import, and export your databases as needed. This chapter describes all these management tools.
Verifying Databases
You can ensure a process database contains no configuration errors by verifying it. Verifying a database also ensures that iFIX can process each block and that the database functions as you intend. While verifying a process database, Database Manager ensures that each block: Is in only one chain. Is linked to an appropriate block (for example, a Statistical Control block can be preceded only by a Statistical Data block). Is used in the correct context (for example, as a stand-alone, a primary, or a secondary block). Does not reference non-existent blocks.
111
If Database Manager detects no errors, it displays a message box to inform you. However, if it encounters errors, the Verify Database dialog box appears. This dialog box lists each error and the block that contains it. The following table lists the possible verification errors and how to resolve them. Table 8-1: Resolving Verification Messages When you see the message tagname a:tagname b Tag is in more than one chain It means To correct this configuration Remove one or more links to tagname b.
The block, tagname b, has more than one upstream block linked to it. Tagname a identifies one of these blocks. You may have a secondary block that is not in any chain or is the first block in a chain. The block, tagname, chains to a block that does not exist.
tagname:Tag is not in any chain tagname: Block not found for NEXT
Remove the secondary block or add a primary block to the start of the chain. Create a block with the name specified in the Next field or enter the name of a block that exists. Change the name in the Next field or leave it blank. If you want to repeatedly perform a task, use a Program block instead. Create the block or change the reference to a block that exists. Change the reference to a field that exists. Redesign this chain by breaking it into two smaller chains or remove any unnecessary blocks.
tagname:Chains to itself
The block, tagname, contains its own name in its Next field.
The block, tagname, does not exist and another block references it. The field, fieldname, does not exist and it is referenced by a block in the database. The database contains a chain with more than 30 blocks.
112
Correcting Errors You can correct any error by double-clicking it to display the associated block configuration dialog box. Once this dialog box appears: [1] [2] [3] Edit the block to correct the problem. Save the block. Re-verify the database.
Reloading Databases
Even though you can create multiple databases for a SCADA server, Database Manager can load and display only one of them at a time. You can load any database residing on the current SCADA server by selecting Reload from the Database menu. Reloading a database lets you: Switch from one database to another. Restore the database to its saved configuration. Load a database after completing and saving modifications. Place on scan the chains configured to begin processing when SAC starts.
Using the SCU, you can select the default database to load on start-up. When you load another database, it remains in memory until you restart iFIX. Refer to the Setting up the Environment manual for more information about specifying the database to load on start-up.
113
Dim database As String nodename = "MIXER1" database = "BACKUP" load_pdb = System.ProjectPath + "\DBBLOAD" + " -N" + nodename + " -D" + database return_value = Shell (load_pdb, 0) End Sub
The -N command line parameter enables you to reload a database on a remote SCADA server. The -D command line parameter enables you to reload a database other than the currently loaded one. Both command line parameters are optional; if you do not use them, you reload the open database on the local SCADA server. For information about using the Shell function from a script, see the Visual Basic help system. CAUTION: The DBBLOAD system task does not prompt you to save changes to the database. Be sure you save your database before executing a script that reloads the database. Otherwise, you will lose all your changes.
Using this information can help you manage your databases. For example, knowing the databases serial number can help you determine if someone modified your database since its last save. The serial number is a unique code that Database Manager creates whenever you add or delete a block. By writing down the serial number after you modify the database, you can subsequently compare the current number to the previous one.
114
High-level documentation about the database can also help you manage your databases. You can provide this level of information by displaying the databases contents. The contents lists by block type the number of blocks used and allocated. A used block is one you have configured. An allocated block is a placeholder in memory. To make efficient use of memory and improve performance, all SCADA servers pre-allocate 10 blocks at a time when you initially create a block of a specific type, as the following figure shows.
When you create your first Analog Input block, the SCADA server allocates 10 spaces in memory for new Analog Input blocks.
After you use these spaces in memory, the SCADA server allocates another 10 spaces when you create your eleventh Analog Input block.
Figure 8-1: Allocating Memory for Database Blocks As an option, you can restrict your process database to a specific number of I/O blocks (intended for small applications that do not require many I/O points). In this environment, the I/O count lets you determine how many I/O blocks are in use.
Exporting Databases
You can export the current process database to a comma separated value (CSV) or GDB text file. Typically, you export a database when you want to: Complete large editing tasks using a text editor or spreadsheet, Change the alarm area database used by the process database; or Import it into a relational database for subsequent analysis.
115
For example, you could export your process database in CSV format and import the data into Microsoft Excel. By importing the file into Excel, you can: Automatically number or enter block values. Format values with Excel styles. Calculate a value with a spreadsheet formula. Automate the creation and modification of blocks by creating and running macros.
For more information using these features, refer to your Excel documentation. Database Manager exports all the blocks displayed in the spreadsheet. As a result, you can query the database to display only the blocks you want to export. For example, to export all the Analog Input blocks in the database, use the query:
{TYPE} = "AI"
For more information about querying the database, refer to the section Understanding Query Syntax.
You can also enter comments into the export file by typing an exclamation point (!) as the first character on a line.
116
CSV File Format For more intricate editing of the export file, you need to understand the file format. For example, an export file saved in CSV format lists each row of the spreadsheet as one row in the CSV file. Each blocks fields appear delimited by commas. The first two fields of each block are:
A_NAME, A_TAG
You only need to enter values for these two fields when creating new blocks. If no additional field values are present, Database Manager creates the block using the default block values. However, by adding these optional values to a block entry, you can complete specific dialog box fields when the block is imported. For example, the following line creates an Analog Input block with a scan time of 1 minute:
AI, AI2, , , , 1M
GDB File Format The format of the GDB file is different. It uses the syntax:
label
:: field_value ; fieldname
The first two lines of each block entry are required and contain the block type and block name. Without these lines, Database Manager will not add the block to the database when you subsequently import it. Subsequent lines in a block entry appear for each field on the blocks configuration dialog box. Including these additional lines is optional. If no additional lines are present, Database Manager creates the block using the default block values. However, by adding these optional lines to a block entry, you can complete specific dialog box fields when the block is imported. For example, to set the scan time of the block AI1 to 5 seconds, the export file should contain the following information:
Block Type:: AI ;A_NAME Tag Name :: AI1 ;A_TAG
117
Scan Time :: 5
; A_SCANT
Table 8-2: Block Type Abbreviations Block Type Analog Alarm Analog Input Analog Output Analog Register Boolean Calculation Dead Time Device Control Digital Alarm Digital Input Digital Output Digital Register Event Action Extended Trend Fanout Histogram Lead Lag Multistate Digital Input On-Off Control Pareto Abbreviation AA AI AO AR BL CA DT DC DA DI DO DR EV ETR FN HS LL MDI BB PA
118
Table 8-2: Block Type Abbreviations (continued) Block Type PID Program Ramp Ratio/Bias Signal Select SQL Data SQL Trigger Statistical Control Statistical Data Text Timer Totalizer Trend Abbreviation PID PG RM RB SS SQD SQT SC SD TX TM TT TR
Importing Databases
Using Database Manager, you can import any database into memory. Importing a database merges it with the database currently in memory. NOTE: Before you import a database, stop any I/O drivers or OPC servers you may have running. Typically, you import a database when you want to: Change the scanning order of the blocks in the database. Combine two databases.
Chapter 8. Managing Databases
119
You can change the scanning order of a databases blocks by: [1] Exporting a database. For more information about exporting a database, refer to the section Exporting Databases. Changing the order in which the blocks are listed in the export file. For more information on a databases scanning order, refer to the section Changing a Databases Scanning Order. Clicking the New button from Database Managers toolbar. Importing the edited export file.
[2]
[3] [4]
This process ensures that only the original database resides in memory when Database Manager imports your database. You can combine two process databases by using a similar method: [1] [2] Export each database. Examine each export file. Verify that each block in each database has a unique name. If two blocks have the same name, change one. Remember to also change the text in the Next field of the previous block so that the chain remains intact. Into an empty database, import one of the databases you want to merge. Import the other database.
[3] [4]
Import errors encountered by Database Manager are stored in the file IMPORT.ERR. This file resides in the Database path.
120
9. Advanced Topics
After you put a database into production, you may find that SAC scans certain blocks in an order you did not intend. This chapter explains how you can fine-tune your database and change the scanning order. This chapter also describes how to customize Database Managers toolbar and Tools menu. Customizing the toolbar lets you select only the toolbar buttons you require. Customizing the Tools menu lets you add menu items that launch other applications from Database Manager. Refer to sections Customizing the Toolbar and Customizing the Tools Menu for more information on these features.
AI3
AI2
AI1
CA1
AO1
Figure 9-1: Sample Calculation Chain Also assume that by default SAC scans AI1 first, AI2 second, and AI3 third. Because SAC scans AI1 first, it processes the entire chain, computing the value of the Calculation block, before it scans AI2 and AI3. If either of these values change during the current scan cycle, the Calculation does not receive them until AI1 is processed again.
121
Changing the scanning order addresses this potential problem. By scanning AI1 last, you ensure SAC has updated values for both AI2 and AI3 prior to computing the value of the Calculation block. You can also phase the blocks so that SAC scans AI1 last. To learn more about phasing, refer to the section Phasing.
[2]
122
[m] [n]
NOTE: Analog Register and Digital Register blocks do not require SAC processing. Instead, iFIX processes them only when an operator opens a picture containing a link to either block or when a script that references either block runs. When either event happens, iFIX processes the blocks before the Ramp block. [3] When SAC scans a primary block, it: [a] [b] [4] Processes that blocks entire chain. Scans the next primary block.
SAC scans primary blocks of the same type, scan time, and phase in the order these blocks occur in the database, as the following example shows.
Example: Understanding a Databases Scanning Order Suppose you create the five identical Analog Input blocks, shown in the following figure. SAC scans these blocks in the order shown.
AI1
AI2
AI3
AI4
AI5
Scanning Order
Figure 9-2: Blocks Assigned to a Scan Sequence Now, assume you delete the third Analog Input block because you no longer need it. This creates an empty space in the database, as the following figure shows. SAC now scans the blocks as shown.
123
AI1
AI2
AI3
AI4
AI5
Scanning Order
Figure 9-3: Blocks Deleted from a Scan Sequence You subsequently discover you need to add two new Analog Input blocks, AI6 and AI3. The first new block, AI6, fills in the space left by deleting a block. The second new block, AI3, is added after AI5. SAC now scans the blocks in the order shown by the following figure.
AI1
AI2
AI4
AI5
Scanning Order
124
For more information about completing these tasks, refer to the sections Exporting Databases and Importing Databases.
Once you specify this information, Database Manager creates the menu item and saves it as part of its default configuration. You can subsequently select the menu item to launch the associated application.
125
126
Index
A
adding blocks to the process database 82 multiple blocks to the process database alarm area database setting up on each server 9 alarms described 6 allocated blocks 115 archiving process data 7 Auto Refresh option database spreadsheet 95 automatic mode described 52 function by block type 54 83 batch 37 configuring 4 control 36 copying 11 copying and pasting 87 Database Dynamos 38 deleting 90 described 3 displaying information 90 duplicating 86 exception-based processing 44 function 3 how processed by SAC 5 importing 11 in the database spreadsheet 10 matching process steps to block types 21 modifying 89 moving 88 off scan 56 on scan 56 one shot processing 47 optional 31 pasting into Excel 87 pattern type syntax 85 phasing 48 planning your automation strategy 30 primary 31, 33 reaction to on/off scan changes 58 saving 91 scan order 121 scan times 41 scan times for large databases 29 secondary 31, 35 sort order in database spreadsheet 108 SQL 38 Statistical Process Control (SPC) 37 summary 39 time-based processing 42 types and descriptions 31
Index
B
batch blocks 37 block fields block name 40 described 40 formats 40 locating 41 naming convention 40 block modes described 52 function by block type 54 block types abbreviations 118 blocks adding 82 adding multiple 83 adding to Database Manager allocating memory 115
127
C
chains adjusting the design 24 described 4 designing 16 drawing a flowchart 24 how processed by SAC 5 maximum size 5 scanning order 121 understanding the design 28 writing an automation algorithm 21 closing the process database 81 collecting process information 15 color changing in a database spreadsheet 96 columns adding in a spreadsheet 98 creating a non-scrolling 96 modifying in a spreadsheet 98 removing from a spreadsheet 98 configuration errors checking the database for 111 correcting 113 resolving 112 configuring blocks 4 control blocks 36 copying and pasting blocks in the process database 1, 87 creating process database 13, 81 CSV block data format conversion 11 Editing an export file 117 exporting process database to 115 customizing Database Manager toolbars 125 Database Manager Tools menu 125 database spreadsheet 96
D
database changing the scanning order correcting errors 113 designing 15 displaying a summary 114 editing an export file 116 exporting 115 121
importing 119 order of solve 124 reloading 113 reloading from a Visual Batch script 113 scanning order 122 verifying 111 Database Dynamos 39 function 38 toolkit 38 Database Manager adding blocks 3 adjusting the chain design 24 block types 31 building large databases 29 configuring blocks 4 customizing a spreadsheet 96 customizing the Tools menu 125 described 1 designing a chain 16 designing an automation strategy 20 displaying a database summary 114 drawing a flowchart for the chain 24 exchanging data 11 exiting 9 gathering process information 15 matching process steps to block types 21 pausing a spreadsheet 95 queries 101 replacing data in a spreadsheet 94 right mouse menu 10 saving databases from a script or Program block 91 saving large databases 30, 91 saving spreadsheet layouts 99 searching a spreadsheet 93 setting preferences 12 sort orders 108 starting 9 toolbar 11 understanding chain designs 28 updating a spreadsheet 95 using Go To in a spreadsheet 95 working with analog and digital blocks 30 writing an automation algorithm 21 database spreadsheet coloring 96 commands 10 creating a non-scrolling column 96 customizing 96 defining the layout 98 editing 10 loading layouts 99 overriding the default layouts 99 pausing 95
128
properties 10 replacing data 94 restoring the default layouts 100 saving layouts 99 searching 93 updating 95 using Go To 95 using in Database Manager 10 deleting blocks from the process database 90 designing chains 16, 24, 28 process database 15 displaying any row in a spreadsheet 95 block information from the process database blocks in a database spreadsheet 95 columns in a database spreadsheet 95 database summary 114 rows in a database spreadsheet 95 duplicating blocks in the process database 86
115
F
freezing columns in a spreadsheet 96
G
GDB editing an export file 117 exporting process database to 115 Generate Wizard adding blocks 82 adding multiple blocks 83 automatic block name assignment 83 customizing block fields 83 entering patterns 85 Go To using in a spreadsheet 95
90
E
editing database spreadsheet 10 EGU limit formats 78 precision and range 77 errors correcting verification 113 example Enviro company overview 8 Excel converting block data 11 pasting blocks into 87 exception-based processing Analog Alarm block considerations 47 Boolean block considerations 46 Calculation block considerations 46 Dead Time block considerations 47 Digital Alarm block considerations 47 Event Action block considerations 46 Lead Lag considerations 47 PID considerations 47 Program block considerations 45 Signal Select block considerations 46 Statistical Data block considerations 45 understanding 44 export file editing 116 exporting process data to 115 historical trends function 6
I
I/O data and the database 2 how processed by SAC 5 I/O drivers defining an OPC server 75 described 59 signal conditioning 75 SIM driver 61 SM2 driver 67 iFIX installing 9 importing a process database 119 importing blocks 11
L
layout defining in a database spreadsheet 98 loadable blocks (see Database Dynamos) 38 loading queries 107 spreadsheet layouts 99
Index
129
96
M
manual mode described 52 function by block type 54 memory allocating for blocks 115 building large databases 29 saving databases from a script or Program block 91 saving large databases 30, 91 modifying blocks in the process database 89 moving blocks to the process database 88
N
non-scrolling column creating in a spreadsheet 96
O
objects Database Dynamo 38 off scan blocks 56 on scan blocks 56 one shot processing 47 OPC server 75 opening the process database optional blocks list 31 order of solve changing 124 overphasing blocks 51 overriding default query 107 default spreadsheet layout
81
99
P
pasting blocks into Excel 87 pattern types syntax 85 pausing a spreadsheet 95 PAUT mode example 56 function 55 understanding 55
phasing assigning 50 second and subsecond blocks 50 what it does 48 planning block scan times 29 designing the process database 15 gathering process information 15 PMAN mode example 55 function 55 precision EGU limits 77 preferences Database Manager 12 primary blocks described 31 function 33 scan times 41 standard 33 summary 39 process analyzing 19 process data archiving 7 trending 6 process database adding blocks 82 adding multiple blocks 83 adjusting the chain design 24 basic operations 81 before you begin creating 9 building large databases 29 changing the scanning order 121 closing 81 copying and pasting blocks 87 creating 13, 81 customizing a spreadsheet 96 deleting blocks 90 described 1 describing 18 designing 15 designing a chain 16 designing an automation strategy 20 displaying a summary 114 displaying block information 90 drawing a flowchart for the chain 24 duplicating blocks 86 editing an export file 116 example 8 exporting 115 functions 2 gathering process information 15 importing 119 matching process steps to block types
21
130
modifying blocks 89 moving blocks 88 opening 81 order of solve 124 overriding the default spreadsheet layout 99 pausing a spreadsheet 95 reloading 113 reloading from a Visual Batch script 113 replacing data in a spreadsheet 94 restoring the default spreadsheet layout 100 sample application 15 saving blocks 91 saving databases from a script or Program block 91 saving large databases 30, 91 saving spreadsheet layouts 99 scanning order 122 searching a spreadsheet 93 understanding chain designs 28 updating a spreadsheet 95 using 6 using Go to in a spreadsheet 95 using the database spreadsheet 10 verifying 111 working with analog and digital blocks 30 writing an automation algorithm 21 processing large databases 29
R
range EGU limits 77 refreshing the screen database spreadsheet 95 relational database functions 7 reloading database from a Visual Basic script 113 process database 113 replacing data in a database spreadsheet 94 restoring default spreadsheet layout 100 preset default query 107 right mouse menu 10
S
SAC block phasing 48 changing the database scanning order 121 exception-based processing 44 function 5 one shot processing 47 processing I/O data 5 time-based processing 42 saving blocks to the process database 91 databases from a script or Program block 91 large databases 30, 91 queries 107 spreadsheet layouts 99 SCADA servers establishing a connection from Database Manager 81 loading process database from 113 monitoring and reporting functions 6 trending and display capabilities 6 scan time assigning 43, 47 block reaction to on/off scan changes 58 described 41 examples 43 exception-based 44 one shot 47 time-based 42 scanning order changing in the database 121 described 122 example 123
Q
queries appending 105 boolean operators 103 case sensitivity 102 described 101 editing 105 expanding 106 grouping 105 loading 107 overriding the default 107 refining 106 relational operator examples 105 relational operators 101 restoring the preset default 107 saving 107 syntax 101 wildcard examples 104 wildcards 104
Index
131
Scheduler adjusting database values using 7 functions 7 SCU configuring each server 9 searching a database spreadsheet 93 secondary blocks described 31 function 35 standard 35 summary 39 sharing blocks among process databases 87 signal conditioning 75 SIM driver analog values 62 described 61, 67 digital values 62 generating random values 64 signal generation registers 64 using 61 SM2 driver accessing 67 C API 68 generating bad data 68 sort order adding a column 108 arranging columns 108 changing the default 109 described 108 loading 109 removing a column 108 saving 109 sorting columns in database spreadsheet 108 disabling in database spreadsheet 108 SQL blocks 38 standard blocks summary 39 Statistical Process Control (SPC) blocks 37 syntax database query 101
T
time 47 time-based processing assigning a scan time 43 examples 43 understanding 42 toolbar customizing Database Manager 125 Database Manager 11 Toolkit Database Dynamo 38 Tools menu customizing in Database Manager 125 trending historical values 6 process data 6
U
unfreezing columns in a spreadsheet 96 unlocking columns in a spreadsheet 96 updating a spreadsheet 95 used blocks 115 using the process database 6
V
VBA adjusting database values using 7 functions 7 reloading a database from a script 113 verification messages list 112 resolving 112 verifying a process database 111
W
WorkSpace reloading a database from 113 using to provide visual cues for alarms writing an automation algorithm 21 6
132