Building A SCADA System
Building A SCADA System
Building A SCADA System
iFIX 2022
Building a SCADA System
No part of this publication may be reproduced in any form, or stored in a database or retrieval system, or transmitted or distributed in any
form by any means, electronic, mechanical photocopying, recording or otherwise, without the prior written permission of General Electric
Company. Information contained herein is subject to change without notice.
Trademark Notices
GE, the GE Monogram, and Predix are either registered trademarks or trademarks of General Electric Company.
Microsoft® is a registered trademark of Microsoft Corporation, in the United States and/or other countries.
We want to hear from you. If you have any comments, questions, or suggestions about our documentation, send them to the following email
address:
[email protected]
Table of Contents
Reference Documents 1
Introduction 2
Database Manager 2
Understanding a Database 2
Understanding Chains 3
Sample Application 6
Getting Started 7
To get started: 7
Exchanging Data 8
Designing a Chain 12
To design a chain: 12
Block Fields 29
Scan Times 30
Phasing 34
Overphasing 36
Block Modes 36
I/O Drivers 40
Simulation Drivers 41
Example 44
Example 46
Adding Blocks 54
Duplicating Blocks 57
To configure Excel: 58
Moving Blocks 58
Modifying Blocks 59
Deleting Blocks 60
Saving a Database 60
Find Options 61
Replacing Data 62
Find Options 62
Using Go To 62
Tag Displays Question Marks (???) for the Current Value Field 66
Case Sensitivity 69
Grouping Queries 70
Editing a Query 70
Managing Databases 73
Verifying Databases 73
Correcting Errors 74
To correct errors: 74
Reloading Databases 74
Exporting Databases 76
Syntax 77
Parameters 77
Error Codes 77
Importing Databases 79
Advanced Topics 81
Index 85
Building a SCADA System is intended for process engineers responsible for designing and building a pro-
cess 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
For related information about iFIX, refer to the following documents:
l Understanding iFIX
l Writing Scripts
l Creating Recipes
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 con-
trol 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:
Understanding a Database
Every SCADA server loads a process database at start-up. Once loaded, the database:
l Receives values from an I/O driver or OLE for Process Control (OPC) server.
l Manipulates values according to its configuration (a control strategy).
l Compares the values to alarm limits you define.
l Outputs adjusted values to the I/O driver or OPC server.
l 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.
The main components of a process database are blocks. Blocks are capable of:
l Receiving values either from another block, OPC server, or directly from an I/O driver.
l Manipulating values according to its configuration.
l Comparing incoming values against pre-defined limits.
l Scaling process values to a specified range.
l Performing calculations.
l Outputting values back to the I/O driver or OPC server.
iFIX provides different types of blocks, each capable of performing a unique function. For a brief descrip-
tion of each block, refer to the section Block Types and Descriptions.
By default, when you install iFIX, it creates an empty database for your SCADA server. Using Database
Manager, you can add the blocks you require to this database.
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, auto-
mate, and maintain a process. In automating large processes involving a number of I/O devices, a
Each chain can contain up to 30 blocks, with each block configured to perform a specific processing func-
tion. 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 cap-
abilities allows you to quickly design optimum strategies for your application.
In order for your blocks and chains to function, the Scan, Alarm, and Control program (SAC) processes
them at the time interval you define. SAC processes your blocks and chains by:
l Scanning individual blocks in the chain, reading new I/O values and returning values to the pro-
cess hardware.
l Alarming on incoming values if they exceed pre-defined limits you specify.
l Controlling the automation process by assuring that each block verifies or manipulates incoming
values according to its configuration and sends values on to the next block in the chain.
The following figure shows SAC reading process values, sending these values through database chains,
and returning the output values.
Once you create a process database, your SCADA server can monitor process conditions and report
alarms. Alarms occur when an incoming value exceeds a pre-defined limit. Using the iFIX WorkSpace, you
can draw and animate any object by rotating, coloring, or scaling it when an alarm occurs. These visual
cues help operators respond to alarms in a timely fashion. For more information on reporting alarms,
refer to the Implementing Alarms and Messages manual.
For information on trending data, creating scripts and schedules, and archiving data, refer to the fol-
lowing topics:
SCADA servers can also trend and display real-time and historical values. Process trends enable you to
record and analyze process-critical values and allow you to:
For more information on collecting historical values, refer to the Trending Historical Data manual. For
more information on trending real-time data for operators, refer to the Creating Pictures manual.
Using Visual Basic for Applications (VBA) or the Scheduler, you can adjust database values, place blocks
on scan or off scan, change a block's mode, or launch a script based on a value change or an alarm. For
example, using a time-based schedule, you could set the values of a dozen blocks prior to the man-
ufacture of your product or you could automatically ramp a value based on an event (such as a valve clos-
ing). Likewise, you could write a script to monitor the value of a block and, when an alarm occurs, open a
diagnostic picture. For more information on using these features, refer to the Writing Scripts and Mas-
tering iFIX manuals.
These blocks also let you archive data to a relational database. Once the relational database receives
and stores the process data, you can query it to retrieve and analyze any information. For more inform-
ation on setting up and using a relational database, refer to your ODBC manuals and the Using SQL. For
more information on process database blocks, refer to the iFIX Database Reference.
IMPORTANT: If you are working in a secure environment and using the Electronic Signature option, you must be aware
of the impact of unsigned writes to the process database. Unsigned writes can originate from scripts, schedules, and
writes from a relational database. Refer to the Implications of Database Writes With Electronic Signature section of the
Using Electronic Signatures manual for detailed information.
Sample Application
To help you understand how to create process databases for yourself, this manual uses a sample applic-
ation 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 bri-
quette form. The Enviro company's manufacturing process encompasses:
l Continuous control
l Batch control
l Discrete parts
You can begin creating process databases by verifying that your SCADA servers are set up and func-
tioning. Once you set up these computers, follow the steps.
To get started:
1. Install iFIX on each SCADA server.
2. Configure each server with the System Configuration Utility (SCU). Refer to the Setting up the
Environment manual to learn how to enable SCADA support.
3. Set up the alarm area database for each server. This database contains the alarm areas you can
assign to the blocks on the SCADA server. If you want to share an alarm area database across mul-
tiple servers, change the Alarm Area path in the SCU to reference a file server before you create
your process databases.
You can start Database Manager by clicking the Database Manager button on the Application toolbar
(Classic view) or by selecting Database Manager, in the Process Database group, on the Applications tab
(Ribbon view). As the program starts up, it prompts you to select the SCADA server you want to connect
to and establishes a connection to the computer you select. Once Database Manager connects to the
selected SCADA server, the program opens the server's current database.
From the Database Manager, you can open databases from SCADA nodes with iFIX 3.0 or greater
installed. You cannot add, modify, or delete blocks in databases from earlier versions of iFIX, such as iFIX
2.5 or FIX32.
To exit from the program, in Classic view, select Exit from the File menu or in Ribbon view, click the Data-
base Manager button, and then click Exit.
NOTE: Connections to remote SCADA servers are established with a physical node name, not logical node names.
Logical and physical node names are identical unless you enable SCADA redundancy. For more information about this
feature, refer to the Mastering iFIX manual.
Each process database you open appears as a spreadsheet in Database Manager. Blocks appear as rows,
and block fields appear as columns. Click to select a row or field. You can also select multiple rows and
columns by clicking and dragging.
The following topics provide more information about the database spreadsheet:
The database spreadsheet has many properties you can configure. Among these are:
By configuring these properties you can customize the spreadsheet as needed. To learn more about
these properties, refer to the chapters Locating and Displaying Data and Querying and Sorting Data.
In addition to the properties you can configure, the spreadsheet lets you right-click any row, column, or
cell to display a menu containing a list of frequently-accessed commands. These commands are identical
to commands you can access from the menu bar. For example, Cut on the pop-up menu is identical to
Cut on the Edit menu. Similarly, Add Block on the pop-up menu is identical to Add on the Blocks menu.
You can edit most spreadsheet cells by selecting them and entering the data you want to display, allow-
ing you to change individual items quickly. Cells in certain columns, such as the Tagname column, are
read-only and cannot be modified.
To change multiple fields for a particular block, you can double-click the block to display its dialog box. To
change the same field for multiple blocks, you can find and replace data in a spreadsheet column. Refer
to the chapter Locating and Displaying Data to learn more about finding and replacing data.
Exchanging Data
Database Manager also lets you edit blocks by copying or exporting them. Whenever you complete these
tasks, the program converts the selected blocks into comma separated value (CSV) format, enabling you
to paste or import the data into your favorite text editor or spreadsheet. Once you edit the data, you can
copy or import the data back to Database Manager.
Often a quicker way to convert blocks into CSV format is by holding down the Control key and dragging
and dropping the blocks from Database Manager and into Microsoft® Excel. The blocks you move appear
in CSV format, allowing you to edit them. When you finish, you can drag them back. To learn more about
using Excel with the Database Manager, refer to the section Copying and Pasting Blocks.
Across the top of the spreadsheet is the Database Manager Ribbon. The Ribbon, shown in the following
figure, provides access to common database operations such as saving a database or adding a block.
Database Manager provides preferences for printing, saving, displaying, and editing the database. These
preferences let you adjust how Database Manager handles certain operations. The following table sum-
marizes the preferences you can enable.
You also have the option to set the automatic refresh rate.
Editing pref- Open block dialog boxes in view or modify mode when you double-click a cell in the spread-
erences sheet. 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.
To learn how to create database blocks, refer to the section Adding Blocks. For information on using
standard VBA naming conventions when creating tags, refer to VBA Naming Conventions. For information
on verifying and correcting database errors, refer to the section Verifying Databases.
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 sec-
tion 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 Data-
base Manager so that you can create the sample chains described here. By creating sample chains, work-
ing with Database Manager, and correcting errors, you learn how to avoid mistakes before you create
your actual database.
The first step in designing a database is to examine the application that you want to automate. Next,
assign specific processing, maintenance, and monitoring tasks. For example, the Enviro company iden-
tified the following tasks, the specific iFIX features they would use to accomplish them, and the economic
benefits.
The key elements of this application also apply to processes in other industries, such as chemical pro-
cessing, food processing, and even discrete parts manufacturing.
Designing a Chain
Once you know the tasks you want to accomplish, you can design the chains for your database. The easi-
est 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:
l I/O addresses of the device controller (a wiring list)
l Device types
l Signal conditioning
l The EGU range
2. Design an automation strategy that explains how you want your process automated. For example:
l What types of alarms and alarm limits do you want to establish?
l How often do you want the chain processed?
l When do you want operators notified of process events?
l How do you want process disruptions handled?
3. Create an algorithm that combines your process analysis and automation strategy. This determ-
ines 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.
One step in the Enviro company's sludge conversion process is neutralizing acids and alkali in the sludge.
The treatment process involves four steps:
Sludge from the collection tank is periodically pumped into a large tank where water is added to make
the sludge easier to mix. A sensor in the tank registers the sludge's pH level. If the sludge is acidic, a
device controller turns on a pump that adds an alkaline solution into the tank to raise the pH; if the
sludge is alkaline, the device controller turns on a pump that adds an acidic solution into the tank to
lower the pH. In either case, the sludge's pH is properly adjusted according to the grade of fertilizer that
is needed before it is pumped to the filter press. The following figure shows the pH adjustment tank and
its equipment.
pH Adjustment Tank
The next step is to design a chain that examines and adjusts the sludge's pH by:
The first step in automating your process is analyzing how the process works. By developing a detailed
process analysis first, you save time because you isolate the tasks that simple chains can complete and
identify those tasks that require more complex chain designs. For example, a task in the Enviro company
might be "if the pH is greater than 8.5, add the acidic solution until it reaches 7.5."
Although this analysis describes how the process works, it lacks important information about your con-
trol devices. You need to add detailed information on I/O driver or OPC server addresses, the type of con-
troller 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.
The next step in designing a database chain is planning a successful automation strategy. This requires
you to determine how you want to automate the steps recorded in your process analysis. The following
steps provide a sample automation strategy for the pH adjustment process.
Notice how this automation strategy incorporates an alarming plan for handling process upsets, such as
extreme pH fluctuations (rate of change). This helps to assure that empty drums of acidic and alkaline
solutions do not go unnoticed and equipment failures do not interrupt your treatment process.
The next and most important step in designing the pH adjustment chain is writing an algorithm that com-
bines both the process analysis and automation strategy. The following figure shows how the technical
specifications outlined in the process analysis are combined with the automation needs listed in the auto-
mation strategy.
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.
The next step is finding the right database blocks to perform the steps outlined in the algorithm. This pro-
cess transforms the algorithm from written steps into a chain schematic. Moreover, this step ensures
that you incorporate iFIX capabilities into your processing plans. Once you complete this design step, you
can enter your designs into your SCADA server's database.
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.
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.
At this point you've identified the blocks that can perform all the steps in your algorithm.
The flowchart is a visual representation of the chain and shows the instructions you will enter into each
block as you add them to the database. The following figure shows a flowchart for the pH adjustment pro-
cess.
Chain Flowchart
Typically, your chain designs are seldom perfect the first time you implement them. With Database Man-
ager, you can always re-evaluate the design of your chain, add blocks, remove blocks, modify block
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
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. Reproduced below is the original automation algorithm that called for the On-Off Control block.
l 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.
l Acid pump digital address: 1:1:40004:8
l Alkaline pump digital address: 1:1:40004:5
l 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.
The following figure provides the new programming instructions required to operate the Program and
Digital Output blocks.
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.
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.
Adding other blocks, such as the Statistical Data block, allows you to display statistical data in a graph.
The chain shown from the sample application performs data acquisition and control. These types of
chains usually receive inputs from an I/O driver or OPC server through an input block, manipulate the
inputs with secondary blocks, and return an adjusted value to the I/O driver or OPC server through an
Analog Output, Digital Output, or On-Off Control block, as the following figure shows.
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.
With Database Manager you can create very large databases. If you do this, keep in mind:
l The size of the database that you can construct is limited by the amount of memory you have
available in your computer.
l Plan your database carefully. A database that implements a good scan time and phasing scheme
will provide better system performance than the same database that has its blocks scanned all at
once.
l iFIX provides a number of features that can aid in processing large databases:
l Exception-based processing (triggered by a change at the I/O address).
l One shot processing.
l Long scan times (up to 24 hours with phasing configurations of up to HRS:HRS, HRS:MIN,
MIN:MIN, MIN:SEC, and so forth).
l Subsecond processing.
For more information on these topics, refer to the section Scan Times.
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.
When planning your automation strategy you may want to consider using Analog Input and Digital Input
blocks, or Analog Register and Digital Register blocks. All four blocks combine read/write capabilities and
eliminate the need for separate output blocks.
Analog Register and Digital Register blocks also have specific addressing and configuration requirements:
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.
Typically, every SCADA server comes with two types of blocks: primary and secondary. The main dif-
ference between these block types is that primary blocks have scan times and are first in a chain. Sec-
ondary blocks do not have scan times and are never first in a chain.
Database Options
The option... Provides... Refer to the section...
Control Continuous, PID, direct, and digital control. Understanding Control Blocks to learn
more about control blocks.
Statistical Pro- Statistical data analysis and calculations, alarm-Understanding Statistical Process
cess Control ing, supervisory control, and display of stat- Control Blocks to learn more about
(SPC) istical data. SPC blocks.
Batch State-driven, interlocked, and batch control. Understanding Batch Blocks to learn
more about batch blocks.
SQL Read and write access to a relational database Understanding SQL Blocks to learn
on a remote server. more about SQL blocks.
Block Summary
Block Type Primary Secondary Standard Optional
Analog Alarm (AA) x x
Analog Input (AI) x x
Analog Output (AO) x x
Analog Register (AR) x x
Boolean (BL) x x
Calculation (CA) x x
Dead Time (DT) x x (Control)
Device Control (DC) x x (Batch)
Digital Alarm (DA) x x
Digital Input (DI) x x
Digital Output (DO) x x
Digital Register (DR) x x
Event Action (EV) x x
Extended Trend (ETR) x x
Fanout (FN) x x
Histogram (HS) x x (SPC)
Lead Lag (LL) x x (Control)
Multistate Digital Input (MDI) x x
On-Off Control (BB) x x (Control)
Pareto (PA) x x (SPC)
PID (PID) x x (Control)
Program (PG) x x (Batch)
Ramp (RM) x x (Control)
Ratio/Bias (RB) x x (Control)
Signal Select (SS) x x (Control)
SQL Data (SQD) x x (SQL)
SQL Trigger (SQT) x x (SQL)
Statistical Control (SC) x x (SPC)
Statistical Data (SD) x x (SPC)
Text (TX) x x
Timer (TM) x x
Totalizer (TT) x x
Trend (TR) x x
NOTE: iFIX supports up to 65534 tags per block type depending on the composition of the database in relation to avail-
able contiguous shared memory and process memory space.
Primary blocks receive data from an I/O driver or OPC server and generate alarms based upon this inform-
ation. Primary blocks are usually associated with one or more pieces of process hardware. For example, a
Most primary blocks, listed in the following table, also include a scan time. The scan time controls when
SAC scans the blocks in the database. Refer to the section Scan Times to learn more about them.
Secondary blocks manipulate data according to your instructions. Secondary blocks usually receive input
from an upstream or primary block and perform a specific function with that input, such as perform a cal-
culation or store several successive input values. Therefore, a secondary block cannot be the first block of
a chain. However, you can connect secondary blocks to create a chain like the one shown in the following
figure.
Control blocks provide continuous, direct, or digital control capability. The following table lists the avail-
able control blocks.
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.
On-Off Receives analog values and outputs digital values.
Control
(BB)
Ramp Increases or decreases values to a target value at a specified rate. You can enter
(RM) 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 multiplying
Statistical Process Control (SPC) provides statistical data analysis and calculations, alarming, supervisory
control, and display of statistical data. The following table lists the available SPC blocks.
Batch blocks are specifically designed for discontinuous (state-driven, sequenced, interlocked, and batch)
control operations. The following table lists the available batch blocks.
Batch Blocks
The block... Function:
Device Control Coordinates the opening and closing of digital devices based upon user-defined con-
(DC) ditions.
Program (PG) Runs short programs for batch operations or to increase the degree of automation in
an application.
SQL blocks read and write data to a relational database. The following table lists the available SQL blocks.
SQL Blocks
The block... Function:
SQL Data Identifies the data to send and retrieve between the process database and your rela-
(SQD) tional database.
SQL Trigger Triggers the execution of SQL commands and defines how your relational database inter-
(SQT) acts with the process database.
iFIX can process information from one or more Database Dynamo objects, also known as loadable blocks.
Each Database Dynamo is an optional block that adds functionality to the process database. By using
Database Dynamos, you can create new blocks tailored to your needs. For example, you might create a
Dynamo that provides a custom PID or other control algorithm.
You can create a Database Dynamo by using the Database Dynamo Toolkit. After you create one, iFIX
treats your Database Dynamo like any other block in the process database. This feature enables iFIX to
process alarms from the Dynamo, along with the other alarms in the system. Database Dynamos also
enable you to:
GE also makes the following Database Dynamos available in the iFIX product:
Use the Database Dynamo Configuration Utility (BTKCFG.exe) to add the Database Dynamos in the
above table to iFIX. After iFIX is restarted, you will then be able to add blocks of these types in the iFIX
Database Manager.
To add a Database Dynamo:
1. Double-click the Btkcfg.exe file to launch the Database Dynamo Configuration Utility. By default,
this file is located in the iFIX install folder, C:\Program Files (x86)\GE\iFIX.
2. In the Available Database Dynamos list, select the Dynamo that you want to add and click Add (or
optionally, click Add All). This moves the specified Database Dynamos to the Configured Database
Dynamos list.
3. On the File menu, click Save.
4. Restart iFIX. After iFIX restarts, you will then be able to add the blocks in the above table within
the iFIX Database Manager.
IMPORTANT: Use caution in removing Database Dynamos (loadable blocks). If you use the Database Dynamo Con-
figuration Utility (BTKCFG.exe) to remove a loadable block but do not remove the block from the iFIX database, an error
message appears in the Alarm History that a block type is missing and the blocks are not loaded.
1. Double-click the Btkcfg.exe file to launch the Database Dynamo Configuration Utility. By default,
this file is located in the iFIX install folder, C:\Program Files (x86)\GE\iFIX.
2. In the Configured Database Dynamos list, select the Dynamo that you want to remove and click
Remove (or optionally, click Remove All). This moves the specified Database Dynamos to the Avail-
able Database Dynamos list.
3. On the File menu, click Save.
4. Restart iFIX.
1. Double-click the Btkcfg.exe file to launch the Database Dynamo Configuration Utility. By default,
this file is located in the iFIX install folder, C:\Program Files (x86)\GE\iFIX.
2. In the Configured Database Dynamos list, select the Dynamo that you want to change the slot
number for.
3. In the Slot Number field, enter a new number. You can enter any number between 50 to 149 that
is not in use. For more information on slot numbers, refer to the Understanding Slot Numbers sec-
tion.
4. On the File menu, click Save.
5. Restart iFIX.
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 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.
Block Fields
Whenever you add a block, its configuration dialog box appears. The dialog box fields and controls rep-
resent 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.
The format indicates the type of data that the field stores. The following table lists the available formats:
Field Formats
Format: Description: Used in...
A_ ASCII Format. Data links and objects in pictures.
F_ Floating-point Data links, objects in pictures, and block-to-block references.
Format.
E_ 15-Digit Pre- Data links, objects in pictures, and block-to-block references. Valid values
cision Format. range from +/-3.40282300000000e+/-38, with 15 digits of accuracy.
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 iden-
tified 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.
You can display a list of fields for the currently selected block using the Expression Builder or the iFIX
Database Reference help. Using this information, you can configure Data links or other objects in your
operator displays to extract block field data by specifying a data source. Alternatively, you can write a
Visual Basic for Applications (VBA) script or an Easy Database Access program to extract and display
block field data. For more information about the Expression Builder, specifying data sources, and adding
Data links and objects, refer to the Creating Pictures manual.
The iFIX Database Reference provides information to help you complete block dialog boxes. The
remainder of this chapter provides related information for completing common block fields, such as the
scan time, phase, and I/O driver fields. Refer to these sections to learn how to configure these fields for
your 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.
l Time-based processing
l Exception-based processing
l One shot processing
In time-based processing, SAC processes a block at a set time. The following table lists the scan time
ranges you can enter for time-based chains.
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.
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.
Exception-based processing lets SAC scan a block or chain by exception, not at scheduled time intervals.
An exception is:
l A change in a process value greater than the defined exception dead band; or
l An unsolicited message from your process hardware.
Using exception-based processing generally requires less CPU time and improves performance because
SAC does not have to scan blocks at defined intervals. However, if a block's value changes very fre-
quently, time-based processing may be more efficient.
You can use exception-based processing only if your I/O driver supports it. Consult your I/O driver client
manual to learn if your I/O driver supports exception-based processing.
NOTE: The SM2 driver supports exception-based processing; the SIM driver does not support exception-based pro-
cessing.
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:
l Analog l On-Off
Input Control
l Analog l Pareto
Output
l Digital l Ratio/Bias
Input
l Digital Out- l SQL Data
put
l Fanout l Timer
l Histogram l 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.
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 val-
ues from Analog Input blocks outside the chain.
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, it is recommended not using them in exception-based chains.
Using Analog Alarm and Digital Alarm Blocks
Analog Alarm and Digital Alarm blocks support exception-based processing. However, you must leave the
Re-alarm Time and the Delay Time fields unmodified; otherwise, SAC places these blocks (and their
chains) off scan when iFIX starts or when you reload the database. SAC processes exception-based Ana-
log Alarm and Digital Alarm blocks only when an operator acknowledges an alarm from the iFIX
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.
You can configure any primary block or chain to be scanned once on start-up by setting the scan time to
zero and placing the block on scan. Once scanned, SAC does not scan the block or chain again until it
restarts, the database is reloaded, or you place the block off scan and then on scan.
Any block with a scan time may be configured for one shot processing. However, the same restrictions
that apply to exception-based chains also apply to one shot-based chains.
Phasing
Phasing staggers the time at which SAC scans your blocks. This is particularly important for large data-
bases 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.
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 fol-
lowing figure shows.
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.
Block Modes
l Other blocks.
l An I/O driver or OPC server.
l The keyboard (using Data links).
l Recipes.
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 dis-
play, 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 click-
ing 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
As blocks change from Automatic and Manual modes, they enter a pending state. This state indicates
that SAC has acknowledged the mode switch and will change it on the next scan.
Blocks placed into Manual mode enter PMAN mode. The block remains in this state until SAC scans the
block again. While in PMAN mode, SAC continues to scan the block according to its scan time and phase.
Manual entries from an operator or a Program block force SAC to scan the block immediately and put it
into Manual mode. Scans after a manual entry depend on the block's scan time.
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.
Blocks placed in Automatic mode enter PAUT mode. The block remains in this state until SAC scans the
block again. While in PAUT mode, SAC scans the block as if it were in Automatic mode.
For blocks with short scan times, this means that the next scan time occurs relative to the last scan. For
example, suppose SAC scans AI1 at 1:15:30. This block has a 30-second scan time. If an operator changes
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 Auto-
matic mode, SAC:
SAC processes all database blocks placed on scan when it starts or a database is loaded. By default,
Database Manager prompts you to place on scan each block you add. SAC stops processing a block or a
chain when:
l From the iFIX WorkSpace, you select an object connected to a primary block and you run a script
that places the block off scan.
l You modify a block with Database Manager. Modifying a block while SAC is processing that block's
chain places the entire chain off scan. As an option, you can set up Database Manager to auto-
matically place the modified block and its chain on scan when you finish editing it. Refer to the sec-
tion Setting Database Manager Preferences to learn more about Database Manager options.
l You delete any block within a chain. Refer to the section Deleting Blocks to learn more about
removing blocks from the process database.
l Statements in Program blocks, Event Action blocks, or an EDA program place a chain's primary
block off scan.
l You connect the blocks in a chain incorrectly and SAC cannot scan the chain. Use Database Man-
ager's Verify command to determine which blocks are improperly chained. Refer to the section
Verifying Databases to learn about examining your database for errors.
l 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.
l You can place a block off scan from the Scan Status column displayed in the spreadsheet.
l 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 Under-
standing 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:
l Opening an operator display, selecting an object connected to the chain's primary block, and run-
ning a script that places the block on scan.
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 sells drivers for many types of hard-
ware. Contact your GE Sales Representative, or refer to our web site at at https://digitalsupport.ge.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 con-
figuration.
iFIX supplies an OPC Client I/O driver, as well as two simulation drivers.
l Provide a matrix of addresses that database blocks can read from and write to.
l Support analog and digital database blocks.
l Support text blocks.
The OPC Client I/O driver allows you to bring OPC data into and out of iFIX. It is automatically installed
with iFIX; however, if you choose to create a customized install program, the OPC Client I/O driver is an
optional component.
To use the OPC I/O Driver:
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.
You may prefer to use the SIM driver over the SM2 driver for one or more of the following conditions:
l Generating a repeating pattern of random and predefined values to help you test your chains.
l Using alarm counters to show the general alarm state of your SCADA server.
To use the SIM driver:
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 set-
tings is 0:0 to 1999:15.
NOTE: The SIM driver does not support analog scaling (A_SCALE_* and F_SCALE_* database fields).
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.
32768 Bit 15 is set to 1
Bits 14 to 0 are set to 0
32767 Bit 15 is set to 0
Bits 14 to 0 are set to 1
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:
To help you test your database with simulated input, the SIM driver provides a set of registers that gen-
erate a repeating pattern of random and predefined values. For example, you could ramp a value to sim-
ulate the performance of specific chains or you might generate a series of random numbers to test the
entire database.
To assign one of these registers to a block:
To ramp a value with the RA register, enter the following text in the I/O Address field:
RA
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.
NOTE: The RB and RC registers support Digital Register offsets of A_0 to A_15.
You may prefer to use the SM2 driver over the SIM driver when one or more of the following conditions
occur:
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 val-
ues when iFIX starts.
The SM2 driver does not use the Hardware Options or Signal Conditioning fields.
To use the SM2 register:
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.
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 path. By default, this
path is C:\Program Files (x86)\GE\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
C API Functions
Syntax Values read, written, and returned
UINT16 GetAn- GetAnalog reads an analog value (32-bit float) to the register indicated by 'index'.
alog(UINT16
FE_OK is returned if the operation succeeds.
index, FLOAT
*data); 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 SetAn- SetAnalog writes an analog value (32-bit float) to the register indicated by 'index' and
alog(UINT16 causes an exception for the specified register even if the data has not changed.
index, FLOAT
FE_OK is returned if the operation succeeds.
data);
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 reads an analog value (64-bit float) to the register indicated by 'index.'
GetDouble
FE_OK is returned if the operation succeeds.
(UINT16 index,
DOUBLE *data); FE_IO_ADDR is returned if the register index is out of range.
NOTE: GetAnalog and GetDouble access the same table in the SM2.
UINT16 SetDouble writes an analog value (64-bit float) to the register indicated by 'index' and
SetDouble causes an exception for the specified register even if the data has not changed.
(UINT16 index,
FE_OK is returned if the operation succeeds.
DOUBLE data);
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 GetDi- GetDigital reads 16 digital values (all 16 bits in one of the 20,000 digital registers) to
gital(UINT16 the register indicated by 'index'.
index, UINT16
FE_OK is returned if the operation succeeds.
*data);
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 SetDi- SetDigital writes 16 digital values (all 16 bits in one of the 20,000 digital registers) to
gital(UINT16 the register indicated by 'index' and causes an exception for all 16 bits of the specified
index, UINT16 register even if the data has not changed.
data);
FE_OK is returned if the operation succeeds.
NOTE: The API can only read and write the entire 16 bit digital register at one time. If
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 GetText GetText reads the text specified by `data' from text registers starting at the register
(UINT16 index, indicated by `index'. The number of characters to read is indicated by `size'. GetText
char *data, int does not automatically add a null terminator to the text being read. If you require null-
size) terminated strings, make sure your program adds a null terminator after reading text.
NOTE: As of iFIX 4.5, only the alarm statuses IA_OK and IA_COMM are supported for
use through the SM2 driver.
NOTE: As of iFIX 4.5, only the alarm statuses IA_OK and IA_COMM are supported for
use through the SM2 driver.
NOTE: As of iFIX 4.5, only the alarm statuses IA_OK and IA_COMM are supported for
use through the SM2 driver.
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.
In addition to I/O drivers, the WorkSpace can send and receive data with an OLE for Process Control
(OPC) server. You can configure any database block to receive or send OPC data by completing the block's
I/O driver fields. To do this, select OPC from the Driver field, and then click the I/O Address field's Browse
button to specify an OPC address.
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.
Very often raw values from your process hardware are not meaningful to operators. This is particularly
true when the hardware reports values in a numeric format, such as an unsigned integer, to indicate how
full a tank is. In this situation, what is needed is a way to map the range of values you receive into a dif-
ferent range of values. Many I/O drivers provide this ability by applying signal conditioning.
Signal conditioning converts the data received from the process hardware into a format that is easily
recognizable by operators. You can apply signal conditioning by selecting the type you want to use from a
block's Signal Conditioning field.
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.
The following figure shows the values that are displayed when the tank is full, half full, and empty.
Scaling Values
EGU limits have a precision and range. The precision is the number of digits after the decimal point. The
range is the span of values. For example, the default range for blocks is 0 to 100.
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 pre-
cision 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 table Available EGU Limits. Each
format is accurate to six digits. Because of compiler limitations, round-off errors may occur in the sev-
enth digit. The following figure shows sample values and their accuracy.
As you develop your process databases, you need to complete many basic operations including:
One of your first tasks when developing a process database is to create a new database. Click the Create
New icon on the Home ribbon in the Process Database area to create a new database. When creating a
new database the empty database, EMPTY.PDB, is used as a template; any existing database that may
be loaded is closed. You must enter a different name for the new database.
Before Database Manager can open and display a database, the program establishes a connection to a
SCADA server (either local or remote) on the network. It accomplishes this by prompting you to select
the SCADA server to which you want to connect. Once you select the server, Database Manager estab-
lishes the connection and opens the server's current database.
You can establish a connection with a different server by opening a different database. Once you select
the new server you want to connect to, Database Manager disconnects from the existing server and
opens the selected server's current database.
NOTE: From the Database Manager, you can open databases from SCADA nodes with iFIX 3.0 or greater installed. You
cannot add, modify, or delete blocks in databases from earlier versions of iFIX, such as iFIX 2.5 or FIX32.
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 Man-
ager lets you add blocks by:
When any of the first four methods are used, you can select the type of block you want to add. After you
do this, a block configuration dialog box appears. By completing the dialog box and clicking OK, you can
add the block to the database.
For more information on completing a block configuration dialog box, refer to the iFIX Database Refer-
ence help.
NOTE: Whenever you add or delete a block in the database, it is recommended that you resolve your pictures. For more
information about resolving pictures, refer to the Creating Pictures manual.
The Generate Wizard lets you add many similar blocks to the database quickly, saving development time.
You simply select the type of block you want to create and the block names you want to use.
For the block type, you can select an existing or a new block. This selection determines the specific values
assigned to each block created. For example, when you select a new block, the Wizard creates blocks
with default values. However, when you select an existing block, the Wizard creates blocks with values of
the selected block. This option lets you create many similar blocks quickly without having to reconfigure
them later.
When specifying the block names, you must enter a prefix, suffix, starting number, ending number, and
increment value. The Generate Wizard uses this information to systematically assign names to the
blocks it creates. For example, the following values create blocks with the names F1T1 through F20T1.
The Generate Wizard cannot create a block with a name that already exists. If the information you spe-
cify 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
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:
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 pro-
gramming statement for generating a range of numeric or string values. The following table lists the syn-
tax for each type of pattern.
Pattern Types
Type Syntax Example
Numeric <start:end:increment> <1:10:1> generates a range of num-
bers from 1 to 10.
where start is the initial value of the pattern,
<1:20:3> generates the numbers
end is the ending value, and
1,4,7,10,13,16, and 19.
increment is the amount to add to the current pat-
tern value.
Alphanumeric <"string1", "string2",... "string"> <"A", "B", "C", "D">
List
where string1 is the first string, <"Area A", "Area B", "Area C">
string2 is the second string, and <"Pump 1", "Pump 2", "Pump 3">
Analog Input
Constants "string" "Curr Value > 100"
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 gen-
erate these types of numbers by enclosing a minus sign or a decimal point in quotation marks outside of
the pattern. Negative increments are not supported. Consider the following examples:
By combining different pattern types, you can generate a wide range of block field entries. For example, if
you want to customize the Description field for a group of blocks, you could enter a pattern such as Alarm
Status from Area <"A", "B", "C">. Notice that the text outside the pattern does not require quotation
marks.
Duplicating Blocks
Another way you can add similar blocks to the database is by duplicating them. Like the Generate Wizard,
you can duplicate multiple blocks. However, you cannot customize specific block fields; you can only spe-
cify 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 mon-
itor five other pumps in a similar way. By duplicating the block, you can reproduce it and create the addi-
tional blocks you need.
Database Manager lets you share block information among your process databases and third-party
applications by copying and pasting them to the clipboard. Copying and pasting blocks between two data-
bases is a quick way to create new ones. This works best when the database you want to create contains
blocks similar to existing blocks in other databases. By copying existing blocks, you save time because you
only need to change the information that differs between the original block and the new copy.
When you copy blocks to the clipboard, Database Manager converts and saves them in comma separated
value (CSV) format. Once saved on the clipboard, you can paste the blocks into any application that sup-
ports CSV files.
Pasting blocks into Excel requires you to configure the program so that it converts and displays the data
correctly. You also need to configure Excel when you drag and drop data from Database Manager or
import a database saved in CSV format.
To configure Excel:
Pasting CSV-based blocks into Database Manager converts and adds them to the process database in
memory. If the names of these blocks are already in use, Database Manager prompts you to replace the
existing blocks with the ones you are pasting. If you do not replace them, Database Manager generates
an error for each 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 cor-
rect 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 inform-
ation 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.
Modifying Blocks
You can modify any database block displayed in the spreadsheet. Typically, you need to modify a block:
Before you modify a block, you can determine the exact fields to change by displaying the block's con-
figuration dialog box. Unlike modifying a block, displaying a block's dialog box leaves the block and its chain
on scan.
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:
l The blocks you want to remove and cutting them without subsequently pasting them
l The Delete button from Database Manager's toolbar (Classic view)
l The Delete button from the Blocks group on the Home tab (Ribbon View).
The difference between these methods is the Delete button in Classic View or Delete in Ribbon view
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 pla-
cing 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 por-
tions 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 data-
base, 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.
You can also save a database automatically using the RUNTASK command from a Program block or a
script. When you save a database using the Program block, use the following syntax:
RUNTASK DBBSAVE -Nnodename -Ddatabase
The -N command line parameter enables you to save a database on a remote SCADA server. The -D com-
mand line parameter enables you to save a database to another PDB file name. Both command line para-
meters 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"
save_pdb = System.ProjectPath + "\DBBSAVE" + " -N" + nodename + " -D" + database
return_value = Shell (save_pdb, 0)
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.
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:
As you develop and test your process database, you may find it necessary to locate specific spreadsheet
values. For example, you may want to locate and adjust the scan times of your primary blocks.
With Database Manager, you can search in any spreadsheet column for text by selecting the column head
of the column you want to search in. You must also enter a search string. The string is the text you want
to locate in the selected column. You can enter up to 29 alphanumeric characters for the search string.
Once you enter the text you want to locate, Database Manager locates the first occurrence of the string
in the selected column. To locate subsequent occurrences, you can repeat this process.
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
l ai
l Ai
l aI
You can also find whole or partial words with the Match Whole Word Only option. Database Manager
treats the search string as a whole word when you enable the option. By disabling the option, you can
find the specified string inside other words. For example, if you search for the string "line" with the Match
Whole Word Only option disabled, Database Manager matches the following descriptions with the search
string:
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 spread-
sheet when do not know the block's row number by entering its name instead.
You can configure Database Manager to automatically update the spreadsheet by enabling the Auto
Refresh option. This option periodically refreshes the values in the spreadsheet. You can enter refresh
rates between 5 and 3600 seconds.
By automatically updating the spreadsheet, you can troubleshoot your database by monitoring specific
blocks. Should you identify an error, you can correct it and immediately see your change's effect.
You can temporarily disable the automatic refresh option by pausing the spreadsheet. Pausing updates
instructs the Database Manager to stop updating the screen. It does not affect SAC or the scan status of
the blocks in the database.
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.
By completing these tasks, you can create a custom display for yourself and other database developers.
Changing spreadsheet colors is like changing the colors of a window with the Display dialog box in the Con-
trol Panel. First, you select the item whose color you want to change and then you select the color for it.
l Cell text
l Spreadsheet grid
l Row and column head background and text
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 val-
ues, 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 columns you can select correspond to common and block-specific fields. Columns corresponding to
common block fields appear with only the field name. For example, the following text appears for the
common field Current Value:
Curr Value
AI is the block abbreviation and identifies the field as an Analog Input specific field. The text Smooth indic-
ates 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.
If you display database information in different ways, you may want to save your spreadsheet layouts to
a format file. Format files define the following information for each spreadsheet column:
By saving spreadsheet layouts, you eliminate the need to recreate them. Database Manager saves your
spreadsheet layout in format files residing in the FIX Local path by default. These files have the extension
.FMT.
Loading a format file is like creating a spreadsheet layout. It appears in the Properties dialog box, allowing
you to modify it as needed. In addition, when Database Manager opens the format file, the program
replaces the current set of spreadsheet columns with the ones listed in the format file. If a block does not
include a field that corresponds to one of the new columns, the text "----" appears in that cell.
The first time you run Database Manager, it loads its preset default spreadsheet layout stored in the
format file, DEFAULT.FMT. The following table lists the preset default columns and the corresponding
fields that appear.
If the Database Manager displays tag values, but the fields for an open block appear empty in the block
display, try re-registering the Fixdb32egu.ocx, Fixdb32IOAddress.ocx, and Fixdb32Tagname.ocx files. This
should resolve the issue with the tag display. Use the steps below.
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:
l Fixdb32IOAddress.ocx
l 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 (x86)\GE\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:
l Fixdb32IOAddress.ocx
l Fixdb32Tagname.ocx (making the appropriate substitution for the file name)
13. Restart the iFIX WorkSpace.
14. Start the iFIX Database Manager, open a tag, and confirm all of the proper tag information
appears.
Tag Displays Question Marks (???) for the Current Value Field
If one or more of the tags in the iFIX database file displays with question marks (???) in the current value
field:
If both of these conditions are true, the ???'s for the Current Value most likely occur due to an issue with
the PLC device communications. You will need to troubleshoot device. Refer to your device or the driver
documentation for details on how to troubleshoot.
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.
Before you can create a query, you must know the information you want to retrieve from the database.
For example, you might want to display all the Analog Input blocks with a current value greater than 50.
Alternatively, you might want to display every block in alarm area Line5 for a specific I/O driver.
Once you know the information you want to display, you can construct the query using the following syn-
tax:
{column} operator "value"
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
<= Less than or equal to
< Less than
!= Not equal to
>= Greater than or equal to
> Greater than
retrieves blocks with names that start with AI. It also retrieves blocks with names that start with:
l Ai
l ai
l 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.
You can combine two or more queries using one of the boolean operators in the following table. Using
these operators you could build a query such as:
{Scan time} = "3" AND {Security Area 1} = "Packaging"
to display all the blocks in security area Packaging with a scan time of 3 seconds.
Boolean Operators
The operator... Instructs Database Manager to... Example
AND Select the block when both query A and query B are true. A AND B
OR Select the block if either query A or query B is true. A OR 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 false. A XOR B
NAND Select the block when query A and query B are not both true. A NAND B
You can also include the following wildcards in queries containing the equal to (=) operator.
Other operators, such as the greater than (>) or less than (<) operators, treat wildcards literally.
Examples: Using Relational Operators
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 spread-
sheet 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"
For example, to find blank cells in the Description column use the query:
{TAG NAME} = "*" AND {Description}=""
This query displays all the blocks in the database that have no text in their Description fields.
The number of blocks that Database Manager retrieves from a query depends on how broad your request
is. If the query is broad (for example, display all Analog Input blocks) the program retrieves more blocks
than if the query is narrow (for example, display all Analog Input blocks with a scan time of five seconds
and a name that begins with "Q"). You can adjust the number of blocks retrieved by refining or expanding
your query.
One way to refine a query is to start with a simple query and append other queries to it. For example, the
following query displays all the Analog Input blocks in the database.
{Type} = "AI"
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"
If you find yourself frequently entering and re-entering the same query, you may want to save it to a file.
By saving a query, you cut down on frequent retyping and eliminate the possibility of mistyping the query.
Database Manager saves your queries in separate files. These files reside in the FIX Local path by default
and have the extension .QRY.
By default, Database Manager loads the query file DEFAULT.QRY when you initially start the program.
This query retrieves every block from the database. If you routinely request certain information from the
database, you may want to override the current default query by saving the current settings. You can
also restore the original query, DEFAULT.QRY, as the default, by loading the query file and selecting Save
Settings from the Tools menu.
Database Manager automatically sorts all the blocks in the spreadsheet whenever you query or open a
database. The blocks are sorted according to the current sort order. A sort order defines:
For example, suppose you want to sort the spreadsheet by the Type and Scan Time columns in ascending
order. Once you select these columns:
l Database Manager sorts the spreadsheet by the Type column alphabetically (ascending order).
l Next, the program sorts the Scan Time column in numeric order.
Loading a sort order is like entering one. It appears in the Properties dialog box, allowing you to modify it
as needed. In addition, when Database Manager opens the sort order file, the program re-sorts the
spreadsheet.
Before loading a sort order, verify that the columns Database Manager sorts on appear in the spread-
sheet. If the columns do not appear, add them. For more information about adding columns to the spread-
sheet, refer to the chapter Locating and Displaying Data.
NOTE: Because the Tag Name column only contains unique data, Database Manager never needs to sort beyond this
column. For this reason, when you save or load a sort order containing the Tag Name column, Database Manager
ignores any column that follows. Ignored columns are not saved or loaded.
By default, Database Manager loads the sort order DEFAULT.SRT when you initially start the program.
This sort order arranges the blocks in the spreadsheet by block type and then by block name. If you prefer
a different sort order, you can override the default by saving the current settings. You can also restore
the original sort order, DEFAULT.SRT, as the default, by loading the sort order file and selecting Save Set-
tings from the Tools menu.
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.
l Verifying Databases
l Reloading Databases
l Displaying a Database Summary
l Exporting Databases
l 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:
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 con-
tains it. The following table lists the possible verification errors and how to resolve them.
To correct errors:
Reloading Databases
Using the SCU, you can select the default database to load on start-up. When you load another database,
it remains in memory until you restart iFIX. Refer to the Setting up the Environment manual for more
information about specifying the database to load on start-up.
If you want operators to reload the database from the iFIX WorkSpace, you can create a script to reload
the database using a routine similar to the following:
Private Sub FixEvent1_OnTrue()
Dim load_pdb As String
Dim return_value As Double
Dim nodename As String
Dim database As String
nodename = "MIXER1"
database = "BACKUP"
load_pdb = System.ProjectPath + "\DBBLOAD" + " -N" + nodename + " -D" + database
return_value = Shell (load_pdb, 0)
End Sub
The -N command line parameter enables you to reload a database on a remote SCADA server. The -D
command line parameter enables you to reload a database other than the currently loaded one. Both
command line parameters are optional; if you do not use them, you reload the open database on the
local SCADA server.
For information about using the Shell function from a script, see the Visual Basic help system.
CAUTION: The DBBLOAD system task does not prompt you to save changes to the database. Be sure you save your
database before executing a script that reloads the database. Otherwise, you will lose all your changes.
Database Manager lets you display a summary of the current database. This summary lists the data-
base's:
l Size in bytes.
l Serial number.
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 num-
ber of blocks used and allocated. A used block is one you have configured. An allocated block is a place-
holder 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. Typ-
ically, you export a database when you want to:
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:
For more information using these features, refer to your Excel documentation.
Database Manager exports all the blocks displayed in the spreadsheet. As a result, you can query the
database to display only the blocks you want to export. For example, to export all the Analog Input blocks
in the database, use the query:
{TYPE} = "AI"
For more information about querying the database, refer to the section Understanding Query Syntax.
You can export a database from the command line using the DBExporter.exe command. This command is
used independently of the Database Manager.
The DBExporter.exe command allows you to export all tags currently loaded on local or remote node to a
comma separated value (CSV) or GDB text file. When no command parameters are specified, DBEx-
porter.exe exports tags on local node to PDB name.csv to local PDB path. Typically, this path is: C:\Pro-
gram Files (x86)\GE\iFIX\PDB.
Syntax
DBExporter.exe [/NNodeName] [/OOutputFileName>] [/F] [/R]
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.
/OOut- Optionally, specify the output file name with full path or no path. If no path is
putFileName specified, output file is created in local PDB path. Typically, this path is: C:\Pro-
gram Files (x86)\GE\iFIX\PDB. The file name portion requires the file exten-
sion: .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 pos-
sible, 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 out-
put file.
Error Codes
The following table describes the error codes and descriptions DBExporter.exe exporter tool.
Once you export the database, you can edit it with any text editor. As you edit the export file, use the fol-
lowing guidelines:
You can also enter comments into the export file by typing an exclamation point (!) as the first character
on a line.
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 adding
these optional values to a block entry, you can complete specific dialog box fields when the block is impor-
ted. 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.
Importing Databases
1. Export a database. For more information about exporting a database, refer to the section Export-
ing Databases.
2. Change the order in which the blocks are listed in the export file. For more information on a data-
base's scanning order, refer to the section Changing a Database's Scanning Order.
3. In Classic view, on Database Manager's toolbar, click the New button.
-Or-
In Ribbon view, click the Database Manager button, and then click New.
4. Import the edited export file.
This process ensures that only the original database resides in memory when Database Manager imports
your database.
Import errors encountered by Database Manager are stored in the file IMPORT.ERR. This file resides in
the Database path.
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.
You can control the precise order you want SAC to scan your blocks and chains by adjusting the data-
base's scanning order, called the order of solve. Typically, you only need to adjust the order of solve when
the value of one block depends on the value of another. For example, suppose you are calculating a value
from three Analog Input blocks as the following figure shows.
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.
1. Regardless of their order in the database, SAC processes blocks that output a value to an I/O
device (using a Cold Start value). SAC does not examine these values for alarm conditions.
2. SAC updates all primary blocks according to the scan time and phase. Blocks with the same scan
time and phase update in the following order.
a. Analog Input blocks
b. Analog Output blocks
c. Digital Input blocks
d. Digital Output blocks
e. Ramp blocks
f. Multistate Digital Input blocks
g. Statistical Data blocks
h. Boolean blocks
i. Device Control blocks
j. Analog Alarm blocks
k. Digital Alarm blocks
l. Pareto blocks
m. Text blocks
n. Program blocks
NOTE: Analog Register and Digital Register blocks do not require SAC processing. Instead, iFIX processes them
only when an operator opens a picture containing a link to either block or when a script that references either
block runs. When either event happens, iFIX processes the blocks before the Ramp block.
3. When SAC scans a primary block, it:
a. Processes that block's entire chain.
b. Scans the next primary block.
4. SAC scans primary blocks of the same type, scan time, and phase in the order these blocks occur
in the database, as the following example shows.
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.
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.
You can change the order of solve by exporting the database and editing the export file. Database Man-
ager exports primary blocks in the order SAC scans all primary blocks. This results in all Analog Input
blocks appearing first in the export file, followed by all Analog Output blocks, and so on. Once the primary
block types are exported, Database Manager exports the secondary blocks.
For example, using the blocks in the Sample Calculation Chain figure, you can ensure SAC scans AI1 after
AI2 and AI3 as follows:
For more information about completing these tasks, refer to the sections Exporting Databases and
Importing Databases.
As an option, Database Manager lets you customize its toolbar by arranging and removing the toolbar but-
tons. Customizing the toolbar lets you display the buttons to frequently-used functions. For example,
while developing a database you might display the buttons that let you add, modify, and delete blocks.
However, when the database is complete, you might want to remove these buttons from the toolbar.
Once you remove a button, you can always add it back to the toolbar. Adding custom buttons is not sup-
ported. By default, the toolbar comes pre-configured with all the available buttons added for you.
NOTE: This feature is not available in Ribbon view.
Depending on your needs, you may want to start other applications after launching Database Manager.
For example, if you routinely drag blocks to an Excel spreadsheet for modification, you may want to start
Excel after Database Manager opens.
By customizing Database Manager's Tools menu, you can add menu items that launch any iFIX or third-
party application. You can also arrange and delete these menu items as needed.
Once you specify this information, Database Manager creates the menu item and saves it as part of its
default configuration. You can subsequently select the menu item to launch the associated application.
adding 54
adding multiple 55
A
adding to Database Manager 3
adding
allocating memory 76
blocks to the process database 54
batch 26
multiple blocks to the process database 55
configuring 3
alarm area database 7
control 25
setting up on each server 6
copying 8
alarms 5
copying and pasting 57
described 5
Database Dynamos 27
allocated blocks 75
deleting 60
archiving 5
described 3
Auto Refresh option 63
displaying information 59
database spreadsheet 62
duplicating 57
automatic mode 37
exception-based processing 32
described 36
function 3
function by block type 36
how processed by SAC 4
importing 8
B
in the database spreadsheet 7
batch blocks 26
matching process steps to block types 15
block fields 29
modifying 59
block name 29
moving 58
described 29
off scan 39
formats 29
on scan 39
locating 30
one shot processing 34
naming convention 29
optional 22
block modes 36
pasting into Excel 57
described 36
pattern type syntax 55
function by block type 36
phasing 34
block types 78
planning your automation strategy 21
abbreviations 78
verifying 73 toolbar 8
described 1 editing 8
queries 67 updating 63
editing 8 G
SIM driver 43 O
SM2 driver 45
objects 27
iFIX 7
Database Dynamo 27
installing 6
off scan blocks 39
importing a process database 79
on scan blocks 39
importing blocks 8
one shot processing 34
manual mode 37
P
described 36
pasting blocks into Excel 58
function by block type 36
pattern types 56
memory 21
syntax 56
allocating for blocks 75
pausing a spreadsheet 62
building large databases 21
PAUT mode 38
saving databases from a script or Program
block 60 function 38
assigning 35 closing 54
function 24 example 6
standard 24 functions 2
boolean operators 69 S
described 67 SAC 31
loading 71 function 4
summary 27 T
toolbar 8
Database Manager 9
Toolkit 27
Database Dynamo 27
Tools menu 84
trending 5
historical values 5
updating a spreadsheet 62
used blocks 75
VBA 75
functions 5
verification messages 74
list 74
resolving 74
WorkSpace 5