Building A SCADA System 4.5
Building A SCADA System 4.5
TM
Version 4.5
September 2007
All rights reserved. No part of this publication may be reproduced in any form or by any electronic or mechanical means, including
photocopying and recording, without permission in writing from GE Fanuc Automation.
Notice
GE Fanuc Automation reserves the right to make improvements to the products described in this publication at any time and without
notice.
2007 GE Fanuc Automation. All rights reserved. Microsoft is a registered trademark of Microsoft Corporation. Any other
trademarks herein are used solely for purposes of identifying compatibility with the products of GE Fanuc Automation.
We want to hear from you. If you have comments, questions, or suggestions about our documentation, send them to the following
email address:
[email protected]
Table Of Contents
About This Guide ..............................................................................................................................1
Introduction .......................................................................................................................................1
Understanding a Database...........................................................................................................2
Understanding Database Blocks ..............................................................................................2
Understanding Chains ..............................................................................................................3
Processing the Database .........................................................................................................3
Using the Process Database ........................................................................................................4
Trending Process Data .............................................................................................................4
Creating Scripts and Schedules with Process Data .................................................................5
Archiving Process Data ............................................................................................................5
Sample Application .......................................................................................................................5
Getting Started..................................................................................................................................7
Starting and Stopping Database Manager ...................................................................................7
Using the Database Spreadsheet.................................................................................................7
Understanding Spreadsheet Properties ...................................................................................8
Working with the Pop-up Menu ................................................................................................8
Editing the Spreadsheet ...........................................................................................................8
Working with the Database Manager Toolbar ..............................................................................9
Setting Database Manager Preferences ......................................................................................9
Creating a Process Database: Overview ...................................................................................10
Implementing a Process Database.................................................................................................11
Sample Process Application.......................................................................................................11
Designing a Chain ......................................................................................................................12
Describing the Sample Process Application...........................................................................12
Analyzing the Sample Process...............................................................................................13
Designing an Automation Strategy for the Sample Process ..................................................14
Writing an Automation Algorithm for the Sample Process .....................................................14
Matching Process Steps to Block Types ................................................................................15
Drawing a Flowchart for the Sample Chain ............................................................................17
Understanding Chain Designs....................................................................................................20
Building Large Databases ..........................................................................................................20
Saving Large Databases ........................................................................................................21
Working with Analog and Digital Blocks .....................................................................................21
Working with Database Blocks .......................................................................................................23
iii
Building A SCADA System
iv
Table Of Contents
v
Building A SCADA System
Managing Databases......................................................................................................................89
Verifying Databases ...................................................................................................................89
Correcting Errors ....................................................................................................................90
Reloading Databases .................................................................................................................90
Reloading a Database from a Visual Basic Script..................................................................91
Displaying a Database Summary ...............................................................................................91
Exporting Databases ..................................................................................................................92
Exporting a Database from the Command Line .....................................................................93
Editing the Export File.............................................................................................................94
Importing Databases ..................................................................................................................97
Advanced Topics ............................................................................................................................99
Changing a Database's Scanning Order ....................................................................................99
Understanding a Database's Scanning Order ........................................................................99
Changing the Order of Solve ................................................................................................101
Customizing the Toolbar...........................................................................................................101
Customizing the Tools Menu ....................................................................................................102
Index .............................................................................................................................................103
vi
About This Guide
Building a SCADA System is intended for process engineers responsible for designing and building a
process database. This manual shows engineers how to create, modify, and delete blocks and chains. It
also teaches the skills engineers need to sort, query, and optimize iFIX® databases.
Reference Documents
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.
1
Building A SCADA System
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.
2
Introduction
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.
3
Building A SCADA System
The following figure shows SAC reading process values, sending these values through database
chains, and returning the output values.
4
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 company's manufacturing process encompasses:
Continuous control
Batch control
Discrete parts
5
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, follow the steps.
To get started:
7
Building A SCADA System
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.
8
Getting Started
Saving Save the current spreadsheet settings or the process database when you exit Database
preferences Manager.
Editing Open block dialog boxes in view or modify mode when you double-click a cell in the
preferences 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.
9
Building A SCADA System
10
Implementing a Process Database
Implementing a SCADA strategy requires you to collect the following information:
Flowcharts of your processes.
A list of I/O driver or OPC server addresses.
Your alarm requirements.
The type of signal conditioning and the range of values that your process hardware can
measure. The range of values is called the EGU range.
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.
11
Building A SCADA System
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:
To design a chain:
1. Analyze your process and make a record of the data you need, including:
I/O addresses of the device controller (a wiring list)
Device types
Signal conditioning
The EGU range
2. 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.
4. Match the steps in your algorithm to blocks capable of performing these steps.
5. Draw a flowchart listing the block types that perform each step along with the specific
processing instructions for each block.
The example presented in the following subsections illustrates the thought process involved in
designing a simple chain.
Describing the Sample Process Application
Analyzing the Sample Process
Designing an Automation Strategy for the Sample Process
Writing an Automation Algorithm for the Sample Process
Matching Process Steps to Block Types
Drawing a Flowchart for the Sample Chain
12
Implementing a Process Database
pH Adjustment Tank
The next step is to design a chain that examines and adjusts the sludge's 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.
13
Building A SCADA System
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.
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.
14
Implementing a Process Database
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.
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 sensor's address.
15
Building A SCADA System
2. The Analog Input block can also accommodate the alarming requirements, so this task is
assigned to this block.
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.
The digital outputs are sent directly to the acid and alkali pump addresses. The On-Off
Control block can perform this function.
Since the On-Off Control block can turn the pumps on and off without the use of any other
block, this completes step 3.
At this point you've identified the blocks that can perform all the steps in your algorithm.
16
Implementing a Process Database
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.
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.
Sample pH Problem
17
Building A SCADA System
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 chain's 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. The following 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.
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.
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.
18
Implementing a Process Database
Modified Flowchart
With this modification and with the Analog Input block's 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.
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.
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.
19
Building A SCADA System
Adding other blocks, such as the Statistical Data block, allows you to display statistical data in a graph.
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.
20
Implementing a Process Database
If your I/O driver or OPC server supports structured data types (Timers, Counters, etc.), these
data types only support an offset of 0 for Analog and Digital registers.
21
Working with Database Blocks
Your main task when setting up a SCADA server is creating blocks for your process database. In
general, you can create a block by completing its dialog box. However, in order to configure a block,
you should understand the basic database concepts, such as scan times and phasing. This chapter
discusses these and other database concepts.
Block Types and Descriptions
Block Fields
Scan Times
Phasing
Block Modes
Placing Blocks On and Off Scan
I/O Drivers
Understanding Signal Conditioning
Database Options
The following table summarizes the differences among all the blocks. For detailed information on
23
Building A SCADA System
Block Summary
Boolean (BL) x x
Calculation (CA) x x
Fanout (FN) x x
24
Working with Database Blocks
Text (TX) x x
Timer (TM) x x
Totalizer (TT) x x
Trend (TR) x x
25
Building A SCADA System
Analog Alarm Provides read/write access to analog data and lets you set and acknowledge
(AA) alarms.
Analog Input (AI) Provides read/write access to analog data and lets you set alarm limits.
Analog Output Sends analog data to an I/O driver or OPC server when the upstream block,
(AO) an operator, a Program block, a script, or an Easy Database Access (EDA)
program supplies a value.
Analog Register Provides read/write access to analog data only when a Data link connected to
(AR) the block appears on an operator display.
Digital Alarm Provides read/write access to digital data and lets you set and acknowledge
(DA) alarms.
Digital Input (DI) Provides read/write access to digital data and lets you set alarm limits.
Digital Output Sends digital data to an I/O driver or OPC server when the upstream block,
(DO) an operator, a Program block, a script, or an Easy Database Access (EDA)
program supplies a value.
Digital Register Provides read/write access to digital data only when a Data link connected to
(DR) the block appears on an operator display.
Multistate Digital Retrieves digital data for up to 3 inputs from an I/O driver or OPC server,
Input (MDI) combines the inputs into one raw value, and lets you set alarm limits.
Text (TX) Lets you read and write a device's text information.
26
Working with Database 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.
Calculation Performs mathematical calculations using values from the upstream block and
(CA) up to seven other constants or block values.
Event Action Monitors values or alarm conditions of the upstream block and performs actions
(EV) based on the upstream block's output.
Extended Allows you to collect up to 600 real-time values from an upstream block. You
Trend (ETR) can display these values as a graph by adding charts to your pictures.
Fanout (FN) Sends the value it receives from its upstream block to up to four additional
blocks.
Signal Select Samples up to six inputs, manipulating the inputs according to a user-selected
(SS) mode, and outputs a value to the next block.
Totalizer (TT) 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.
Trend (TR) 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.
27
Building A SCADA System
Control Blocks
The Function:
block...
Dead Time Delays the transfer of an input value to the next block in the chain for up to 255
(DT) seconds. It can store up to 60 values of incoming variables and sends values on a
first in/first out basis.
Lead Lag Lets you simulate process dynamics and includes a digital approximation of the
(LL) exponential equations for lead lag. This block is useful in feed-forward strategies.
PID (PID) Compares analog inputs to a user-defined set point and sends out incremental
adjustments to bring the process variable closer to the set point.
Ramp (RM) Increases or decreases values to a target value at a specified rate. You can enter
the target values manually or they can be retrieved from other blocks. You can
define three distinct stages for the ramp process.
Ratio/Bias Lets you change incoming signals by adding a constant (bias) and/or by
(RB) multiplying a constant (ratio) after subtracting an offset from the signal. This
block uses less memory and executes faster than the Calculation block.
28
Working with Database Blocks
Pareto (PA) Accepts, calculates, and sorts the frequency of up to eight input values. You can
display these values in an operator display with filled rectangles to create a bar
chart.
Statistical Adjusts a process variable based on calculations of the average offset and the
Control (SC) rate of deviation from a target value, XBARBAR. This block is activated if an
alarm is generated by a Statistical Data block.
Statistical Data Observes data from operator input or other blocks and performs statistical
(SD) calculations. This block allows for alarming based on standard SPC techniques.
Batch Blocks
Device Control Coordinates the opening and closing of digital devices based upon user-
(DC) defined conditions.
Program (PG) Runs short programs for batch operations or to increase the degree of
automation in an application.
SQL Blocks
SQL Data Identifies the data to send and retrieve between the process database and your
(SQD) relational database.
SQL Trigger Triggers the execution of SQL commands and defines how your relational
(SQT) database interacts with the process database.
29
Building A SCADA System
For more information about how these blocks work and how to use them, refer to the Using SQL
manual and the iFIX Database Reference.
Analog Input with Essentially the same as an Analog Input block, but will also calculate a
Freeform Scaling slope for EGU limit values when signal conditioning does not apply.
(AIS)
16 Bit Digital Status Monitors up to 16 bits in a digital register, and enables or disables 16
(D16) independent messages.
Group Alarm (GAB) Organizes and consolidates the display of alarm information within a
large system.
30
Working with Database Blocks
Interval Timer (ITM) Provides a way to time intervals (normally a digital input). It also
includes a GATE input that can be used to disable the timing without
having to place the chain off scan.
Momentary Digital Sends a brief pulse to a digital output (for example, to start a motor).
Output (MDO)
Improved PID (PI2) Essentially the same functionality as the PID block, with more options.
Text Register (TXR) Monitors devices where the raw data is an ASCII string. Similar to the
Text block (TX), but not scanned.
Text Lookup Block Monitors a status or command register in a PLC. Allows the operator to
(TXT) see and enter meaningful strings.
These Database Dynamos are updated regularly to comply with updates to iFIX.
For more description, or to download the Database Dynamos provided by GE Fanuc, visit the GE
Fanuc GlobalCare web site at http://support.gefanuc.com/.
31
Building A SCADA System
A Database Dynamo block is an optional block that provides additional functionality to an iFIX
database. When configured, it appears in the Proficy iFIX Database Manager block listing and can be
used in any database.
NOTE: In a networked iFIX system, the Database Dynamo Blocks must be installed and configured on
all nodes. Be aware that after you add or remove blocks, you must save your configuration to modify
or update the FIX.INI file.
The database contains approximately 100 slots into which Database Dynamo blocks can be added.
These slots are numbered from 50 to 149. Slots 1 to 49 are reserved for GE Fanuc database blocks.
The Database Dynamo Configuration Utility generates a default slot for the Database Dynamo that you
are adding to the database. Use this slot. If you must change the Database Dynamo slot, select the
Dynamo in the configured column and enter a new value for the slot in the Slot field.
NOTE: Once a slot is selected, it should never be changed. If you must change the slot, export the
database to an ASCII file first. Change the slot of the block. Delete the database and import the ASCII
file into a new database.
Use the following commands and buttons to manage Database Dynamo blocks:
Save – saves the current configuration. Select Save from the File menu or select the Toolbar
Save button. The FIX.INI does not get modified or updated until you save the configuration.
NOTE: If the Database Dynamo Configuration Utility (BTKCFG.exe) detects that the FIX.INI
file is locked when user clicks on OK to save, then the BTKCFG program will warn you and
then will save the modified FIX.INI file as FIXINI.SAV instead.
Exit – exits the Database Dynamo Configuration Utility. Select Exit from the File menu.
Help – provides access to Database Dynamo online documentation (this help system).
The Database Dynamo Configuration Utility contains the following columns and buttons:
Available Column – lists the Database Dynamo blocks that are available on your hard drive.
Configured Column – lists the Database Dynamo blocks that are configured in your iFIX
system. These block types are available in the Database Manager.
Add button – allows you to add some or all of the Database Dynamo blocks to your iFIX
system. To add a Database Dynamo to the Configured list, select the Dynamo in the Available
column and click the Add button.
NOTE: After you add or remove blocks, you must save your configuration to modify or update
the FIX.INI file.
32
Working with Database Blocks
Remove button – allows you to remove one or all of the Database Dynamo blocks from the
Configured list. To remove a Database Dynamo, select the Dynamo in the Configured list and
click the Remove button. Note that removing a Dynamo from your iFIX configuration does
not remove it from the hard drive.
NOTE: If you need to remove a Database Dynamo, delete all blocks of that type from the
process database and use the Database Dynamo Configuration Utility (BKTCFG.exe) to
remove the block and update the FIX.INI.
The Database Dynamo Configuration Utility (BTKCFG) supports the following command-line
parameters:
/ABTK_NAME – This command line parameter allows you to add a loadable block to the
system without actually running the configuration program. In this command line, replace
NAME with the actual block name. There must be no space(s) between /A and the loadable
block name.
/NXXX – This command line parameter allows you to determine the slot number when used
with the /ABTK_NAME command. Replace XXX with the slot number. There must be no
space(s) between /N and the slot number. Refer to the Understanding Slot Numbers section
for more information.
NOTE: If you do not specify a slot number with the /N command line, you will get the next
available slot.
Example
NOTE: If the block has already been configured, it should NOT be configured again.
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 block's 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 block's 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:
33
Building A SCADA System
Field Formats
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
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.
34
Working with Database Blocks
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 block's scan time.
SAC can process a chain using one of the following methods:
Time-based processing
Exception-based processing
One shot processing
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.
1 to 60 seconds 1 second
1 to 60 minutes 1 minute
1 to 24 hours 1 hour
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 computer's start up time, as the following tables describes.
35
Building A SCADA System
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.
Unit Entry
Minutes M
Hours H
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.
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.
36
Working with Database Blocks
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.
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:
Fanout Timer
Histogram Totalizer
Typically, the blocks listed in the following table are used as stand-alone blocks and have limitations
when incorporated in an exception-based chain.
When you add the block... In an exception-based chain, do not use the...
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 block's 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.
37
Building A SCADA System
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.
PID, Lead Lag, and Dead Time blocks use the local computer's system time to define a time constant.
For this reason, GE Fanuc recommends not using them in exception-based chains.
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
iFIX WorkSpace. If an operator acknowledges the alarm with the Remote Acknowledge field, SAC
does not process the block.
You can assign an exception-based scan time to a block by selecting Process by Exception from the
block's 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.
38
Working with Database Blocks
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.
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:
39
Building A SCADA System
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.
Normally, when you specify a phase for a block with a second or subsecond scan time, SAC offsets the
block's 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.
40
Working with Database Blocks
same unit or one unit lower than the scan time unit, as the following table describes.
Hours Hours:Minutes
Minutes Minutes:Seconds
Seconds Seconds
Subseconds Subseconds
For example, if the scan time is 5 minutes, you enter a phase of 1 minute and 30 seconds as follows:
1:30
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 the Exception-Based Chain Processing figure.
In this chain, AI2 and AI3 have 5-second scan times. AI1 is overphased with a 5-second 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.
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.
41
Building A SCADA System
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:
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 exception-based 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.
The exact function of certain blocks depends on their mode, as the following table describes.
42
Working with Database Blocks
Analog Reads and writes data every Receives data from operators entering values,
Input scan cycle. scripts, Program blocks, recipes, or Easy
Database Access (EDA) programs, but does not
output values.
Device Executes all statements Suspends execution until the block is placed in
Control without interruption. Automatic mode.
Digital Reads and writes data every Receives data from operators entering values,
Input scan cycle. scripts, Program blocks, recipes, or EDA
programs, but does not output values.
PID Performs PID adjustments. Suspends automatic PID outputs. This allows you
Set points can be changed to change the output from the block. Block
through a Data link in this values, such as the set point and tuning
mode. parameters, can be changed from the keyboard.
Program Executes all statements Suspends execution of its statements until the
without interruption. block is placed in Automatic mode. When the
block is switched back to Automatic mode, it
continues from where it stopped.
Statistical Performs online statistical Suspends online data observations. Used for off-
Data process control on incoming line statistical process control.
data from other blocks.
43
Building A SCADA System
For blocks with short scan times, the next scan time occurs relative to the manual entry. For example,
suppose SAC scans the block AI1 at 1:15:30. This block has a 30-second scan time and a 5-second
phase. If an operator puts AI1 into Manual mode and enters a value at 1:15:45, SAC scans the block
immediately and resets AI1's next scan to 1:16:15 and every 30 seconds thereafter. If the operator
subsequently enters another value at 1:15:50, SAC scans AI1 again and reset AI1's next scan to
1:16:20 and every 30 seconds thereafter.
For blocks with scan times of a minute or longer, 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 placed the
block into Manual mode and enters a value at 15 minutes past the hour, SAC scans AI2 immediately
and on the half hour.
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 30-second scan time. If an operator
changes the block's mode to Automatic, SAC:
1. Puts the block into PAUT mode.
2. 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. Puts AI2 into PAUT mode.
2. Scans the block again on the half hour, placing it into Automatic mode.
44
Working with Database Blocks
Statements in Program blocks, Event Action blocks, or an EDA program place a chain's
primary block off scan.
You connect the blocks in a chain incorrectly and SAC cannot scan the chain. Use Database
Manager's 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.
Placing a primary block off scan turns that block's entire chain off scan. You can put the chain back on
scan by:
Opening an operator display, selecting an object connected to the chain's 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 iFIX 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.
45
Building A SCADA System
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. GE Fanuc sells drivers for many
types of hardware. Contact your GE Fanuc Sales Representative or visit the GE Fanuc web site at
http://www.gefanuc.com for a list of available drivers.
After 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.
iFIX supplies an OPC Client I/O driver, as well as two simulation drivers.
The OPC Client driver provides the interface and communications protocol between OLE for Process
Control servers and iFIX.
The OPC Client driver supports the following features:
Analog register and digital register database blocks
Special addressing for analog output and digital output blocks
Text blocks
Item property I/O addresses for text blocks
Block writes
Data arrays
Exception-based processing
Latched data
Simulation Drivers
You can use the SIM and SM2 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.
46
Working with Database Blocks
Provides three independent sets of registers. Provides one set of registers shared by both
Analog blocks automatically access the analog, digital, and text blocks.
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 Changing an analog register in the SIM driver
change the same register in the other set. modifies the register for analog, digital, and text
For example, if you change the value of the reads. For example, if you change the value of the
analog register 1000, the value of the digital analog register 1000, you also modify the value of
register 1000 is unchanged. the same digital register.
Provides 20,000 analog, 20,000 16-bit Provides 2000 analog and digital registers, a total
digital registers, and 20,000 text registers. of 32,000 bits.
Stores analog values in 4-byte (32-bit) Stores analog values in 16-bit integer registers,
floating point registers, numbered 0 to numbered 0 to 2000. Incoming 32-bit values are
19999. Incoming values are not scaled. scaled to 16-bit values (0 - 65535).
Digital values are stored in 16-bit integer Digital values are stored in 16-bit integer registers,
registers, numbered 0 to 19999. numbered 0 to 2000.
Text values are stored in 8-bit registers Text values are stored in the same area as analog
numbered 0 to 19999. Each register holds and digital values, numbered 0 to 2000.
one text character for a total of 20,000 bytes
of text.
Supplies a C API that allows applications to Does not support a C API for accessing SIM
access SM2 analog, digital, and text values. values.
47
Building A SCADA System
Supports latched data for Analog Input, Does not support latched data.
Analog Alarm, Digital Input, Digital Alarm
and Text blocks when a simulated
communication error is enabled.
Can read and write the individual alarm Cannot read and write the individual alarm status
status of each SM2 register. of any SIM register.
Does not provide alarm counters. 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.
1. In the Database Manager, in the Driver field for the primary block, select OPC - OPC Client
vx.xx from the list.
2. Click the Browse button next to the I/O Address field. The Browse I/O Address dialog box
appears.
3. Select an I/O point from an available server and group, and then click OK to exit the dialog
box. The I/O Address field will display the following:
Server;Group;ItemID[;AccessPath]
When you click out of the I/O Address field, ;No Access Path will be appended to the existing
text, like this:
Server;Group;ItemID;NoAccessPath
4. If applicable, from the Signal Conditioning list, select a format for mapping the values
coming from your process hardware.
5. If applicable, from the Hardware Options list, select a device control addressing format for the
database block. This selection is overridden if you select a datatype from the Requested
Datatype list on the Item Configuration page of the OPC Client I/O driver Power Tool.
For detailed information, refer to the OPC Client Driver online help.
48
Working with Database Blocks
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.
0:0
50:2
63:15
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.
When the Analog Value is... The Bits for Digital Values are...
49
Building A SCADA System
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).
To help you test your database with simulated input, the SIM driver provides a set of registers that
generate a repeating pattern of random and predefined values. For example, you could ramp a value to
simulate the performance of specific chains or you might generate a series of random numbers to test
the entire database.
50
Working with Database Blocks
Example
To ramp a value with the RA register, enter the following text in the I/O Address field:
RA
RA Ramp a value from 0 to 100% of the EGU range at a rate Read only
controlled by the RY register.
RB Count from 0 to 65535 at a rate of twenty counts per second. Read only
RC Shift one bit through a 16-bit word at a rate controlled by the RZ Read only
register.
RD Generate a sine wave from 0 to 100% of the EGU range at a rate Read only
controlled by the RY register.
RE Generate a sine wave from 0 to 100% of the EGU range at a rate Read only
controlled by the RY register. The sine wave is delayed 90
degrees relative to the RD register.
RF Generate a sine wave from 0 to 100% of the EGU range at a rate Read only
controlled by the RY register. The sine wave is delayed 180
degrees relative to the RD register.
RG Generate random values between 25% and 75% of the EGU Read only
range.
RH Ramp up a value to 100% of the EGU range and then ramp it Read only
down to 0% again at a rate controlled by the RJ register.
RI Control the ramp direction of the value in the RH register. When Numeric
zero, register RH ramps down; when one, RH ramps up. The Value (0 or
value automatically changes when RH reaches 0 or 100% of its 1)
EGU value.
RJ Control the ramp speed (in cycles per hour) for the value in Numeric
register RH. The default value is 60 (1 cycle per minute). Value (2 to
3600)
51
Building A SCADA System
RY Control the speed (in cycles per hour) at which new values are Numeric
generated for registers RA, RD, RE, and RF. By default, the RY Value (2 to
register is set to 60 (1 cycle per minute). 3600)
RZ Control the speed (in bits per minute) that the register RC Numeric
changes its value. By default, the RZ register is set to 180 (3 bit Value (2 to
shifts per second). 1200)
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.
Analog Register RA, RD, RE, RF, RF, RH, RI, RJ, RK, RX, RY, and RZ
NOTE: The RB and RC registers support Digital Register offsets of A_0 to A_15.
52
Working with Database Blocks
You have more test data than the SIM driver can hold.
You want to determine how the database responds to 32-bit values.
You need to access the driver from a C program.
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.
The SM2 driver provides an S register to simulate a communication error. Using this register, all
analog and digital reads return an error as if communication to the process hardware has been lost.
To use this feature, set the S register to 1.
NOTE: The SM2 driver latches data when a simulated communication error is enabled.
You can access SM2 analog, digital, and text values through the C API that the driver supplies. The
file SM2API.H describes the API and the functions reside in the file SM2API.LIB. You can link this
library file to your C application to access the API's functions. You can find both files in your Base
53
Building A SCADA System
path. By default, this path is C:\Program Files\GE Fanuc\Proficy iFIX\ or C:\IFIX\, depending where
you installed iFIX.
NOTE: You must have the iFIX Integration (EDA) Toolkit installed to use this API.
Example
Suppose you are using the SM2 driver to store data from a legacy system. Using the C API and a
number of preconfigured analog blocks, you can extract your data from the legacy system and store it
in your process database.
C API Functions
UINT16 GetAnalog(UINT16 GetAnalog reads an analog value (32-bit float) to the register
index, FLOAT *data); indicated by 'index'.
FE_OK is returned if the operation succeeds.
FE_IO_ADDR is returned if the register index is out of range.
FE_RANGE is returned if the analog value exceeds the range of
a 32-bit float.
NOTE: GetAnalog and GetDouble access the same table in the
SM2.
UINT16 SetAnalog(UINT16 SetAnalog writes an analog value (32-bit float) to the register
index, FLOAT data); 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.
NOTE: SetAnalog and SetDouble access the same table in the
SM2.
UINT16 GetDouble(UINT16 GetDouble reads an analog value (64-bit float) to the register
index, DOUBLE *data); 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: GetAnalog and GetDouble access the same table in the
SM2.
54
Working with Database Blocks
UINT16 SetDouble(UINT16 SetDouble writes an analog value (64-bit float) to the register
index, DOUBLE data); 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.
NOTE: SetAnalog and SetDouble access the same table in the
SM2.
UINT16 GetDigital(UINT16 GetDigital reads 16 digital values (all 16 bits in one of the
index, UINT16 *data); 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.
UINT16 SetDigital(UINT16 SetDigital writes 16 digital values (all 16 bits in one of the
index, UINT16 data); 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.
55
Building A SCADA System
UINT16 SetDigitalEx(UINT SetDigitalEx writes 16 digital values (all 16 bits in one of the
index, UINT16 data, UINT16 20,000 digital registers) to the register indicated by 'index' and
mask) 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.
56
Working with Database Blocks
UINT16 SetText(UINT16 SetText writes the text specified by `data' to text registers
index, char *data, int size) 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 GetText reads the text specified by `data' from text registers
index, char *data, int size) 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.
57
Building A SCADA System
58
Working with Database Blocks
59
Building A SCADA System
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 block's alarm state does not change because
both alarms have equal severity. Once an operator acknowledges the HI alarm, iFIX changes the
block's 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.
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.
60
Working with Database Blocks
Suppose you have a 700-gallon water tank and you want to display how much water is in the tank. You
can display the tank's 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 tank's water level in percent filled and in gallons.
Percent 0 to 100
Gallons 0 to 700
The following figure shows the values that are displayed when the tank is full, half full, and empty.
Scaling Values
61
Building A SCADA System
You can change the EGU limits' precision by editing the High Limit and Low Limit fields. When you
change the precision, Database Manager modifies all references to the current block throughout the
database. For example, if you create an Analog Input block with EGU limits of 0.0 to 100.0 and then
change the precision to 0.00 to 100.00, Database Manager searches the database for all references to
this block and makes the appropriate changes. In this case, a Program block that contains the following
step:
SETOUT AI1 50.0
is adjusted to read:
SETOUT AI1 50.00
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 block's 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 block's original range, as shown
below:
SETOUT AI1 50.0
You must modify this Program block's SETOUT statement to reflect the new range, as shown below:
SETOUT AI1 350.0
Database Manager accommodates the EGU limit formats listed in the Available EGU Limits table.
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.
62
Working with Database Blocks
NOTE: Refer to your I/O driver manual for additional integer ranges supported by your equipment.
63
Working With the Process Database
As you develop your process databases, you need to complete many basic operations including:
Creating a new database
Opening and closing an existing database
Adding blocks to the current database
Copying, modifying, duplicating, displaying, and deleting database blocks
Moving blocks from one database to another
Saving the current database
This chapter describes how to complete these tasks.
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:
65
Building A SCADA System
F 1 20 1 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 block's 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 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:
66
Working With the Process Database
N 10 50 10 :7
Block Address
AI1 N10:7
AI2 N20:7
AI3 N30:7
AI4 N40:7
AI5 N50:7
AI6 N10:7
AI7 N20:7
AI8 N30:7
AI9 N40:7
AI10 N50:7
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.
67
Building A SCADA System
Pattern Types
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:
"-"<1:10:1> -1 -2 -3 -4 -5 -6 -7 -8 -9 -10
By combining different pattern types, you can generate a wide range of block field entries. For
68
Working With the Process Database
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.
To configure Excel:
69
Building A SCADA System
an error for each 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.
70
Working With the Process Database
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.
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 Manager's 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 placing 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 the Removing a Block from a Chain figure shows.
Saving a Database
When you finish making changes to a database, you can save the database to disk. By saving the
71
Building A SCADA System
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()
nodename = "MIXER1"
database = "BACKUP"
End Sub
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.
72
Locating and Displaying Data
Using Database Manager, you can locate and display data in the spreadsheet. This chapter explains
how to accomplish these tasks. Refer to the following topics for detailed information:
Finding Data in a Spreadsheet
Replacing data
Using Go To
Updating and Pausing the Spreadsheet
Customizing the Spreadsheet
Saving and Loading Spreadsheet Layouts
Overriding the Default Layout
Find Options
You can toggle the case sensitivity of a search using the Match Case option. When this option is
enabled, Database Manager searches for the exact text and case you enter. The search string is not case
sensitive when you disable the option. For example, selecting the Tag Name column and entering the
search string:
AI
73
Building A SCADA System
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.
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 time-consuming. 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 block's row number by entering its name instead.
74
Locating and Displaying Data
NOTE: Database Manager automatically pauses updating the screen when you add, modify, delete, or
generate blocks or when you print, reload, or import the database.
In addition to automatically refreshing the screen, you can manually update it whenever you want to
refresh the values in the spreadsheet. Manually updating the screen can be particularly helpful when
you automatically update the spreadsheet infrequently, and can be used in conjunction with the
automatic refresh option to update the screen more frequently than every 5 seconds.
75
Building A SCADA System
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.
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
76
Locating and Displaying Data
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). The Block
Type Abbreviations table 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.
Type A_NAME
Description A_DESC
77
Building A SCADA System
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.
5. Click OK. A message should appear indicating that the "DllUnregisterserver" succeeded.
6. Click OK.
7. Repeat steps 3-6 to properly unregister these files:
Fixdb32IOAddress.ocx
Fixdb32Tagname.ocx (making the appropriate substitution for the file name)
8. From the Start menu, click Run. The Run dialog box appears.
9. In the Open field, enter:
REGSVR32 "C:\Program Files\GE Fanuc\Proficy iFIX\Fixdb32egu.ocx"
10. Click OK. A message should appear indicating that the "DllRegisterserver" succeeded.
11. Click OK.
12. Repeat steps 8-11 to properly register these files:
Fixdb32IOAddress.ocx
78
Locating and Displaying Data
79
Querying and Sorting Data
One of the most powerful features that Database Manager provides is querying a database. A query is a
request to display specific information. For example, you might want to display all the Analog Input
blocks with a scan time of five seconds or less. Alternatively, you might want to display every block in
security area Packaging for a specific device driver. After you create a query, Database Manager
selects the blocks from the database that match the request and displays them, replacing any previously
displayed blocks.
The following topics provide more detailed information about querying and sorting a database.
Understanding Query Syntax
Editing a Query
Refining and Expanding a Query
Saving and Loading a Query
Overriding the Default Query
Understanding Sort Orders
Saving and Loading a Sort Order
Changing the Default Sort Order
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 (" ").
Relational Operators
Operator Meaning
= Equal to
81
Building A SCADA System
Operator Meaning
!= Not equal to
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 block's 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.
82
Querying and Sorting Data
Boolean Operators
AND Select the block when both query A and query B are true. A AND B
NOT Invert query. If query A is true, its value becomes false. NOT A
NOR Select the block when both query A and query B are false. A NOR B
XOR Select the block if query A and query B are not both true or both A XOR B
false.
NAND Select the block when query A and query B are not both true. A NAND
B
{Tag Name} ="A*" Every block whose name that begins with an "A."
Other operators, such as the greater than (>) or less than (<) operators, treat wildcards literally.
83
Building A SCADA System
{Scan Time} > No blocks, because the question mark is treated literally and "1M" through
"?M" "9M" have a lesser ASCII value than "?M".
{Scan Time} = All blocks with a scan time from 1 minute to 9 minutes.
"?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"
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.
For example, to find blank cells in the Description column use the query:
84
Querying and Sorting Data
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:
AND {Scan Time} = "2"
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"
85
Building A SCADA System
86
Querying and Sorting Data
87
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
Reloading Databases
Displaying a Database Summary
Exporting Databases
Importing Databases
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.
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.
tagname a:tagname b The block, tagname b, has Remove one or more links to
Tag is in more than more than one upstream tagname b.
one chain block linked to it. Tagname a
identifies one of these
blocks.
tagname:Tag is not in You may have a secondary Remove the secondary block or add
any chain block that is not in any chain a primary block to the start of the
or is the first block in a chain.
chain.
89
Building A SCADA System
tagname: Block not The block, tagname, chains Create a block with the name
found for NEXT to a block that does not exist. specified in the Next field or enter
the name of a block that exists.
tagname:Chains to The block, tagname, Change the name in the Next field or
itself contains its own name in its leave it blank. If you want to
Next field. repeatedly perform a task, use a
Program block instead.
tagname: is not The block, tagname, does Create the block or change the
defined not exist and another block reference to a block that exists.
references it.
fieldname No such The field, fieldname, does Change the reference to a field that
field in FDT not exist and it is referenced exists.
by a block in the database.
Exceeding MAX chain The database contains a Redesign this chain by breaking it
size of 30 chain with more than 30 into two smaller chains or remove
blocks. any unnecessary blocks.
Correcting Errors
You can correct any error by double-clicking it to display the associated block configuration dialog
box.
To correct errors:
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.
90
Managing Databases
nodename = "MIXER1"
database = "BACKUP"
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.
91
Building A SCADA System
Serial number.
Contents.
I/O count.
Using this information can help you manage your databases. For example, knowing the database's
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.
High-level documentation about the database can also help you manage your databases. You can
provide this level of information by displaying the database's 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.
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.
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
92
Managing Databases
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.
Syntax
Parameters
The following table lists the command line parameters available for the DBExporter.exe exporter tool.
Parameter Description
/NNodeName Optionally, specify the remote SCADA node name that you want to to
export the database from. Replace NodeName with the actual node name.
/OOutputFileName Optionally, specify the output file name with full path or no path. If no path
is specified, output file is created in local PDB path. Typically, this path is:
C:\Program Files\GE Fanuc\Proficy iFIX\PDB. The file name portion
requires the file extension: .csv or .gdb.
Replace OutputFileName with the actual output file name. For example:
MyFile.csv.
/F Optionally, allows you to run a fast export. The export runs as fast as
possible, maximizing CPU usage up to 100%.
/R Optionally, allows you to skip header information (that includes the node
name, database name, file name, and date and time of the export), in the
output file.
Error Codes
The following table describes the error codes and descriptions DBExporter.exe exporter tool.
93
Building A SCADA System
Code Result
0 Successfully exported.
2 Invalid commands.
3 Invalid node.
7 Empty database.
9 Exporting failure. The export file had an open or write error, EDA call failure, or
other similar type error during the export process.
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
block's 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
94
Managing Databases
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
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 block's 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
Analog Alarm AA
Analog Input AI
Analog Output AO
Analog Register AR
Boolean BL
Calculation CA
Dead Time DT
95
Building A SCADA System
Device Control DC
Digital Alarm DA
Digital Input DI
Digital Output DO
Digital Register DR
Event Action EV
Fanout FN
Histogram HS
Lead Lag LL
On-Off Control BB
Pareto PA
PID PID
Program PG
Ramp RM
Ratio/Bias RB
Signal Select SS
96
Managing Databases
Statistical Control SC
Statistical Data SD
Text TX
Timer TM
Totalizer TT
Trend 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.
1. Export a database. For more information about exporting a database, refer to the section
Exporting Databases.
2. Changing the order in which the blocks are listed in the export file. For more information on a
database's scanning order, refer to the section Changing a Database's Scanning Order.
3. On Database Manager's toolbar, click the New button.
4. Importing the edited export file.
This process ensures that only the original database resides in memory when Database Manager
imports your database.
97
Building A SCADA System
98
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 Manager's 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.
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.
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
Phasing section.
99
Building A SCADA System
Suppose you create the five identical Analog Input blocks, shown in the following figure. SAC scans
these blocks in the order shown.
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.
100
Advanced Topics
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.
101
Building A SCADA System
102
Index
A block modes
adding described...................................................... 42
blocks to the process database ......................65 function by block type ................................. 42
multiple blocks to the process database........66 block modes..................................................... 42
adding ...............................................................66 block types
adding blocks....................................................32 abbreviations................................................ 94
alarm area database block types....................................................... 94
setting up on each server ................................7 blocks
alarm area database.............................................7 adding .......................................................... 65
alarms adding multiple ............................................ 66
described.........................................................4 adding to Database Manager ......................... 2
alarms .................................................................4 allocating memory ....................................... 91
allocated blocks ................................................91 batch ............................................................ 29
archiving configuring .................................................... 2
process data ....................................................5 control.......................................................... 28
archiving.............................................................5 copying .......................................................... 8
Auto Refresh option copying and pasting ..................................... 69
database spreadsheet.....................................74 Database Dynamos ...................................... 30
Auto Refresh option .........................................74 deleting ........................................................ 71
automatic mode described........................................................ 2
described.......................................................42 displaying information................................. 71
function by block type ..................................42 duplicating ................................................... 69
automatic mode ................................................42 exception-based processing ......................... 36
B function.......................................................... 2
batch blocks......................................................29 how processed by SAC.................................. 3
block fields importing ....................................................... 8
block name ...................................................33 in the database spreadsheet ............................ 7
described.......................................................33 matching process steps to block types ......... 15
formats..........................................................33 modifying .................................................... 71
locating .........................................................34 moving......................................................... 70
naming convention .......................................33 off scan ........................................................ 44
block fields .......................................................33 on scan ......................................................... 44
one shot processing...................................... 39
103
Building A SCADA System
104
Index
105
Building A SCADA System
deleting blocks from the process database........71 Calculation block considerations ................. 36
designing Dead Time block considerations.................. 36
chains............................................................12 Digital Alarm block considerations ............. 36
process database ...........................................11 Event Action block considerations .............. 36
designing ..........................................................11 Lead Lag considerations .............................. 36
displaying PID considerations....................................... 36
any row in a spreadsheet...............................74 Program block considerations...................... 36
block information from the process Signal Select block considerations .............. 36
database ....................................................71
Statistical Data block considerations ........... 36
blocks in a database spreadsheet...................74
understanding............................................... 36
columns in a database spreadsheet ...............74
exception-based processing ............................. 36
database summary ........................................91
export file
rows in a database spreadsheet .....................74
editing .......................................................... 94
displaying .........................................................74
exporting process data to ............................. 92
drivers...............................................................48
export file......................................................... 92
duplicating blocks in the process database .......69
exporting a process database ........................... 92
E
F
editing
field formats..................................................... 33
database spreadsheet.......................................8
freezing columns in a spreadsheet ................... 75
editing.................................................................8
G
EGU limit
GDB
formats..........................................................62
editing an export file.................................... 94
precision and range.......................................62
exporting process database to ...................... 92
EGU limit .........................................................62
GDB................................................................. 92
errors
Generate Wizard
correcting verification ..................................89
adding blocks............................................... 65
errors.................................................................89
adding multiple blocks................................. 66
example
automatic block name assignment ............... 66
Enviro company overview..............................5
customizing block fields .............................. 66
example ..............................................................5
entering patterns .......................................... 66
Excel
Generate Wizard .............................................. 66
converting block data .....................................8
Go To
pasting blocks into ........................................69
using in a spreadsheet .................................. 74
Excel.................................................................69
Go To............................................................... 74
exception-based processing
H
Analog Alarm block considerations .............36
historical trends
Boolean block considerations .......................36
function.......................................................... 4
106
Index
I block ........................................................ 72
I/O data saving large databases.................................. 21
and the database..............................................2 memory............................................................ 21
how processed by SAC...................................3 modifying blocks in the process database........ 71
I/O data...............................................................3 moving blocks to the process database ............ 70
I/O drivers N
defining an OPC server ................................60 non-scrolling column
described.......................................................46 creating in a spreadsheet .............................. 75
OPC Client driver .........................................48 non-scrolling column ....................................... 75
signal conditioning .......................................61 O
SIM driver ....................................................49 objects
SM2 driver....................................................52 Database Dynamo........................................ 30
I/O drivers.........................................................52 objects.............................................................. 30
iFIX off scan blocks ................................................. 44
installing .........................................................7 on scan blocks.................................................. 44
iFIX ....................................................................7 one shot processing.......................................... 39
importing a process database............................97 OPC Client driver ............................................ 48
importing blocks.................................................8 OPC server....................................................... 60
L opening the process database........................... 65
layout optional blocks
defining in a database spreadsheet................76 list ................................................................ 23
layout ................................................................76 optional blocks................................................. 23
loadable blocks (see Database Dynamos).........30 order of solve
loading changing .................................................... 101
queries ..........................................................85 order of solve ................................................. 101
spreadsheet layouts .......................................77 overphasing blocks .......................................... 41
loading ..............................................................77 overriding
locking columns in a spreadsheet .....................75 default query ................................................ 85
M default spreadsheet layout............................ 77
manual mode overriding ........................................................ 77
described.......................................................42 overview .......................................................... 31
function by block type ..................................42 P
manual mode ....................................................42 pasting blocks into Excel ................................. 69
memory pattern types
allocating for blocks .....................................91 syntax........................................................... 66
building large databases................................20 pattern types..................................................... 66
saving databases from a script or Program pausing a spreadsheet ...................................... 74
107
Building A SCADA System
108
Index
109
Building A SCADA System
110
Index
111