Rockwell FactoryTalk User Manual

FactoryTalk Transaction Manager
Student Manual Version: September 15, 2016
For Rockwell and Partner Use Only!
Copyright © 2015 Rockwell Automation, Inc.
This page intentionally left blank
2 of 74
Table of Contents
FactoryTalk Transaction Manager ................................................................................................................ 4
Introduction to FactoryTalk Transaction Manager ................................................................................... 10
Configurations ...................................................................................................................................... 10
Configurations that use online edits ..................................................................................................... 10
Monitor configurations.......................................................................................................................... 11
Control connectors ............................................................................................................................... 12
Enterprise database connectors .......................................................................................................... 13
Enterprise application connectors ........................................................................................................ 14
Transactions ........................................................................................................................................ 14
Lab 1: Creating the FTTM_Training Database ........................................................................................ 19
Part A - Creating a Database Using SQL Server Management Studio ............................................... 19
Lab 2: Creating a FactoryTalk Transaction Manager (FTTM) Edit Enable Application ......................... 23
Lab 3: Editing a Running FactoryTalk Transaction Manager Edit Enable Application ........................... 41
Lab 4: Bidirectional Transaction with Bind Transaction Result Option .................................................. 46
Part A - Adding an FTTM Data Object ................................................................................................. 46
Part B - Adding FTTM Data Points to a Running Configuration .......................................................... 48
Part C - Adding a FTTM Transaction to a Running Configuration ....................................................... 50
Lab 5: Discussion of FTTM Errors and Data Buffering/Loss .................................................................. 56
Part A - Setting Up the VM-Image Desktop ......................................................................................... 56
Part B - Enterprise Connector Failure .................................................................................................. 57
Part C - Database Connection Failure ................................................................................................. 60
Lab 6: Using FTTM Stored Procedures .................................................................................................. 65
Part A - Adding a FTTM Data Object ................................................................................................... 65
Part B - Adding the Machine Setup Data Points .................................................................................. 66
Part C - Adding the Machine Setup Transaction ................................................................................. 68
3 of 74
FactoryTalk Transaction Manager
What you will learn:
Configuring a FactoryTalk enabled application  Selecting the connectors  Configuring the connectors  Adding FactoryTalk data points  Creating a data object  Creating a unidirectional transaction  Running and monitoring a FactoryTalk Transaction Manager (FTTM) application  Using stored procedures in a FTTM transaction
4 of 74
5 of 74
6 of 74
7 of 74
8 of 74
9 of 74

Introduction to FactoryTalk Transaction Manager

Configurations

A FactoryTalk Transaction Manager configuration consists of a set of user-defined transactions that use control and enterprise connector services to perform required tasks. A configuration contains information that is crucial to the successful exchange of data between an industrial control system, FactoryTalk Transaction Manager, and an enterprise database system. You may create numerous configurations in FactoryTalk Transaction Manager, but the Transaction Manager service can run only one configuration at a time. Therefore, all the transactions required to implement an application must be included in a single configuration.
You can create a FactoryTalk Transaction Manager configuration by using the Configuration Checklist, which is designed to easily walk you through the steps required to create a configuration. Refer to the Configuration Checklist topic in the online help for further details.
Tip: FactoryTalk Transaction Manager also has the ability to change data points and transactions in a configuration while it is running. This type of configuration is a configuration that uses online edits. For more information, see Configurations that use online edits.

Configurations that use online edits

You can make changes to data points and transactions in configurations that use online edits while they are running. These changes are referred to as pending edits. In a configuration that use online edits, the Transaction Control Manager is used instead of the Transaction Manager service.
Transaction Control Manager is a service similar to the Transaction Manager, but with the additional functionality of the FactoryTalk Live Data control connector embedded in it. In a configuration that use online edits, the Transaction Control Manager replaces the separate Transaction Manager and control connector services.
Keep in mind the following guidelines while you are working with configurations that use online edits. In a running configuration that uses online edits, you can:
create new and modify existing data points  create new and modify existing transactions  enable and disable transactions  save and assemble pending edits  view differences between current transaction definitions and transactions with pending edits
In a running configuration that uses online edits, you cannot:
modify configuration properties  modify error logging properties  add new, modify, or delete existing enterprise connectors  modify enterprise or control connector properties  use any control connector except FactoryTalk Live Data
Tip: Additional FactoryTalk-related overview, task, and definition information can be found in the online help for the FactoryTalk Administration Console.
10 of 74
modify database connection properties  add new, modify, or delete existing data objects  modify a starting or stopping event definition  change data point names or modes  delete data points  delete transactions (although you can disable them)
If you have a running configuration with pending edits and then stop it, you cannot make any further changes to those items with pending edits until you cancel or assemble the pending edits.

Monitor configurations

You can monitor transactions as they are executed while your configuration runs. Click Transaction Monitor on the toolbar for a summary of cumulative activity by transaction. The Monitor automatically updates, but you can manually update it by clicking on a column heading.
Tip: Click any column heading except Total to resort the listed transactions.
The following columns display in the Transaction Monitor view:
Total --Total number of transactions that have been triggered.  Passed -- The number of completed transactions without errors.  Failed -- The number of failed transaction.  % Passed -- Passed/Total * 100  Cached -- The number of transactions currently in Cached Transaction files.  Database Passed -- The number of transactions that have been successfully executed by
the database.
Database Failed --The number of transactions that have experienced a database error.  Pending -- The number of transactions that have been started but not completed.
11 of 74

Control connectors

The control connector services in the FactoryTalk Transaction Manager facilitate the exchange of data between the Transaction Manager service and the industrial control systems, such as programmable logic controllers (PLC) or HMI servers. The Transaction Manager service communicates with the data server (DDE or OPC) using one of the following control connectors.
FactoryTalk Live Data
FactoryTalk Transaction Manager uses FactoryTalk Live Data to communicate with FactoryTalk Live Data servers, such as RSLinx and FactoryTalk View SE. FactoryTalk Transaction Manager connects to the FactoryTalk Directory, which allows FactoryTalk Transaction Manager to browse the available data items within a FactoryTalk application. Rockwell Automation, Inc. recommends using the FactoryTalk Live Data control connector for most user applications.
Dynamic Data Exchange (DDE)
The DDE control connector service is provided for legacy connections to DDE servers or to provide functionality that is not supported by the OPC specification.
RSLinx Classic OPC
The RSLinx Classic control connector service is the preferred method to use when browsing for data tags that reside in Allen-Bradley Programmable Logic Controllers (PLC), except for the ControlLogix processors. You should use Generic OPC or FactoryTalk Live Data control connectors with ControlLogix processors.
RSView32
The RSView32 control connector service is used to interface with tags provided by RSView32 applications. The RSView32 control connector must be installed on the same computer on which the RSView32 project is running.
Generic OPC
The Generic OPC control connector service is used to interface with items provided by any OPC server that conforms to OPC interface specifications.
Tips: Please keep the following in mind:
These control connectors are Windows 2000/2003/XP services that support bidirectional
transactions.
If the configuration uses online edits, the Transaction Control Manager service communicates
only with the FactoryTalk Live Data connector.
12 of 74

Enterprise database connectors

The Connector Definition dialog allows you to define the following enterprise database connectors:
ODBC connectors
The ODBC enterprise database connector allows you to interface with virtually any ODBC-
compliant database including Microsoft Access, MS SQL Server 6.5 or later, DB2 or Sybase.
When you create an ODBC database connection, you must enter a valid system data source
name (DSN) for the ODBC server. A system DSN is available to all users and Windows 2000/2003/XP services while a user DSN is available only to the user who configured it. The ODBC enterprise connector requires a system DSN to connect to an ODBC data source.
If the FactoryTalk Transaction Manager user interface resides on a computer that is remote
from the computer(s) containing the enterprise connector(s), you must provide a connection for the target database on both computers and they must have the same name. This connectivity is necessary so the enterprise connector can send data to the database.
OLE DB connectors
The Microsoft OLE DB enterprise database connector should only be used for interfacing with
Microsoft SQL Server 2005 (Service Pack 1) Standard. Microsoft OLE DB allows you to browse a SQL Server 2005 database without a data source name (DSN) and is the preferred method of connection.
OCI connectors
The Oracle Call Interface (OCI) enterprise database connector allows you to connect to
database objects from an Oracle server. If you are using Oracle OCI in FactoryTalk Transaction Manager, you need to install SQL*NET 2.3x or later, Net8, or Oracle Net services (all from Oracle) locally. You can then connect to an Oracle database versions 8.1 through 10g R2.
Tip: When using an OCI enterprise connector, ensure that you have local administrator
privileges on your computer. Either add the OCI enterprise connector user to the local administrators group in Windows, or change the user of the OCI enterprise connector to an existing user that has administrator privileges.
Once you have defined an enterprise database connector, you can create data objects in FactoryTalk® Transaction Manager that point to a table or stored procedure. Then, after you have defined the data objects, you can use them in FactoryTalk Transaction Manager transactions.
Tip: In a running configuration that uses online edits, you cannot add new, modify, or delete existing enterprise connectors.
13 of 74

Enterprise application connectors

The Connector Definition dialog allows you to define the following enterprise application connectors:
Microsoft COM+
The Microsoft COM+ enterprise application connector allows you to interface with Microsoft COM+ application components. These components must be integrated into a Windows 2000/2003/XP COM+ environment.
Time-series data compression
This Time-series data compression enterprise application connector compresses data from the control system via a lossless algorithm to conserve space. This connector can only be used by and configured by FactoryTalk Historian Classic.
FactoryTalk Metrics
The FactoryTalk Metrics enterprise application connector is used only with FactoryTalk Metrics and can be configured only through the Service Console. The connector stores data in the Information Services Manager.
You can create new, modify existing, and delete unwanted enterprise application connectors. In addition, you can test a connector and edit it before sending it to the database. You can create a FactoryTalk Transaction Manager data object from the enterprise applications objects.
Tip: In a running configuration that uses online edits, you cannot add new, modify, or delete existing enterprise connectors.

Transactions

Unidirectional transactions
Unidirectional transactions in FactoryTalk Transaction Manager use information from the control system to add records to a database table, update the contents of existing records, or call stored procedures that do not contain output parameters.
Unidirectional transactions are commonly used to log production data to a database, including:
Performance monitoring  Quality analysis sampling  Real-time production information collecting  Material consumption tracking  Product tracking  End of job/batch/shift reporting
Unidirectional transactions are the simplest transaction type. They can be used to perform database Insert or Update commands. They can also be used to perform simple stored procedures, provided no output parameters or return codes exist. In most applications, unidirectional transactions account for the majority of transaction volume. Data may be collected frequently from a large number of data points.
14 of 74
Bidirectional transactions
Bidirectional transactions in FactoryTalk Transaction Manager take data from the control system and call a stored procedure that exercises some logic, and then provides the software with output values that can be written back to the control system. You can also set up bidirectional transactions so that data is not sent to a database, but only downloaded from a database to a control system.
This transaction type is the most powerful because it allows transactions to interact with a database stored procedure or Microsoft COM+ method. This capability makes it possible for FactoryTalk Transaction Manager to perform functions that were previously possible only through custom application development. Applications that are possible with this type of transaction include:
Product parameter downloading  Dynamic routing  Dynamic production scheduling  Controller centralizing  Production floor interacting  Automated storage and retrieval warehousing
A bidirectional transaction with input/output bindings implements a data transfer from the enterprise system and sends it to the control system, binding database stored procedure input and output parameters. The control system data serves as input to a stored procedure. The results of a stored procedure can be written back to data points in the control system (enabling the creation of sophisticated transactions that allow a high degree of interaction between a database system and the factory floor).
Transactions with output bindings must use the Real Time Thread Storage option on the Transaction Definition dialog because the procedure or method must complete before data can be returned to the Transaction Manager service or Transaction Control Manager service. FactoryTalk Transaction Manager allows you to specify the number of database threads used by a connector to improve performance.
When creating a transaction using input/output bindings, parameters are bound in the same manner as columns in a table. The input data points are collected, any expressions are evaluated, and the procedure is called. If the procedure succeeds, any output parameters are written to the control system.
Transactions with input/output bindings use the following types of parameters:
Input parameters
Input parameters for a stored procedure must have a binding (a data point, expression, or a null). Select a data object parameter, right-click and select either Bind Data Point or Bind Null Value from the menu. A transaction must have all input parameters bound to it before it can be enabled. Binding a null value to an input eliminates the need to gather a value from the database.
Output parameters
Output parameters do not require a binding. The results of the bound value display under the Bound Value column. If an output parameter is not bound or is bound to a null, the value is ignored and this column is empty. A procedure must succeed before output parameters can be returned to the control system. Normally, you bind outputs to a data point in the control system; upon the successful completion of a transaction, a value is written from the stored procedure to the datapoint.
15 of 74
Input/output parameters
Input/output parameters are handled as a single binding unless they are separated using the Separate Input/output option. This option permits separate data points to be bound to the same procedure parameter. This implies that the address from which the input parameter is derived is different from the address to which the output parameter is written. This also implies that if an input/output parameter is used only for output, then the input portion can be bound to a null value. Leaving an input/output parameter bound to a single data point causes the value to be read prior to executing the procedure and the output value to be written upon completion of the transaction.
The Microsoft® SQL Server RETURN_CODE contains data that can be bound as an output to a stored procedure. This value is only available if the procedure executes successfully. A successful return code does not guarantee a successful transaction as the transaction is not yet complete.
Unidirectional or bidirectional transactions with transaction result bindings
A bidirectional or unidirectional transaction with a transaction result binding implements a data value that is written back to the control system; that data value allows you to determine if the transaction completed successfully. The control system can then take appropriate action based on the success or failure of the transaction. For example, consider a high liability manufacturing environment where a verifiable quality record is a requirement for each product produced. At various steps in the manufacturing process, a transaction may send a test result to be stored in a central database. If that test result is not recorded successfully, the part on the production line may become worthless.
The Transaction Result, which notifies the control system that the transaction was successful, is sent variably based on the type of transaction. In a real-time transaction (where data flows straight to the database), the Transaction Result is sent upon data being successfully logged into the database. However in a cached transaction, where a cache is used to ensure data integrity, the Transaction Result is sent once data has been logged into the cache, and not necessarily into the database. The Transaction Result is used to confirm that the test result was recorded. If the Transaction Result indicates the test result was not recorded, the control system can respond appropriately by alerting an operator, changing the part's routing, or retrying the transaction. Some examples may include:
Validated data logging  Closed-loop quality tracking
The Transaction Result Binding option allows a transaction to return a Transaction Result code to the control system. To enable the Transaction Result Binding option, select the Bind Transaction Result check box on the Transaction Definition dialog, then select a data point to accept the Transaction Result code. The control system should take appropriate action depending upon the result of the transaction.
The Transaction Result code is a 16-bit integer. Bit 0 is the least significant, Bit 15 is the most significant. The Transaction Result code consists of:
Bit 0 - Done bit
A 1 indicates the transaction has completed, a 0 indicates that it has not completed. No information is given as to whether the transaction was successful or unsuccessful.
Bit 1 - Error bit
A 1 indicates there was an error, a 0 indicates no error.
Bits 2 through 15 - Error code
16 of 74
If Bit 1 contains a 1, these bits contain the error code. Otherwise, these bits are zeros. If you chose to use the Transaction Result code, you can run the FactoryTalk Transaction Manager error utility by selecting Start > Programs > Rockwell Software > FactoryTalk Transaction Manager > Error Messages. This eliminates the need to decode the integer to determine the error code.
To convert the error code to a proper error number:
1. Select Start > Programs > Rockwell Software > FactoryTalk Transaction Manager > Error Messages. The FactoryTalk Transaction Manager Error Messages dialog appears.
2. Enter the Transaction Result code number (binary or decimal).
3. Click the Bind Transaction Result Error radio button.
4. Click Apply.
For example, a transaction result code of 0000000000000001 (binary) or 1 (decimal) indicates that the transaction has completed without errors.
If the Transaction Result code is: 0000010111101111 (1519 decimal) Then the FactoryTalk Transaction Manager error code is: 33147
Verify transactions
It is important to verify transactions so that FactoryTalk Transaction Manager can check for conflicts between the defined data points and the corresponding data object columns. Click Verify on the Transaction Definition dialog. The Verify Transaction dialog displays.
You may see the following types of information on the Verify Transaction dialog:
errors
Fatal errors that must be corrected before the transaction can be enabled.
warnings
Non-fatal errors that may cause unexpected behavior.
informational
Errors that provide advice about common parameter settings and possible interactive behaviors.
Click Close to close the Verify Transaction dialog and return to the Transaction Definition dialog. The type of verification for the transaction displays in the Transaction Validation group.
In a running configuration that uses online edits, you must save and assemble the data points with pending edits before you verify a transaction (if you wish to use the new data point definitions). FactoryTalk Transaction Manager verifies only transactions with pending edits (if any exist). The transactions with pending edits are verified using current data point definitions (data points that have been saved and assembled).
In a stopped configuration that uses online edits, FactoryTalk Transaction Manager verifies transactions with pending edits (if any exist). If no pending edits exist, FactoryTalk Transaction Manager verifies the current transaction definition.
To verify a transaction on the main FactoryTalk Transaction Manager dialog, select it in the right pane, right-click, and then select Verify Transaction from the menu.
17 of 74
You can verify multiple transactions at once on the main FactoryTalk Transaction Manager dialog by using the Verification Report. Select Tools > Verification Report. On the Verification Report dialog, choose to verify either enabled or disabled transactions or both.
View transaction differences
The Transaction Differences dialog allows you to view the differences between the current transaction definition and the transaction with pending edits. You can view transaction differences after you save pending edits, but before you assemble.
1. On the Pending Transaction Definition dialog, click Show Differences.
2. On the Transaction Differences dialog, select one of the following view options: All
Displays all the parameters and bindings in the current transaction definition and the pending edits transaction definition.
Differences
Displays only those parameters that have been changed for the current transaction and the transaction with pending edits.
Bindings for current data points and data points with pending edits display.
3. Close the dialog.
Tip: You can also access the Transaction Differences dialog from the Pending Edit Alerts dialog.
Pending edit alerts
Pending edit alerts are informational messages about the pending edits you are trying to assemble. Pending edit alerts are caused because some transactions require "state" information (internal buffers that contain information about the current and previous states of the transaction). This state information is no longer valid if certain changes are made to a data point or transaction that cause it to be reset when it is assembled. A transaction that is reset behaves as if it is running for the first time. The conditions necessary for a transaction to be reset are described in detail below.
To review transactions that have pending edit alerts (and will be reset), open the Pending Edit Alerts dialog. FactoryTalk Transaction Manager warns you that the transaction will be reset by displaying a pending edit alert message. If the transaction includes any of the following characteristics, it requires state information:
Ignore First Unscheduled Event (Trigger and Storage Parameters dialog)  Transactions Stores Data On Number of Completed Transactions (Trigger and Storage
Parameters dialog)
Transactions Stores Data On Data Change and/or Rate (Trigger and Storage Parameters
dialog)
Expression using DIFF function (Expression Editor dialog)  Expression using Data Point Range function used in conjunction with the Min, Max, and Avg
functions (Expression Editor dialog)
A pending edit alert occurs if your enabled transaction contains state information and you perform any of the following tasks or change any of the parameters:
18 of 74

Lab 1: Creating the FTTM_Training Database

Part A - Creating a Database Using SQL Server Management Studio

1. On VM-Image1, double-click the SQL Server Management Studio icon.
2. Click Connect.
3. From the File menu select Open > File.
19 of 74
4. From the C:\Class Files\IS Core FTTM DB folder select the FTTM_ISCore.sql file. a. Click Open
b. Click the Execute icon.
20 of 74
5. Verify that the command(s) completed successfully. a. Right-click on Databases and select Refresh
6. Expand the Databases tree and verify that the FTTM_Training database was created.
21 of 74
7. From the File menu select Exit.
This lab is complete
22 of 74

Lab 2: Creating a FactoryTalk Transaction Manager Edit Enable Application

1. From the Desktop, double-click on the FactoryTalk Transaction Manager (FTTM) Icon.
2. If the RA Foods configuration is running (green light), right-click on it and select Stop Configuration.
3. Click Yes.
Note: In the following steps we will be creating a new FTTM application and we can have only one FTTM application running at a time on a computer
4. Click on the Configuration tab and select New.
23 of 74
Loading...
+ 51 hidden pages