Professional Documents
Culture Documents
Version 8.0
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Fundamentals Guide
•
•
•
•
Disclaimer of Liability
The information contained in this document (and other media provided
herewith) constitutes confidential information of Siemens AG and is
protected by copyright laws and international copyright treaties, as well
as other intellectual property laws and treaties. Such information is not to
be disclosed, used or copied by, or transferred to, any individual,
corporation, company or other entity, in any form, by any means or for
any purpose, without the express written permission of Siemens AG.
The information contained in this document and related media
constitutes documentation relating to a software product and is being
provided solely for use with such software product. The software product
was provided pursuant to a separate license or other agreement and
such information is subject to the restrictions and other terms and
conditions of such license or other agreement.
The information contained in this document and related media is subject
to change without notice and does not represent a commitment and does
not constitute any warranty on the part of Siemens AG. Except for
warranties, if any, set forth in the separate license or other agreement
relating to the applicable software product, Siemens AG makes no
warranty, express or implied, with respect to such information or such
software product.
Trademarks
Siemens AG and FactoryLink are trademarks or registered trademarks of
Siemens AG in the United States and/or other countries. All other brand
or product names are trademarks or registered trademarks of their
respective holders.
•
•
•
•
Introducing FactoryLink
The FactoryLink software provides the process knowledge and control needed to perfect the
products companies make and the processes they manage. FactoryLink monitors, supervises,
and controls processes in a variety of industries around the world. FactoryLink is highly
scalable and can be used to build from the simplest Human-Machine Interface (HMI) systems
to the most complex and demanding Supervisory Control and Data Acquisition (SCADA)
systems.
FactoryLink allows data to be collected from a wide variety of plant floor devices and valuable
information to be distributed easily throughout the entire organization.
Object-Oriented Development
FactoryLink has object-oriented development tools that you can use to create “application
objects” to represent real-world devices, such as pumps, valves, switches, tanks, or other
equipment. Application objects are reusable and have inheritance, so if one is modified, all
“instances” of the object are modified accordingly, without the need to find and update each
instance individually. Application objects save valuable time and reduce risks during system
configuration or maintenance efforts.
Redundancy
FactoryLink’s virtual real-time networking capability facilitates the creation of redundant
FactoryLink applications. It allows two identical FactoryLink applications to operate in a
master/slave configuration and supports master/slave arbitration, real-time data
synchronization, and alarm system redundancy. FactoryLink also supports several methods of
handling redundancy of historical data.
Graphics Development
Each FactoryLink client contains two types of graphics technology: multiplatform graphics
(FactoryLink ECS) and Windows technology (Client Builder graphics) for FactoryLink 7.x or
later. Both types can be used in the same application.
Client Builder, FactoryLink’s graphical development tool, provides a rich set of artwork for
use in building graphical displays. Included are standard user interfaces for alarm viewing,
trending, and historical data browsing. These interfaces require minimal configuration and
allow you to present the right information to the right person in an easy-to-understand format.
•
•
•
•
Distributed Architecture
•
•
•
•
Features, Tasks, and Tools
These programs are referred to as tasks because they are independent programs that do only
one specific job or task alone, but together make an application fully functional.
At run time, FactoryLink tasks gather, process, communicate, and present data through the
real-time database using a group of user-selectable options. Most tasks are included in the base
FactoryLink system at no additional charge. Some important tasks are described in this section.
Client Builder
Client Builder is FactoryLink’s graphical user interface. Client Builder communicates with the
FactoryLink Server via the Client/Server gateway service and is also an OPC Client that
communicates with other OPC servers. For supervisory control, instructions can be sent from
Client Builder to the FactoryLink Server’s real-time database and from there to the plant floor.
Client Builder supports alarming, trending, and historical data browsing functionality using
ActiveX controls. Each of these functions has an ActiveX control that requires minimal
configuration to achieve a fully functional system. Prior to FactoryLink 7.0, the graphical user
interface for FactoryLink was called ECS graphics. Screens in this format are compatible with
FactoryLink 7.2 and later and may be used inside of Client Builder graphics. Client Builder is
discussed in more detail later in this chapter.
Application Editor
Application Editor, a pre-7.0 FactoryLink tool, is used to draw and animate graphical screens
for the FactoryLink application. Application Editor is used to build and edit ECS graphics only
and is included for support of pre-existing applications. Typically, Application Editor is not
used for a new application.
Device Interfaces
FactoryLink uses device interfaces to gather data from devices such as PLCs and RTUs. In
addition to vendor-specific interfaces (for equipment from companies such as Schneider
Electric, Omron, Rockwell, Siemens, and GE Fanuc), FactoryLink provides an OPC interface
that can be used to collect information without requiring device-specific drivers. Additional
interfaces are available, if desired. Consult your authorized reseller or representative for the
most recent list of available interfaces.
XML Adapter
The XML Adapter enables web-based applications to read and write FactoryLink real-time
data using an XML document. This option is a separate program that can be installed on the
FactoryLink server machine. The XMLAdapterInstall.exe program is located in the C:\Program
Files\ \FactoryLink\Installs directory.
This program installs a new COM component that can be used from applications that support
COM, including ASP pages on an IIS web server, VB/VBA applications, Active Scripting
hosts, and C/C++ applications. It also installs example web pages. To run the demonstration,
you must start the Examples Application, open an Internet Explorer window, and navigate to
the examples at http://localhost/XMLAdapter.
The Event and Interval Timer task defines timed events and time intervals that can be used to
initiate and control any system function. Timed events occur at a specific time not more than
once every 24 hours, whereas time intervals occur at least once every 24 hours at regular
intervals. Timed events and intervals link to real-time database tags that are used as triggers to
other FactoryLink processes.
Programmable Counters
The Programmable Counters task provides totalizers and event delays. Outputs from counters
can be used to provide inputs to other FactoryLink processes or to trigger events.
The Database Terminal (DBT) is an on-line real-time browser that supports read/write access
to a FactoryLink application to provide enhanced debugging capabilities. Advanced
functionality is provided for viewing data including filters, wildcards, spreadsheet style
display, change counters, and data format selection (ASCII, binary, hex, octal, decimal,
exponential). Remote browsing is also supported.
Batch Recipe
The Batch Recipe task stores recipes on disk for manufacturing a product. These recipes can be
sent to an external device at a given time to control the product manufactured.
Persistence
The Persistence task saves the values of an active FactoryLink application at predetermined
times so if FactoryLink shuts down unexpectedly, useful data is not lost.
Print Spooler
The Print Spooler task directs data to printers or other devices with parallel interfaces and also
to disk files.
The Scaling and Deadbanding task converts or scales incoming raw data to a different value
range and indicates a dead or non-recalculating band around a scaled value. (New applications
use IOXlater or ECI.)
The Interpreted Math and Logic task uses a programming language to perform operations of a
mathematical or logical nature on combinations of tags in the real-time database. Each math
and logic operation, controlled by a procedure resembling BASIC, is based on user-defined
variables, and is triggered by events in the real-time database.
The Compiled Math and Logic task is used for applications that have a large number of
calculations in the server application. It is used in conjunction with a C compiler and provides
more flexibility and performance than Interpreted Math and Logic.
The Event Time Manager (ETM) task allows the configuration of objects, functions, and
parameters for a specific schedule. Users simply build an event list and schedule the actions
based on selected criteria for the objects. Event information is stored and retrieved from any
formatted flat file allowing for rapid event scheduling of multiple points.
Utilities
FactoryLink provides utilities for general maintenance and troubleshooting. All utilities can be
started from a Command Prompt window and many can be started from the Configuration
Explorer.
In Configuration Explorer, the utilities are accessed from a menu that appears when you
right-click your “server computer name” or your “application name”. The output window in
the Configuration Explorer displays the system processing messages when utilities are started.
The Utilities Guide provides detailed information about each of the FactoryLink utilities.
System-wide event logging capability is supported to ensure the logging of three primary event
types:
• Events from within the FactoryLink system, such as a network problem or a software task
error
• Events from the PLC or other control system, such as a circuit breaker tripping, a pump
stopping, or a cycle finishing
• Operator interactions, such as when an operator logs in, starts a pump, or acknowledges an
alarm
The Distributed Alarm Logger checks real-time data for permitted limits, generates alarms if
limits are exceeded, and copies the alarms to a historical disk-based relational database.
Alarms represent a subset of events and are configured based on any event within the system.
Alarms are specifically intended to alert operators to situations that may require their action.
Client Builder includes an Alarm Viewer that provides for viewing and acknowledging alarms
or events in the system. It has filtering and sorting capabilities to make the information more
useful to the operator. Events and states of various objects can also be viewed from the alarm
viewer.
An alarm or event defined in the alarm logger can be configured to use the e-mail notification
agent to acknowledge an alarm by using an e-mail reply from contact recipients in a
notification group. If a contact fails to be notified within a specified amount of time, the alarm
notification can be escalated to an alternate contact. Other contacts who are not required to
acknowledge the alarm can be designated to receive an alarm notification.
Operator Event Logging allows FactoryLink to track and users to analyze all operator actions
and client events to provide the information necessary to comply with company requirements
or industry and government standards.
Logged events include tag value changes from the client, operator login/logout, and client
connection/disconnection.
Operator Logbook
The operator logbook allows operators or other users to enter notes about alarms or events. The
information is saved in a relational database for later reporting and analysis. The logbook is
useful for applications that must comply with regulatory requirements.
Report Generator
The Report Generator task can create reports based on data in the real-time database. Reports
are flexible in format and can be generated as files or printed reports. The Report Generator
can also generate reports in XML format. These reports can be used to interchange information
over the Internet with other applications that understand XML or can be formatted as
HTML-viewable web pages.
Note: Reports can be also be created using third-party software such as Microsoft
Access and Crystal Reports to access historical data logged to an external database,
such as SQL Server, Oracle, or Sybase.
Historical Reports
The FactoryLink Historical Reports are pre-configured reports that provide secure access to
electronic data through standard reports to match the most stringent requirements of regulatory
applications. The included reports cover the basic requirements of 21 CFR Part 11, the FDA
guidelines for trustworthy electronic records. The reports are developed in Microsoft Access
and the source is provided for customization if desired. For more information, see “Historical
Reports” on page 31.
Historian
The Historian task communicates with external databases to create, write to, read from, and
update database tables. It processes data requests from other FactoryLink tasks and sends them
to the external database. The Historian acts like an interface between FactoryLink and the
database. The Historian is specific for a particular database product. The supported databases
are:
• SQL Server 2005
• Oracle 10
• Sybase System 12
• Other relational databases with ODBC support, such as Informix and DB2/2
• dBASE IV (for support of pre-7.x applications)
The Oracle Historian task provides a native interface to an Oracle 10 relational database. It
processes data requests from other FactoryLink tasks to write data to or retrieve data from the
relational database.
The Sybase Historian task provides a native interface to a Sybase System 12 relational
database. It processes data requests from other FactoryLink tasks to write data to or retrieve
data from the relational database.
Data Point Logging simplifies the task of logging data using preconfigured tables. Multiple
shared numeric-value tags can be stored in the same database and sorted later if necessary.
Data Point Logging captures the time, the tag name, and the tag value for the tags specified.
Database Logging allows users to create a table and specify which tags to capture in that table.
When the value of any tag in the table changes, the values of all tags in the table are logged.
Database Logging provides the ability to group tags in a database table.
The logger tasks include algorithms for limiting the data saved to the database. This feature
can be added to existing systems by defining points to be saved on change with a simple
absolute deadband value.
Process values are commonly “flat” during a large percentage of the day. The compressed
logging algorithm allows users to be specific in the amount of change the system will
recognize before it begins to log points to the database. Reducing the amount of logged data
improves database performance and ultimately trend responsiveness.
The Trend controls provided in Client Builder allow users to view the real-time or historical
evolution of any tags previously configured for logging. Tag values are displayed graphically
using either a line graph or a bar graph. Trending handles multiple points (up to 8 trends per
viewer) and supports panning and zooming. A wide variety of pen styles and colors can be
configured easily and property changes can be customized on-line.
The Database Browser control provided in Client Builder connects to a relational database,
such as SQL Server, and allows operators to view, sort, and filter data in a tabular fashion from
the database.
PowerSQL
The PowerSQL (Structured Query Language) task works in conjunction with the Historian
tasks to allow an application to access data in an external relational database through a result
window. In addition, PowerSQL processes SQL statements that are entered in a FactoryLink
message tag.
PowerSPC (optional)
The PowerSPC (Statistical Process Control) task contains many standard statistical
calculations and charts. It works in conjunction with the FactoryLink Historian task to allow an
application to store and access real-time statistical data in an external relational database. The
PowerSPC task is supported for ECS graphics only.
UTC Logging
Universal Time Constant logging allows the server to log data in UTC (Coordinated Universal
Time). This capability prevents the overwriting of data due to daylight savings time transitions.
It is also critical for SCADA systems that cross time zones.
Many of the logging systems in the server can be configured to log in UTC time, including
database and data point logging, alarms, and operator audit trail.
Client Builder ActiveX controls have features that automatically translate the historical data
time stamps into the locally configured time zone, including daylight savings time changes.
The client makes the time conversion so that operators see data in their time zone. Even
trending displays the daylight savings time data with special handling of duplicate time data.
The Virtual Real-time Network and Redundancy (VRN) task provides networking and
redundancy functionality for FactoryLink.
VRN facilitates the creation of redundant FactoryLink applications. It does this by mirroring a
selectable portion of the FactoryLink real-time database. It allows two identical FactoryLink
applications to operate in a master/slave configuration. In this capacity VRN supports
master/slave arbitration, real-time data synchronization, and alarm system redundancy. VRN
requires virtually no configuration work. Tag selection is done by a simple list that allows for
the use of wildcards.
FLOCX
FLOCX is an ActiveX control designed to interface with the OLE Server task to allow a
connection to non-FactoryLink programs that also support OLE communication.
File Manager
The File Manager task manages files on local drives or remote servers and transfers files from
one station to the next.
C ONFIGURATION TOOLS
FactoryLink provides both development and operational functionality. You configure and
maintain the system using two application development tools: Configuration Explorer for
configuring the server component and Client Builder for configuring the graphical user
interface on the client tier.
Configuration Explorer
Configuration Explorer supports a multi-user, client/server configuration environment where
multiple users can configure multiple servers concurrently from any machine on the network.
Configuration Explorer presents an environment that is highly intuitive to those with
experience using Microsoft products. It provides access to the FactoryLink tasks in a tree view,
much like Windows Explorer.
Menu Bar
Toolbar
Namespace
entries in the
Navigation
window
Workspace
area
Output Window
Status Bar
The tree-view navigation window on the left-hand side of the Configuration Explorer main
window is the key navigation window that provides a hierarchical view of FactoryLink system
servers and OPC servers. Users can navigate to these servers to configure them. Beneath the
FactoryLink servers, the tree view shows the associated server applications and their related
tasks in a hierarchical fashion.
A task must be configured to make it part of the application. Every task has at least one
configuration table, depending on the job the task performs in an application. A task is
configured by completing its associated configuration tables. Double-clicking a task item in
the tree will open the appropriate editor for that item.
When a table icon is double-clicked, the Grid Editor opens. The Grid Editor is used to edit
the configuration tables as well as provide a traditional grid view of the task (records listed
down the page in a table).
Form Editor
When a record icon is double-clicked, the Form Editor opens. The Form Editor displays the
fields for one single configuration record. Navigation buttons at the bottom of the form allow
the viewing of previous and next records.
Double-clicking a Math and Logic procedure from the tree opens the Math and Logic Editor,
which provides an intuitive and user-friendly method for creating Math and Logic procedures.
The Math and Logic Editor includes features such as chromacoding (text colored based on
syntax) and automatic update of the trigger and variable tables directly from the editor.
Application Objects
Where the Data Comes • Raw configuration data can be a user input or a source file.
From • User input can be entered by keyboard or by record
generator panel.
• Source file data types can be a text file, a spreadsheet, or a
database.
How the Classes are • Template variables define the input or source parameters.
Defined • Template variables can be used in configuration objects, file
objects, and application objects.
• Configuration objects define the template variables or
constants used in the configuration forms.
• File objects define the template variables or text used in the
text forms.
• Application objects define the collection of template
variables and objects used to represent a functional
equipment object.
How the Application • Application objects are instantiated using a copy-and-paste
Objects are Instantiated method from the Classes tables to the Instances tables
into Configuration Tables within the application objects database.
• Tables of application object instances within the database
are used to record and maintain the location of the
instantiated objects within the FactoryLink application.
• Each successful instantiation is then written as a record to
the FactoryLink application configuration tables and files.
Application Objects
(collection of variables and objects)
The Examples Application (discussed on page 93) provides many sample screens that
demonstrate the features in Client Builder, as well as many libraries of images that can be used
in applications.
FactoryLink ECS graphics screens (in FactoryLink 6.6 or earlier) can be used inside Client
Builder, so it is easy to upgrade from an older version of FactoryLink. Both of these graphical
interfaces are provided with FactoryLink development systems.
Customization is supported in Client Builder through Microsoft VBA scripting. All animations
and functions available at run time are accessible programmatically.
Client Builder supports online configuration by providing the capability to develop and test
graphics within the same environment.
• Drawings and symbols can be rotated, mirrored, aligned, grouped, ungrouped, locked,
unlocked, dragged and dropped, and animated. Access to undesired keystrokes can be
locked to prevent access to the underlying operating system.
• Symbols are class-based and object-oriented. Each time a symbol is modified, all
replications or instances are automatically updated graphically as well as in database links.
Symbols and libraries can be predefined or user-defined.
Communication Connections
Client Builder exchanges data with the server through its network socket or OPC connection.
Animation is possible during run time using links between graphical objects and real-time tags
on the FactoryLink server. In addition to mimics, Client Builder allows standard viewers such
as the Alarm, Trend, and Database Browser controls to be embedded within displays. These
controls are configured in the Client Builder environment. It is also possible to embed
third-party ActiveX controls within Client Builder mimics.
The following graphic illustrates communication connections between the major components
of the Client Builder client project, the FactoryLink Server, and the Database Server.
Client Builder
VB Script
Animation
Variables
Failover and
Communication To 3rd-Party
Cluster Monitor OPC Cluster OPC Servers
OCX CS Client Mgr Mgr
Client Computer
FactoryLink Server
Computer CS Service
Alarm Server Tag Server OPC Server Trend Server FL Data Server
Historian
Data Logger
(ODBC or Native)
3rd-Party OPC
Database on Server on Local
Local or Remote Computer, Remote
Computer Computer, or PLC
In the client project, the mimic’s animated objects connect to the real-time database using the
Communication Manager’s client connection to the FactoryLink Tag Server. With the server
application running, this communication allows the tag values to be read to and written from
the animated objects. The animation features use those tag values, as well as the graphics local
register variables, for real-time display and control of the FactoryLink Server. In addition to
the animation features and functions, the internal VBA script editor can be used to write
custom code using a graphic object’s exposed properties, methods, and events.
The client can also use its OPC Communication Manager to connect to third-party OPC
Servers and use OPC tags in the same way.
ActiveX Controls
Alarms The Alarm Viewer control is used to configure, display, sort, filter, and
acknowledge the active alarms from the FactoryLink Server as communicated
through the Alarm Server. Alarm Viewer properties can be accessed for
configuring the parameters for general control, colors and fonts, groups, and
fields. The Alarm Logger uses a Historian task to write the alarm data to a
SQL Server or dBase IV database selected during installation.
Trend The Historical and Real-time Trend control is used to configure, display, and
select data as communicated through the Trend Server from values logged to a
database using the Data Logger tasks. Using this database method, the trend
controls can display the data in either a real-time or historical mode. The trend
control properties can be accessed for configuring the parameters for graphs,
pens, and fonts. Within the properties panel, a trend editor is accessed for pen
assignments to the database tables and columns.
The Trend Server resides on the FactoryLink Server and accepts connections
from multiple clients. The Trend Server makes a direct connection to the
databases using an ODBC or native data source configuration.
The Real-time Trend control plots charts directly from Client Builder
variables obtained from the Tag Server, OPC Server, or local variables.
For more information about ActiveX controls, see the Client Builder Help.
•
•
•
•
Historical Reports
O VERVIEW
The Historical Reports tool produces reports about the activities requiring electronic signatures
that occurred during a process cycle. A manager or regulations auditor can generate reports for
specific users, computers, IO points, and start/end dates.
FactoryLink has four data sources for electronic records:
• Operator Audit Trail
• Alarm History and Associated Logbook Entries
• Process Data Logged by the Database Logger
• Process Data Logged by the Data Point Logger
Each of these data sources produces various preconfigured reports. Some reports combine
information from two or more of the data sources to present a full picture of the process for a
given time period. Figure 4-1 shows the historical reports window.
Figure 4-1 Historical Reports Window
G ENERATING R EPORTS
1 If Microsoft Access or the Access RunTime Viewer is not installed, see the Installation Guide
to install the viewer. For proper reporting, the user language needs to match the language of the
operating system, as explained in the Installation Guide.
2 Choose one of these methods to start the Historical Reports:
• If running the historical reports on a FactoryLink system, click Start > Programs >
FactoryLink > Historical Reports.
• If running the historical reports on a system where a FactoryLink Client is not installed, use
Windows Explorer to browse to the Applications shared folder on the machine where
FactoryLink is installed. Open the Historical Reports folder and double-click Historical
Reports.adp.
Note: You need to have access to a Historical Database CAL if running the reports on
a system where a FactoryLink Client is not installed.
3 When the Security Warning appears, click Open. (This security warning appears each time you
run the Historical Reports.)
4 At the Logon screen, type the username and password for a SQL Server user that has read
access to your historical data and then click OK.
The Reports Data Linking dialog box appears and automatically starts to connect the project to
the FLINK database at the (local) SQL Server.
5 When the connection status is successful, click Continue to connect to the default FLINK
database. The Historical Reports window appears (see Figure 4-1).
You can connect to a different database by clicking Advanced Data Source Configuration and
entering the desired database name and associated login information. Click OK and then click
Continue to connect to this database.
6 Click a report to open a dialog box similar to the one in Figure 4-2. Select the criteria you want
to use to query the electronic document for user activity for a specified time period. (You can
type the start/end dates, click the arrow and select a date from a calendar, or click a time period
quick button.)
Figure 4-2 Operator Audit Trail Report Query
The process data reports have an option on the query screen that allows you to add statistics to
the bottom of the report. If the Show Max/Min/Avg Values check box is selected, the column for
the specified time period displays the minimum, maximum, and average values reports as well
as the logged data.
7 To select the columns to display and change the width and order of the data in the selected
report, click Advanced. A dialog box similar to the example in Figure 4-3 opens.
Note: The number of columns you select to display along with the width of the columns
specified may exceed the available space for the report. If this condition occurs, a
message appears instructing you to adjust the field widths.
Specify your
own SQL
WHERE clause
Either select to have the item Use arrows to set the order
appear in the report or clear to the items are to display
not display the item in the report
8 After setting the criteria for the report, either click Preview to view the report immediately or
click Print to send the report to a configured default printer.
Note: To select a printer different from the default printer or to specify a range of pages
in the report to print, click File > Print in preview mode.
Figure 4-4 shows a sample report for the activities done by the MyAdministrator user.
•
•
•
•
Internal Architecture
FactoryLink is a modular system of individual tasks that perform separate functions. These
tasks communicate and share data with one another through the real-time database.
The FactoryLink system provides the following advantages over systems that rely on real-time
Inter-Process Communications (IPC) through passing buffers or sharing files:
• Tasks maintain their independence and inherent compatibility with one another.
• Data formats for interfaces will not change unpredictably
• Tasks can hand off the inter-process communication to the database function, which acts as
an intermediary, meaning less time is spent waiting for another task to acknowledge
error-free receipt of data.
• Functions, conditions, or events that can be related through the use of a common tag allow
you to create custom applications without programming. Instead, you select, configure, and
link different programs to exchange information freely in real time.
The Open Software Bus architecture permits commonly used system functions to be
modularized into independent tasks (programs) that run concurrently in a multitasking
operating system environment. The tasks interact with each other by communicating with and
sharing a global, real-time database in which all programs have access to all real-time data.
The architecture provides a flexible development platform. It is extensible and completely
open. Tasks can be added or removed without affecting other tasks or existing applications.
The application program interface (API) to the global, real-time database is standardized and
published along with utilities in a Programmers Access Kit (PAK), enabling users to add their
own tasks that operate like standard FactoryLink tasks. Custom tasks developed with the PAK
can be plugged in just like Siemens-developed tasks.
The Open Software Bus architecture provides superior speed and performance:
• The real-time database is resident in high-speed random access memory.
• Exception processing is performed by the real-time database. Tasks only access and process
changes when needed. This eliminates unnecessary activity by the computer and on
networks.
• CPU resources are dynamically allocated between FactoryLink tasks that have changes to
process.
• High-speed, bidirectional block transfers between tasks and the real-time database,
triggered either by changes or events, assure maximum performance and communication.
• Block transfers of data to and from PLCs and other equipment can be triggered by any
system event, calculation, previous reading, operator command, or time.
FactoryLink tasks communicate through the software bus in real time using tags. For example,
a bar graph in the client interface can be linked to a value read from a PLC by referencing the
name of the tag containing the value.
Tag Names
pump1_tmp
pump2_tmp Real-time database
pump3_tmp
When data is collected and updated in the database, other tasks can access and manipulate the
data. A task can write information to a tag in the real-time database using one of two types of
writes: a normal write or a forced write.
Normal writes only write to a tag in the real-time database if the new value is different from the
existing value. In this way, system resources are not used unnecessarily.
Forced writes write to a tag whether or not it has changed. You use this type of write to make a
tag appear to have changed value even if the data has not changed.
A task gets the value of a tag in the real-time database using a read operation. Once the task has
this value, it can perform functions on the value, such as displaying the value on a mimic,
transmitting the value to an external device, or sending the value to a relational database for
archiving.
Read or write operations can be triggered by an event (such as when a product passes an
electronic eye) or can occur only if the tag changes. A read or write operation that occurs only
when the data changes is referred to as exception processing. Because large blocks of data can
be transferred between tasks, and because only the changed values are processed, exception
processing significantly optimizes performance.
Exception processing is possible because of the structure of the FactoryLink real-time database
tags. A real-time database tag consists of two parts, the tag’s value and the tag’s change status.
When a tag in the database is written, its change status is automatically set by FactoryLink and
each FactoryLink task has a mechanism to determine the tag’s change status.
For more details about the structure of the real-time database and how FactoryLink does
exception processing, see “Real-Time Database and Tag Structure” on page 115. It is
especially important to understand these concepts if you plan to develop applications that
include Interpreted or Compiled Math and Logic programs.
Syntax
Legal characters for the <name> and <ext> strings are as follows. The strings cannot begin
with a number or contain spaces.
{A-Z} {a-z} {0-9} {@$_}
General Recommendations
3 Recommendation
Use a consistent naming system throughout the plant.
Have a hierarchical structure so that you can support branching (discussed on page 51).
Begin related tags with the same first-level branch name (the name before the first “_”
delimiter) if you want the tags grouped together for listing and linking purposes. This
makes testing and troubleshooting much easier.
Incorporate the type of process, unit, and location in the name, but not in addresses or
references that may change during the lifetime of an item.
Have a way to distinguish user-defined tags from internal system tags.
Distinguish between process-related and system-related objects. For example, a motor
including all of its I/O signals may be part of the process, whereas the I/O card that takes
the signals may be part of a PLC system.
Define virtual objects including all I/O signals and interface borders.
Plant-related hardware inputs/outputs (such as pushbuttons and feedback signals) should
use the same tag naming concept to indicate the devices (such as machine, switch, or
source within the plant) to which it belongs.
Do not start the name with a number.
Try to name each tag in a way that describes its purpose.
Defining Tags
Anytime you save a configuration that contains an undefined tag, the Tag Editor appears for
you to complete the tag definition.
The type of data that can be stored in the tag depends on where the tag is specified.
FactoryLink uses the following data types:
The Tag Editor has an area that defines tag persistence. With tag persistence activated, the
value of the tag is periodically saved to a disk file. If a value exists in this file for a tag, it is
written to the tag when the task is restarted. This way, you do not lose important information
by exiting the task.
Tags defined in
property fields
Note: Changes to tag properties when the system is running may not display on the
clients until they are restarted. Variables that are cached are not updated.
The following information explains the correlation between the tag properties usage in
Configuration Explorer and Client Builder.
• Tag Property values are substituted when the animations property field choice is set to
AUTO.
• There are no specific uses of the REG_ENGUNITS or ALL_INVALIDLBL tag properties
in animations. However, when defined, the REG_ENGUNITS properties value is
automatically shown to the right of a Display or Send Registers value when the animations
Format field is also set to AUTO.
• ALL_INVALIDLBL is a text string displayed instead of the normal yellow triangle with a
question mark when the connection to the Tag Server tag is lost. For this property to work,
the base tag must have had a valid connection at one time in order to retrieve this property
value and store it locally. This property can only be defined in the Tag Properties table.
• The Tag Property fields in the single point Tag Editor accept both literal values and other
tags as a source of the property information. To use a tag in a property field, prefix the tags
name with the equal sign. See the Tag Properties table Property columns field help in
Configuration Explorer for acceptable tag data types for a specific property.
Important Notes:
• When a base tags description property is defined using the value from another tag, this
other tag must be used somewhere else in the application for its value to be visible in
Client Builder. A good place to add this tag if it is not used elsewhere in the application is
the Math and Logic Variables table.
• The Format choice in the Label Display animation refers to Client Builder substitution
strings, and not the REG_FORMAT tag property. See the “Using Substitutions in
Animations” topic in the Client Builder Help for information about the use of
substitution strings in this Format field.
TAG A RRAYS
A tag name can be assigned to a single tag or a group of tags (called an array). This assignment
creates multiple tags with a single operation. All the tags receive the same tag definition.
One advantage of using arrays is that certain FactoryLink tasks, such as Math and Logic and
Database Browser, can perform operations on an entire tag array using only one reference to
the array, rather than using separate references to each tag in the array.
You specify an array by entering a value in the Array Dimensions field of the Tag Editor. This
value defines the number of tags to include in the array. Each array can have up to 65,534 tags.
If a value is specified, multiple tags are created in the real-time database. Once created, each
tag can be referenced individually. The specified value determines whether the array is
single-dimensional or multi-dimensional.
one-dimensional array – a list of tags indexed in sequence
multi-dimensional array – a matrix or table containing a fixed number of rows and
columns, with more than one index. Each tag in a two-dimensional array has a pair of
indices. The first index indicates the row and the second indicates the column of the array
where the tag is located. A three-dimensional array has three indices.
Single-Dimensional Array
Fuel[0] Super_93
Fuel[1] Extra_89
Fuel[2] Regular_93
Fuel[3] Diesel
B RANCHING
A branch is a group of tags in a hierarchical data structure. With branching, the Variable
Browser does not access and display all tags in the FactoryLink database. Instead, only the tags
that belong to the branch are accessed and displayed. This feature significantly improves
system performance and lowers development time, because it is much easier to find tags that
are organized in this fashion.
A simple example of a hierarchical data structure is shown in the following graphic.
The branches in this example are Area1, Pump1, Pump2, and Pump3. The actual tags in this
system are the Upstream Pressure, Downstream Pressure, and Speed. To represent this
hierarchy in a database, the following naming convention is used, with each of the following
names representing a single tag:
Area1_Pump1_UpstreamPressure
Area1_Pump1_DownstreamPressure
Area1_Pump1_Speed
Area1_Pump2_UpstreamPressure
Area1_Pump2_DownstreamPressure
Area1_Pump2_Speed
Area1_Pump3_UpstreamPressure
Area1_Pump3_DownstreamPressure
Area1_Pump3_Speed
For subsequent instances of this symbol, you are only required to specify the name of the
branch to identify which set of tags is used for the animation. The symbol automatically
provides the references to the tags beneath this branch.
For symbols with large amounts of animation, this is a large productivity gain. With this
functionality, you can quickly create the mimic shown in the following graphic. All the work is
put into the first symbol. You cut and paste this symbol multiple times and then change the
name of the branch to identify a different set of tags for the symbol to reference.
The number of hierarchy levels that can be defined is limited only by the maximum length of
the FactoryLink tag name (32 alphanumeric characters).
The mimic shown in Figure 5-1 can be built quickly using branching functionality.
With scripting, you can change the name of the branch at run time. For example, the pump
symbol and buttons can be combined and can be used to show the data for various pumps on
one mimic. The difference is that the operator must press the Previous and Next buttons to
view the data from the other sets (branches) of pump tags. The name of the branch can be
specified on a mimic open action so the same mimic can be opened from different buttons and
the data displayed would be from the branch specified in the mimic open action.
Combining the above functionality with application objects provides a powerful configuration
environment. Application objects provide the ability to define a set of tags as a class (class and
branch are synonymous) and instantiate this set of tags many times.
To maintain the system, the user changes the class definition, and all instances are updated
automatically. The same is done for symbols. Any change made to the symbol automatically
takes effect the next time the user opens the mimic.
One of the most powerful functions of this feature is for applications that use application
objects to generate their tags. The application objects can be configured to generate tag names
that reflect the object hierarchy, which can then be seen easily from the Variable Browser.
You can group all the symbols on a mimic into a complex symbol that also supports this
functionality.
In this view, notice that the tag selected is PmpStation1_Pump_Speed, as shown in the
Selection field. As you open each branch, you see the next level. In Figure 5-3, the branch is
expanded so that you can also see PmpStation1_Pump_Speed_SP.
Figure 5-3 Branched View Next Level
Branching makes finding tag names much faster because they are organized your way. You are
presented with a structured view rather than a large flat list of all tags in the system.
To attach the symbol to the branch, just select a branch in the Local list. The Branch Browser
(Figure 5-6) appears. Notice that there is no leaf pane in the Branch Browser. Just select the
branch to complete the animation. After the branch substitution, re-open the symbol and you
will see that the concatenation is finished and the object is finished.
Figure 5-6 Branch Browser
You can now reuse this symbol everywhere in your application without animating the details
each time. This provides a method to ensure a common look-and-feel for your graphics. Also
remember that if you change the symbol, every reference to that symbol will change
throughout the application. For example, if later you find out that yellow for fault is a bad
choice and you change it to red, everywhere this symbol is used gets corrected automatically.
The Examples Application contains an example of branching on a mimic. The Link/Run mimic
contains three branch buttons that open the same mimic with different tags using the Link
Open animation. Figure 5-7 shows the branch name specified in the branch field.
Figure 5-7 Branching in Examples Application
In this case, all of the animations on the pop-up mimic have the Branch1 branch specified. For
animations that you do not want to use this branch, specify the entire Cluster:@TagName. The
@ character tells Client Builder to not branch this animation, as shown in Figure 5-8.
Remember that each branched mimic is a unique copy, so when you close the mimic, you must
specify the branch. If you want the system to use the current branch, you can use the *
character to use the current branch for this operation. You can also use the * to specify
branches when passing the mimic branch to a symbol in a branched mimic.
Figure 5-9 Using Shortcuts in Branching
Branching Shortcuts
This table contains useful shortcuts for branching.
This example uses #2 and #D as a tooltip in a send bit animation. This Start/Stoptext object has
a button style aspect and a Bit Send animation for the digital tag PUMP_NZ804. In the
Comment field, the @ symbol is used so that the text and substitutions that follows will show
on the object at run time as a tooltip.
-1 Area1_Pump2_[4]_[3]_[2]_Flow
-2 Area1_[4]_[3]_[2]_Pump2_Flow
-3 [4]_[3]_[2]_Area1_Pump2_Flow
-4 or more [4]_[3]_[2]_Area1_Pump2_Flow
FactoryLink auto-generates a second tag name for each tag array by moving the array index
before the last branch in the tag name or to the front of a non-branched tag. Branch separators
are inserted before and after each dimension. Since array braces are only allowed at the end of
valid tag names when they are being defined, there is no risk of this second auto-generated tag
name conflicting with another tag.
The examples in the following table show how various array tag naming conventions are
presented in Client Builder’s Variable Browser. In non-branched tag names like PumpSpeed[x]
and ValveState[x], properties are grouped in the same leaf.
Valve_FlowRate[x] Valve_[x]_FlowRate
Valve_State[x] Valve_[x]_State
Client Operation
For a FactoryLink client to run, it must either obtain a license from a FactoryLink license
server or consume a valid stored license. You can define multiple license servers. Having
multiple license servers ensures against the possibility that a license server may:
• Not be operational (not installed or started)
• Deny a client a license
• Lose communications with a client after granting a license
Users can configure all FactoryLink clients on a common PC to automatically obtain a license
from a list of FactoryLink license servers. Under this configuration, if a license is not granted
because no CALs are available or a communications problem exists, the next server in the list
is used. This process repeats itself until a license is obtained. If all license servers are in use
and no license was granted, the client resorts to using a stored license. If the stored license is
unavailable or expired, the client will not run.
Whenever a client starts, it always attempts to obtain a license from the top of the license
server list. The license servers in the list must not be redundant partners. If the servers have a
redundant partner, the list will reflect the appropriate pairings in consecutive order.
Once a license is obtained, it is stored in the client’s local registry. The client periodically sends
a heartbeat message to the license server. If the heartbeat fails due to the loss of contact with
the license server, the client will attempt to get a license from the next license server in the list.
See the Utilities Guide for instructions to configure redundant licensing for client operation.
Non-Redundant A license server grants licenses based solely on the number of CALs
Mode authorized for that FactoryLink server. No modifications to the original
authorized CAL counts (run time or design time) are performed. A license
server operates as it always has prior to any redundancy modifications.
A non-redundant license server ignores any messages from another
license server that attempts to send any synchronization messages. For
example, one license server configured for redundancy refers to a partner
that is not configured for redundancy.
Redundant A license server can compute CALs and grant CALs based on redundancy
Mode guidelines. The license server can also perform check-out and check-in
operations and inform its partner of a change in its license inventory.
Each partner in a redundant pair will compute a new maximum amount of
CALs for both run time and design time. The computation is made when
both license servers start up and begin to communicate with one another
for the first time and when synchronized messages are exchanged. The
CALs on each server are synchronized after each operation. After a
successful synchronization is performed, a license server stores its
partner’s CAL information in the local registry.
The redundant operation is configured using the License Utility.
Redundant licensing is limited to a pair (two servers) of license servers.
Each of the servers must designate each other as a partner.
See the Utilities Guide for instructions to configure redundant licensing for license server
operation.
This scenario explains a single system operating in non-redundant mode. A single system is
the simplest system available. On a single PC, a user initiates a FactoryLink System install.
One or more FactoryLink clients can be attached to the server PC. Clients (local or remote)
configure their licensing source to be the same PC as the FactoryLink server. No redundant
licensing is involved because only one license server exists.
Remote Client
Builder
Local Client
Builder
FactoryLink Serverwith
FactoryLink Server withLicense
License Server
Server
This scenario explains multiple application servers operating in non-redundant mode. Two or
more FactoryLink application servers are on the network. The applications are stand-alone and
not redundant (not using VRN). The license servers are also not redundant. Each server system
was purchased individually and CALs were purchased as needed.
The users began to create larger applications, where multiple users (remote clients) may need
to access the data. Additional CALs may be purchased per server as the need arises to allow
the clients access.
In this scenario, redundant licensing is not applied but a subfeature of it applies. That
subfeature permits the client to maintain an ordered list of license servers. A client will contact
each license server in the list until it can obtain a CAL. If no server in the list can grant a CAL,
the client will start using its stored license (provided one exists or is not expired).
Server
List
Server1
Server2
Client
Primary Alternate
License License Server
Server if Server1 fails
FactoryLink
FactoryLinkServer1
Server1
FactoryLink
FactoryLinkServer2
Server2
Two redundant application servers and redundant license servers are on the network. A total of
10 CALs were purchased. The user has split the licenses on the two servers (for example, five
CALs on each or a combination). Up to 10 (and no more) separate clients may attach
themselves to one or both of the servers. Because the license servers are running in redundant
mode, they share knowledge of the CALs each can support and each server will make sure that
a maximum combined total of 10 CALs will be consumed.
If one of the FactoryLink license servers fails, its redundant partner will still support a
maximum total of 10 client connections.
FactoryLink Server1
FactoryLink Server1
CAL synchronization
FactoryLink Server2
FactoryLink Server2
Complex Servers
Operating Guidelines
License Server The maximum number of client licenses that can be granted is no more
Running in than the amount purchased for that specific server. For example, if a
Redundant Mode system was purchased with 3 CALs, no more than 3 distinct clients (each
from a separate PC or third-party clients) can be running. Multiple clients
from the same PC are counted as 1 consumed CAL.
Redundant A redundant license server may define a partner, but the partner cannot
License Server refer to it in return. In this case, one license server will attempt to send
Configured for the synchronization messages to its supposed partner, but the supposed
Wrong Partner partner will ignore the synchronization messages.
Redundant If a redundant license server loses the connection to its partner, the server
License Server will continue to grant up to the combined CALs that the two servers
Loses its Partner established during the last synchronization.
For example, if the combined CALs equal 3, the surviving partner will
grant no more than 3 CALs for the duration of its operational lifetime.
This includes the fact that the surviving partner may restart repeatedly.
After 10 days of server operation any attached clients will get an
informational pop-up message indicating the situation. The user only
needs to acknowledge the message. The user's client application is not
hindered in any way. The pop-up message will appear when a client first
connects, and while connected, at 12 noon every day thereafter.
Redundant If a redundant license server starts and its partner is not operational, the
License Server license server will use the combined CALs that are stored in the local
Starts With No registry.
Partner After 10 days of server operation any attached clients will get an
informational pop-up message indicating the situation. The user only
needs to acknowledge the message. The user's client application is not
hindered in any way. The pop-up message will appear when a client first
connects, and while connected, at 12 noon every day thereafter.
D ATA L OGGING
As data is collected or computed by FactoryLink, it is stored as a tag with a unique tag name in
the real-time database. Each time data for a tag is collected or computed, the new value is
updated in the real-time database, overwriting the old data. This data can be retained by
logging it to a historical database so that it can be reviewed, compared, or analyzed.
The major aspects of the data logging function are described as follows:
Schema Relational databases are configured in a table format consisting of rows and
columns. The structure of a table (the number, size, and content of the rows and
columns) is defined by its schema. When configuring a database you must
specify which tags are to collect values and where to place the values: which
database, table, row, and column.
Historian Serves as an interface between the FactoryLink real-time database and the
external relational database to which information is sent or retrieved.
Logger FactoryLink has two logging tasks that can read data from the real-time
database and send it to the relational database using a historian.
Data Point • Simplifies the task of logging data by providing
Logging preconfigured tables. Multiple shared numeric-value
tags can be stored in the same database and sorted later
if necessary.
• Allows the addition or removal of tags from the list of
tags being logged during run time.
• Builds a database that will capture date/time, tag name,
and tag value for the specified tag.
• Best suited for situations in which the tags that are to be
logged do not need to be grouped together.
Database • Allows you to create a table and specify which tags to
Logging capture in that table. When the value of any tag
changes, the values of all tags in the table are logged.
• Provides the ability to group tags in a database table.
• Event-based data can be logged using a sequence key
rather than a time key.
For example, if you had a tank in which you were monitoring the process temperature and had
a single probe in the tank, you would probably use Data Point Logging to track the tag value. If
you had six probes in the same tank, and you wanted to see the value returned form each probe
at a given point in time, you would probably use the Database Logging task.
D ATABASE B ROWSING
FactoryLink provides several ways to browse relational databases at run time:
• Database Browser Control in Client Builder
• PowerSQL task running on the FactoryLink server
• Database Browser Task running on the FactoryLink server
For detailed information and procedures to use the Database Browser Control, see the Client
Builder Help.
For detailed information and procedures to use PowerSQL, see the Task Configuration
Reference Guide.
Browser Differences
The following three cases demonstrate the differences between using the Database Browser
control and the Database Browser task.
The user looks only at data on the screen and scrolls through a data set. The data does not need
to be returned in FactoryLink tags for additional processing.
The user enters some parameters. A Select is processed and data is returned to the user in a
format suitable for further processing by FactoryLink tasks. The example in Figure 5-1 and the
corresponding sample code helps to explain this process. This example shows selecting an
alarm by Alarm ID or getting a row in the Alarm Log. The Select and the Get Row buttons
have codes associated with them.
The user enters the name of the field upon which to base the select query. The example in
Figure 5-11 browses the alarm history and shows information from a specific group of alarms.
Variable Description
FLINK = flink_dir Where flink_dir defines the full path of the directory containing
the FactoryLink program files.
FLAPP = flapp_dir Where flapp_dir defines the full path, including the drive
name, of the directory containing your application files.
FLDOMAIN = domain Where domain defines the domain you are starting. This can
either be Shared or User.
On single-user platforms, domain is User, which starts both
domains. On multiuser platforms, domain is the domain you
want started in the window. You must specify two windows,
one for each domain.
FLNAME = app_name Where app_name defines the name of the application to start,
which points to the real-time database.
FLUSER = user_name Where user_name defines the logical user name.
FLOPT = opt_dir Where opt_dir defines the full path, including the drive name,
of the directory containing the FactoryLink’s license
information.
SELECT_TIME=xx Where xx is the number of seconds. Used with WebClient and
FLLAN to set the time-out duration for the transmission of a
data packet.
RedundServer=name If using VRN, name specifies the redundant node name
(remote node).
R UN -T IME M ANAGER
The Run-Time Manager orchestrates the run-time environment. It is a FactoryLink task that
runs concurrently with other tasks to start, monitor, control, and shut down the concurrent
execution of all FactoryLink tasks.
The Run-Time Manager reads the System Configuration table to determine the startup criteria
for each task. The Run-Time Manager communicates with each task by sending commands to
and reading status information from the real-time database. Each task must monitor the
command objects so the task shuts down when instructed to by the Run-Time Manager.
The Run-Time Manager interacts with the other tasks within a specific domain through the
FactoryLink application program interface (API) and the real-time database.
Run-Time
SYS.CT Manager
Read Write
FactoryLink
Real-time
Databases
Read Write
FactoryLink
*.CT Application
Tasks
The multi-user architecture allows duplicate User domains by allocating an array of pointers to
database segments for each user. This allows the tag numbers (indices into the pointer array)
themselves to remain the same for each user while referencing a private data area for each user.
Some FactoryLink tasks monitor and control processes, such as a PLC driver task, that require
the process data values be the same for all users. The subset of the real-time database shared by
all users is known as the Shared domain.
Domain Characteristics
Domain Tables
The domain table in Configuration Explorer contains the definition of the Shared and User
domains in the application. The definition of these domains includes the number of allowed
instances as well as domain-wide persistence attributes.
Configuration Explorer has a domain selection feature that must be set before tasks are
configured. The default is Shared. If the run-time domain associations do not match the
configuration domain associations, the application will not run as intended.
Domain Associations
In the Examples Application, default domain associations are made in the System
Configuration Table. These defaults determine which domain (Shared, User, or both) a task is
associated with at run time. You should review the default domain associations during
application planning to verify that they are compatible with current needs. These default
associations may be changed if an application has special requirements.
Domain designations are critically important. Before each task begins to run, the associated
domain is defined as an environment variable. Typically, the task inherits the environment
from the Run-Time Manager when the Run-Time Manager starts the task. This variable must
match one of the previously defined domain values. Two types of domain relationships are
possible:
• A task may be designed to run as Shared. All tables and database tags are associated with
the Shared domain. At run time the task runs as a shared entity with one set of tags for all
users.
• A task may be designed to run as User. You have a private copy (domain instance) of the
task for every user. The tasks may use both the Shared and User Run-Time Database tags.
At run time, all user domain instances are identical when generated. However, individual
user actions are independent, and the resulting data is stored in a real-time database unique
to each operator.
•
•
•
•
Planning Your Application
A well-planned application can make the task of building and maintaining your FactoryLink
application much simpler. This chapter provides some of the basic things you need to consider
when planning your application.
2 Create a complete FactoryLink application (both server application and client project) using
the Application Setup Wizard, as discussed on page 103.
3 Configure the server application component using Configuration Explorer.
• Create and define necessary tags.
• Create and define necessary application objects classes. Instantiate the number of
application objects that you will need for your application.
M ESSAGE TYPES
As part of developing your application, you should consider the types of messages that the
users will see. For example, you may want to distinguish between two types of alarm
messages:
• Those that need immediate attention, such as failure and warning alarms
• Those that can be taken care of later, such as diagnostics and status information messages
S TANDARD I NTERFACE
One standard that often is not considered when designing an application is the concept of
having a standard interface for operators. By taking the time to define a standard interface you
can improve system performance, minimize operator errors, and lower training and
maintenance costs.
The Examples Application provided with FactoryLink serves as a demonstration and practice
application to help users learn about FactoryLink’s capabilities and features. This application
contains a suggested framework for an application, but is fully configurable for those who
want to practice customizing the application. It contains a number of predefined application
objects for standard OPC inputs and outputs.
When you use the Application Setup Wizard to create your FactoryLink application, you
choose from three templates that are variations on the FLNEW template. The FLNEW
template is essentially the Examples Application without the sample mimics. When you use
the Application Setup Wizard, your application will already have basic configuration, which
will have a dramatic effect on the total cost of building and maintaining the application. You
can think of it as a jump start for application development.
The FLNEW templates are preconfigured with the following functionality:
• Screen navigation
• Redundancy
• OPC Data eXchange
• Application objects
• Basic timers
• Multilingual support
You have a choice with FactoryLink: you can start with a completely blank application or you
can start developing on top of an FLNEW template. By using the FLNEW template as the
basis for your plant’s standard application, not only do you shorten development time, but you
make an application that is easy to maintain and build upon for future plant expansions. It also
has the advantage of having a standardized operator interface, so it is easier to move operators
between systems and reduces training requirements.
•
•
•
•
Examples Application
I NSTALLATION
Typical
The Examples Application is installed as part of the typical FactoryLink system installation
and is an optional, selectable component in a custom installation. If the Examples Application
is not installed, it can be installed by rerunning the installation program and selecting only the
Examples Application option. See the Installation Guide for more information.
The Examples Application installs two components:
• A Server Application with an application object database and source file examples
accessed with Configuration Explorer.
Server Application files are installed in this directory:
Program Files\Siemens\FactoryLink\Applications\Examples App
• A Client Project that is opened in Client Builder.
Client Project files are installed in this directory:
Program Files\Siemens\FactoryLink\Applications\Examples App\CBPROJ
2 When client project opens in Client Builder, click Tools > Servers to open the Servers Editor.
S ERVER A PPLICATION
The Server Application runs the server tasks. The Server Application consists of a set of
preconfigured tasks that are commonly used in an industry, such as Alarm Logger, Database
Logger, Historian, Tag Server, and Math and Logic. These tasks provide examples of logging
data for alarm, trend, and browse, as well as generate real-time data for graphic animation
display. This data is accessed by the Client Builder graphics using the Alarm Server and the
Tag Server running within the FactoryLink application, and the Trend Server and Database
Browser Control running from Client Builder.
It is recommended that you periodically save your server application. You can save
FactoryLink applications by one of two methods: platform specific (native) and multiplatform
(compressed). Compressed saves are recommended.
If you need to restore a server application that you saved, you can do it two ways:
• A “compressed restore” is decompressing a single .mps file into a set of server application
files and placing those files in a selected directory.
• A “native restore” is restoring a set of native server application files from one directory to
another directory.
You can restore any server application previously saved as an .mps file. FactoryLink also
provides three sample server applications (in German, English, and French) that you can
restore. These applications reside in the C:\Program Files\Siemens\FactoryLink\Server\MPS
directory.
flnew.mps Suitable for most users. It contains more configuration than the flblank.mps
application and is a typical starter application. It does not contain
demonstration mimics.
When running the Application Setup Wizard (discussed on page 103), you
will choose from three versions of the FLNEW template.
flblank.mps Contains minimal configuration, such as the FactoryLink global system tags.
This file is appropriate for a user who does not want any of the configuration
in the flnew.mps application.
fltest.mps Useful for testing purposes of most FactoryLink common tasks.
You can restore a server application using Configuration Explorer or the FLREST utility. The
FLREST utility can be accessed from Windows Explorer or a command prompt. The utility
restores the application and then adds it to Configuration Explorer’s namespace so that
Configuration Explorer can recognize the application.
Note: When restoring a server application in the same directory with an existing
application of the same name, the restore deletes and replaces the existing application.
Be sure to archive any server applications that you want to keep.
Note: The FactoryLink client installation installs a set of clip art images (if you select
them) in the FactoryLink\Common\Client Builder\Shared Libraries directory. To use these
clip art graphics, you copy them into your new Client Builder project.
The FactoryLink installation placed two Client Builder icons on your desktop: Client Builder
and Examples Application Client Project. The Examples Application Client Project icon
immediately opens the Examples Application’s client project. The Client Builder icon allows
you to select the project you want to open.
Client Builder opens the client project at the logo screen, which contains buttons that allow
you to start and stop the local server without having to go to Configuration Explorer. If Client
Builder is pointed to a server other than the local server, these buttons will not start and stop
that server.
It is recommended that you periodically save your client project. When a client project is
saved, it is automatically compressed into a single file with a .cba extension.
You can restore any client project previously saved as a .cba file. FactoryLink also provides
sample client projects that you can restore. These projects reside in the C:\Program
Files\Siemens\FactoryLink\Applications\Compressed directory.
ExamplesApp.cba A reference application that contains sample mimics where you can
learn about techniques and best practices.
CBPROJx.cba Applications typically used by the Application Setup Wizard
templates.It does not contain sample mimics.
CBPROJA – shows a menu at the top of the Client Builder screen.
CBPROJB – shows a menu at the left side of the Client Builder screen.
CBPROJC – shows a menu as a square in the upper left corner of the
Client Builder screen.
When a client project is restored, it is uncompressed from the .cba format into a multiple files
project. A client project must be restored from its compressed .cba format before it can be
opened.
ActiveX Controls
The following examples use the FactoryLink-supplied ActiveX controls.
Control Example
Trend • Pen Groups – Displays a trend chart of historical and real-time data. The
pens (lines on the chart) are plotted for three pen groups.
• Scripted Pens – Displays a trend chart with a tag configured as a dynamic
pen.
• Compressed Logging – Shows four ways of using compressed logging.
The structure of the pens appears the same, but the amount of data logged
to the database is significantly different.
• Real-time Trending Only – Displays a trend chart of real-time data
Alarms The Alarm Viewer provides a visual display of run-time alarms in active states,
but not yet acknowledged. The Alarm Viewer is configured from the same
ActiveX control. It can display up to three alarms and is often used to show the
most critical or newest alarms. Clicking the Alarm Banner takes you to the
screen name in the Area Name field. You can copy this configuration into your
project and it works automatically.
Browse • Data Point Logging – Shows a historical database where one point is
logged at a time to preserve data for historical purposes.
• Database Logging – Shows a historical database where blocks of data is
written to preserve data for historical purposes.
• Operator Log – Displays a log of all changes (events) made by an operator
of a FactoryLink application.
• Recipe Management – Creates and edits recipes (a collection of tags
grouped together) for some purpose.
Animation Description
Color Color fills any drawn object, bargraph, or legend by using a bit or numeric
register value
Text Displays messages, labels, or numeric values
Symbols Selects predrawn objects from a library by using a bit or numeric register value
Position • One-axis – Moves an object relative to its original position in X- and/or
Y-weighted directions using one register value linked to both axes
• Two-axis – Moves an object relative to its original position in X- and
Y-weighted directions using a separate register value for each axis
• Free – Moves an object to absolute coordinates in X and Y directions using
a separate register value for each axis
• Path – Moves an object along a path defined by a line or polyline
• Rotation – Rotates an object through an angle range relative to a register
value range
• Scaling – Scales an object through a percentage range relative to a register
value range
Send Writes values to bit, numeric, or text registers
Link/Run Link – Opens or closes graphics, connects to an external document (like a Word
file) or URL, and views or edits a text file as a note
Run – Launches an external program
Task Starts and stops tasks and indicates status
Feature Description
Layers Different sheets on the same graphic used to group objects that can be seen
when the Layer toolbar is used to select a layer number or the Layers value
is set by script
Decluttering A template that allows layer visibility based on zoom levels
Visibility bound An object property that defines object visibility based on zoom range
VBA scripting A single object or a grouped object script file that executes event-based
subroutines
Function objects Examples of library symbols that can be created with local register
variables for substitution with tags after inserting the symbol
Waveforms Uses function generators (such as sawtooth, triangle, square, sine, and
random) to simulate factory floor data. This mimic provides a snapshot of
the waveform as if it were generated from a real device connected to a
PLC.
Tag Properties Shows how to use tag properties in animations
Branching Shows how to use branching with symbols and animations and to open
mimics
•
•
•
•
Application Setup Wizard
The Application Setup Wizard provides a quick and easy way to create a FactoryLink
application that contains basic configuration. This wizard steps through choices such as
database setup, and allows the selection for one of three templates to create both the server
application and client project.
Available in Configuration Explorer, the Application Setup Wizard has the following
functionality:
• The wizard prompts for the name and location of the combined project (server and client),
the type and location of the historical database, the template project to be restored, and the
primary and secondary node servers.
• The wizard creates both the client project and the server application at the same time using a
template that can be modified. (The wizard lets you choose from three templates that are
variations of the FLNEW template, each with a different interface format.)
• The client project is restored to a subdirectory under the server application directory, thus
more closely associating the client and server components of the FactoryLink application as
one project in a single directory.
• The client project automatically connects to the server created in the same project.
• The wizard automatically sets up the run-time and design-time Tag Servers including update
rate, sets up the FactoryLink NameSpace database, adds the FactoryLink application to the
NameSpace database, and associates the client project with the server application.
• The feature is extensible so companies can use their own applications to create custom
templates that can be added to the wizard.
To access this wizard, right-click your FactoryLink Server name and select the Application
Setup Wizard. The Configuration Explorer Help provides detailed information about using this
wizard. The FactoryLink Tutorial contains an exercise that lets you practice using the wizard.
General Objects
To use one of the application objects, just drag the object from the Application Objects folder
to the Application Object Instances folder. This generates the configuration tables included in
that object.
For example, drag the FLDBLogSetup object to the Application Object Instances folder. The
FLDBLogSetup object displays the following dialog box:
In this dialog box, you choose the log rate for the database points that you will log for this
table. Choose either seconds or minutes, but not both. This creates an instance of this object.
To log points at different rates, add instances to this object by right-clicking the object in the
Application Object Instances folder and selecting Add Instances.
It is much easier to use this application object than to fill out all the tables manually.
If you choose the ODX example, be sure to run the VRN setup and choose the ODX/ECI
choice for proper redundancy and mailbox setup. Make this choice even if you are not going to
use redundancy.
•
•
•
•
Getting Help
•
•
•
•
FactoryLink Directory
Organization
FactoryLink applications can be installed on any appropriate drive. However, for the purposes
of this document, installations are assumed to be on a C:\ drive.
When you install FactoryLink, the installation program creates six directories under Program
Files\Siemens\FactoryLink. The directories are Applications, Client, Common, Documentation,
Installs, and Server.
•
•
•
•
Real-Time Database and Tag
Structure
The real-time database is the area of the Kernel’s shared memory used to store the current
value of the application tags. It exists only in memory and does not persist between subsequent
invocations of the FactoryLink system.
Tag Structure
A tag consists of the following items:
• One or more bits containing the value
• Set of change-status bits (change-status word)
• Set of wait bits (wait-status word)
• Set of reserved bits
FactoryLink preallocates a single bit to each potential client task in each of these status words.
Each domain instance has potentially 31 possible processes. The 32nd bit is a digital tag value
or unused.
Change-Status Bits
For each tag, one change-status bit exists for each potential client process. The read-call and
write-call functions use the change-status bits within the FactoryLink Kernel to indicate
changes in a tag value. The value of the change-status bit can be either ON (1) or OFF (0).
The read-call function always returns the current value of the tag to the calling process
regardless of the value of the tag change-status bit assigned to that process.
When a task makes a change-read call, the reading task requests change-status information
about specific tags. If the function finds that the change-status bit of a tag has been set since it
was last read, the function informs the calling task it has found a changed tag and returns the
value of the first changed tag found. If the change-status bits have not been set since the last
read for any of the specified tags, the change-read call function returns a code indicating this to
the calling task. This method blocks the calling routine’s processing for less time than reading
and comparing the values of all the tags.
When a task makes a change-wait call, the reading task uses the change-wait call function
within the Kernel to request change-status information about specific tags. Once a task makes
its call, the task then hibernates while waiting for a tag to change. When a task is asleep, it uses
no CPU cycles. The task wakes when any one of the specified tags have changed and/or have
had their change-status bits set to 1 (ON) by another task since the last reading. In other words,
this call blocks the calling process until at least one of the specified tag’s change-status bits are
toggled.
Regardless of the method used to read a tag, the act of reading a tag resets the tag change-status
bit associated with the reading task to OFF by writing a 0 to the task change-status bit in the
tag. As successive tasks read a tag, they toggle the change-status bits in the tag, one by one, to
OFF.
The Kernel maintains the change-status bits in a manner transparent to the tasks; however, you
can use these bits in the Math and Logic task.
For example, you can write a Math and Logic procedure that uses the operator to determine
whether the value of a tag has changed and then take an action.
Because the Kernel does not perform the write, the change-status bits for Tank1 remain zero.
Therefore, no tasks are notified to perform a read of Tank1.
Example 2
IML performs its calculation and the result is 20. IML makes the normal write call to the
database, and the Kernel compares the current value of Tank1 (10) with the new value from
IML (20). Because the old and new values are different, the Kernel writes 20 to Tank1.
Because the Kernel performed the write, it sets the change-status bits for Tank1 to 1.
Therefore, the Kernel notifies any tasks waiting for a change on Tank1 that they should read
the new value.
TAG S TRUCTURE
If you could see a tag, you would see that it consists of a number of bits. Excluding the bits
required for the tag’s value, each tag, regardless of its data type, has the same basic bit
structure.
This illustration shows the basic bit structure for each tag in the real-time database.
4 Bytes--Change-Status Bits
Change-Status Bits
Change-status bits enable FactoryLink to operate based on exception processing. Exception
processing means that tasks do not access the database to read a tag’s value unless the tag’s
value has changed since the last time it was read.
Each FactoryLink task is assigned to a change-status bit. The task looks at the same bit in each
tag you define. (The diagram above is only an example. The order in which the tasks are
assigned is irrelevant.) The value of the bit determines whether the tag’s value has changed.
The bit is set to either 1 (ON) or 0 (OFF).
Additional bytes are required to store the mailbox messages and the number of messages.