You are on page 1of 46

1.

FactoryTalk Transaction Manager


Basic Configuration Lab

Before You Begin

About this Lab


In this lab, you will use a simulated application scenario as a basis for configuring a series of
connections and transactions intended to become familiar with the configuration and primary
functions supported by FactoryTalk Transaction Manager.
In this lab series, you will:
• Build a simple uni-directional transaction configuration
• Modify the configuration while transactions are running
• Enhance the collection of data based on trigger options and real time calculations
• Configure a bi-directional transaction with handshake confirmation

Duration
2 Hours

Prerequisites
The following prerequisite knowledge is recommended in order to complete this lab:
• None

Materials
This lab requires the following items:
☐ Hardware:
☐ None
☐ Software:
☐ Microsoft Server 2016 Operating System
☐ FactoryTalk Transaction Manager v13
☐ MS SQL Server 2016 w/ SQL Server Management Studio

© 2020 Rockwell Automation, Inc. All rights reserved. 1-1


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

☐ Studio5000 Logix Designer


☐ FactoryTalk Live Data source (Logix Echo, Logix Emulate, or Logix controller)
☐ Files:
☐ Machine_1.ACD

CRITICAL PRE-LAB SETUP PROCEDURE


This lab is based on the execution of a Logix project running simulated production lines. The
image contains an ACD file intended to be the source of all FactoryTalk Live Data performance
data. We will be using SQL Server to host and store enterprise transactional data both to and
from the controller.

Control System Data Source Setup


1. We need to ensure that the Logix controller is running. From the Lab Files folder, open
the ‘Machine_1.ACD” project and download it to the Emulator controller in Slot 2. (Echo
IP address 10.0.0.9)

2. Put the controller into Run mode.


3. Next, we will need to define our FactoryTalk Live Data application path. Open the
FactoryTalk Administration Console. Select Network when prompted as FactoryTalk
Transaction Manager can only use the Network FactoryTalk Directory.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-2 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

4. Expand the MyApp  Line1  Mach1  DataServer  Communication Setup in the


tree and connect the ‘Mach1_Ent’ shortcut to the Logix Emulate/Echo controller in slot 2.

IMPORTANT
Please do NOT rename the shortcut. It will be referenced in scripting exercises later, so any
change may effect the outcome of the labs.

5. When finished, click Apply, Yes and OK to accept the new path.
6. Close the FactoryTalk Administration Console.

Enterprise Data Source/Repository Setup


SQL Server is one of the most common enterprise-level database solutions in use today. For
this exercise, we will be using SQL Server initially for storing our control system data. Later, we
will use it as a source of information to be pushed down to the controller. The database, tables
and login user accounts have already been created for you. Let’s verify this now.

7. Open the SQL Server Management Studio. Start  Microsoft SQL Server 2016  SQL
Server Management Studio
8. You will be prompted to log into the instance of SQL Server. Type FTM-SERVER in the
Server Name and press Connect.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-3


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

9. Expand the Databases  FTTM_Training  Tables folder in the Object Explorer.


10. Verify that you have the 3 tables highlighted below.

11. Next, expand the Security  Logins folder from the Object Explorer and verify the user
account ‘FTTM_User’ is listed in the tree.

12. Close the SQL Server Management Studio.

Setup Complete.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-4 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

Lab 1: Creating a FactoryTalk Transaction Manager


Configuration

Objectives
After completing this lab, you should be able to:
• Identify, select and configure Control Connectors
• Identify, select and configure Enterprise Connectors
• Add Data Points
• Create a System DSN
• Add Data Objects
• Create a Unidirectional Transaction
• Run and Monitor a FactoryTalk Transaction Manager Configuration

Background
These skills will familiarize you with the basic steps involved in configuring FactoryTalk
Transaction Manager.
FactoryTalk Transaction Manager creates discrete operations that transfer data from a control
system to an enterprise system and vice versa. For example, a single transaction can download
data from an Oracle database, via a stored procedure, to tags in a ControlLogix processor.
Conversely, a transaction can also send multiple data points from a distributed control system to
a Microsoft SQL Server database to be logged for reporting.
The transaction model organizes the task of data management. FactoryTalk Transaction
Manager’s flexibility provides many options for customizing all aspects of a transaction. The
software can manage many transactions at once, allowing for sophisticated manufacturing data
collection and control applications.
FactoryTalk Transaction Manager
consists of several design-time and run-
time components including:
• Transaction Control Manager
service
• Control Connectors
• Enterprise Connectors
• Configuration Server
• Transactions

© 2020 Rockwell Automation, Inc. All rights reserved. 1-5


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

Configuration Checklist – Step 1


A FactoryTalk Transaction Manager configuration consists of a set of transactions that use
control and enterprise connector elements required to perform the transactions. You may create
many configurations, but the Transaction Control Manager service or the FactoryTalk
Transaction Manager service can run only one configuration at a time. Therefore, all the
transactions required to implement an application must be contained in a single configuration.
The Configuration Checklist lists the required steps and displays the progress of your
configuration. A green check mark indicates a completed step, while a yellow check mark
indicates a partially completed step.

1. From the Windows Start menu, open the Rockwell Software  FactoryTalk Transaction
Manager.

2. From the menu bar, select Configuration  New… This will open the Configuration
Checklist.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-6 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

3. Enter ‘My_FTTM_App’ in the Configuration Name and press the button.

4. In the Path text box enter ‘C:\My_FTTM_App’.

FactoryTalk Transaction Manager can have multiple configurations but only one can be
running at a time. If you have multiple configurations each file MUST have a unique
location folder path, since supporting configuration file names for each configuration will be
identical. If two configurations have the same path, files will be overwritten.

5. Our configuration will allow for online edits, so check the Enable Online Edits box.

You may notice that the FactoryTalk Live Data Control Connector was automatically
selected once Online Edits were enabled. This is because only the FTLD connector
supports this capability. The FactoryTalk Live Data Control Connector allows connectivity
to applications within the FactoryTalk Directory. The FactoryTalk application will contain
the data servers that point to the controllers.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-7


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

Next, we will select the Enterprise Connector option(s).


Enterprise Connectors
An enterprise connector is a Microsoft Windows service that transfers data between the
Transaction Control Manager service or the FactoryTalk Transaction Manager service and
a database. Enterprise connectors can be used to create data objects that reference
elements in an enterprise system, such as tables or stored procedures. You can use the
following types of enterprise connectors:
• Open Database Connectivity (ODBC)
• Oracle Call Interface (OCI)
• Microsoft OLE DB
• Microsoft COM+
• Time-series Data Compression
• FactoryTalk Metrics

The ODBC connector interfaces with virtually any ODBC-compliant database including
Microsoft Access, Microsoft SQL Server, IBM DB2, and Sybase.

The Oracle Call Interface (OCI) connector connects 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 9i through 11g.

The Microsoft OLE-DB connector should only be used in situations where ODBC may not be
supported or connectivity without a DSN is required.

The Microsoft COM+ connector allows users to interface with custom user-defined Windows
COM+ applications components.

Time-series Data Compression connector is used to populate historical data into external
historians such as FT Historian Classic.

The FactoryTalk Metrics connector is only used with FactoryTalk Metrics and stores data into
the Service Console. This connector can only be configured through the (FT Metrics) Service
Console.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-8 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

6. Check the ODBC box in the Enterprise Connector list. This will allow us to connect to a
Microsoft SQL Server database.
7. Press Apply, OK to confirm the changes were successful and Close.

You should now see a green check mark in the box next to Step 1 indicating the steps has
been adequately configured. (If the check mark is missing or yellow, the step is not
complete and you should go back and verify your work)

Configuration Checklist – Step 2

1. Let’s move on to the Connectors. Press the button.


2. Verify the Transaction/Control Manager service is selected from the drop down list.

Control Connector Services manage the interaction between the industrial control
system and the FactoryTalk Transaction Manager service in the FactoryTalk Transaction
Manager. These services, FactoryTalk Live Data and Generic OPC, communicate with the
data server using the appropriate protocol. Rockwell Software recommends using the
FactoryTalk Live Data control connector for Rockwell controllers and OPC for any other
data sources.
You can create multiple control or enterprise connectors in a configuration, but you can
create only one connector of each type on each host computer.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-9


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

Only one instance of the Transaction Control Manager service or the FactoryTalk
Transaction Manager service can be used by a configuration. The connector service uses
the Microsoft Windows username and password assigned to the connector when it runs on
the host computer. In general, control connectors run on the computer that contains the
data server to which they will communicate, but they may run remotely as well.

3. Enter ‘rockwell’ for the password for the FTM-SERVER\Rockwell (Windows administrator)
account and press Apply.

4. Click Yes to confirm the overwrite and OK to acknowledge the change.

5. Next, select ODBC Connectors from the Connector Service drop down list.

Enterprise Connector Services, such as Microsoft OLE DB, ODBC, or Oracle OCI,
manage FactoryTalk Transaction Manager's interaction between a database and the
Transaction Control Manager service or FactoryTalk Transaction Manager service. Each
enterprise database connector service can manage connections with multiple databases
on multiple computers.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-10 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

6. Enter ‘ODBC’ as the Connector Name.


7. Enter ‘rockwell’ as the password for the FTM-SERVER\Rockwell (Windows administrator)
account and press Apply.

8. Click OK to acknowledge the change and Close to complete the Connector configuration.

Configuration Checklist – Step 3


With connections to both data endpoints identified, we can now begin to define the data
that we plan to transmit between the applications. We’ll start with the control system data
points.

1. Press the button.


Data points are specific data locations or registers in the control system that are made
available to one or more FactoryTalk Transaction Manager transactions. Once defined, a
data point can be used by multiple transactions.
If multiple control connectors have been defined, each must be configured individually. In a
configuration with online edits enabled, you can modify data points while the configuration
is running.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-11


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

2. Selection of data points is accomplished by browsing the FactoryTalk application


namespace. Select “MyApp” from the list and press OK.

3. Once the tag browser has opened, expand the tree and select the Line1  Mach1 …..
 Program:MainProgram folder as shown below.

NOTE:
If you do not see any folders appear under the Online folder:
-Verify that your shortcut in the FactoryTalk Admin Console points to the controller in slot 2
-Verify that the “Machine_1.ACD” project has been downloaded to the controller
-Return here and click the button.

4. Using the tag list displayed in the right-hand pane, highlight (Ctrl+click) the following data
points.

• Oven_1_Temp
• Oven_2_Temp
• Oven_3_Temp
• Oven_4_Temp

© 2020 Rockwell Automation, Inc. All rights reserved.


1-12 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

5. Click to populate the selection table at the bottom.

Based on the table above, we will be using the default collection attributes for this exercise, but
it should be noted that there is flexibility in how the control system tag data is collected from the
controller, cached within Transaction Manager, and stored on the enterprise connection. The
following describes the three (3) collection modes supported by the FactoryTalk connector.

SCHEDULED
In this mode, data is continuously on scan at a configurable rate. The data server sends any
change in value or quality to the control connector. The control connector retains the current
value in a buffer and provides it to the FactoryTalk Transaction Manager service when it is
requested. The Transaction Control Manager service also buffers this data internally and uses it
as needed. The data server reads the value of the data point at the Subscription Scan Rate that
is set on the FactoryTalk Data Point dialog box; if a new value is found, it is sent to the data
client. If the value has not changed in the data server, no data is transferred. Typically, this type
of collection mode is used to support a transaction that logs data constantly and rapidly.

DEVICE SCHEDULED
In this mode, each data point is not on scan and data is not buffered in the control connector or
data server. The data server reads directly from the device. Each value is read from the
controller only when the Transaction Control Manager service requests it from the control
connector. The value is then retrieved from the controller and passed to the control connector.
Typically, this mode of collection is used to support a transaction that logs data infrequently.

UNSCHEDULED
In this mode, collection is driven by the data server and each data point is continuously on scan
at the Subscription Scan Rate. When the server detects a change to a data point value or
quality, it sends the value to the control connector, which passes it to the Transaction Control
Manager service or the FactoryTalk Transaction Manager service. This collection mode is
event-based, not time-based and is typically used with a transaction trigger that executes on the
transition of a Boolean tag, or when a value exceeds a valid range.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-13


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

The Subscription Scan Rate sets the fastest interval in which


new data can arrive. For example, if the Subscription Scan
Rate is 150 milliseconds, the data server cannot send
changes faster. If the underlying data value is changing faster,
the control connector only sees the current value every 150
milliseconds. The default setting is 1000ms (1 second).

6. Press Apply and Close.

That was easy! Let’s perform a similar selection on the enterprise side.

Configuration Checklist – Step 4


A FactoryTalk Transaction Manager data object references a specific entity in an
enterprise system. For enterprise database connectors, this object can be a database
table, aview, or a stored procedure. For enterprise application connectors, objects can be a
FactoryTalk Metrics function or a Microsoft COM+ method. A data object may contain
many columns or parameters that are used as a unit. Enterprise database objects can also
include an action, like inserting or updating a record.
The following data object attributes are supported in Transaction Manager:
• Data object name
• Enterprise system connection
• Mode (Insert or Update), if required for tables or views only
• Database tables, views, or stored procedures
• Database columns or parameters

1. Press the button.


2. In the Name text box enter ‘do_FTTM_Training’.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-14 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

3. Select the ellipsis to the right of the Database Connection drop down list.

We will need to define a System DSN because we selected ODBC as our Enterprise
Connector. The System DSN will be used to establish a connection to our MSSQL
database. FactoryTalk Transaction Manager will only work with a System DSN, not a File
DSN nor a User DSN.
4. Select the ellipsis to the right of the System DSN drop down list.

5. Select the System DSN tab and press Add…

6. Scroll down, select the “SQL Server” driver and press Finish.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-15


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

7. Enter ‘dsn_FTTM’ as the name of your System DSN.


8. From the Server drop down list. Select the “FTM-SERVER”. (Be patient as the browser
service loads the list)

IMPORTANT
If you see multiple instances of (local) and the image Server as seen below…

1) Cancel out of the System DSN configuration window


2) Open the Windows services and start the SQL Server Browser service
3) Re-create your System DSN

9. When ready, click Next.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-16 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

10. Change the authentication method to SQL Server authentication.


11. Set the Login ID to ‘FTTM_User’ and the password to ‘rockwell’.
12. Press Next.

NOTE: If you receive a connection error, verify the Login ID and password are entered correctly.

13. Enable the Default Database checkbox and change the Verify the default database is set
to “FTTM_Training” and press Next and Finish.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-17


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

14. Before we move on, let’s verify our connection. Press the
button.

15. Upon successful completion, click OK three times to return to the Database Connection
Definition window.
16. Set the connection parameters as follows:

System DSN: dsn_FTTM


User Name: FTTM_User
Password: rockwell

17. Press Apply and OK to confirm the changes.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-18 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

18. Press Test to test your connection and OK to acknowledge success.

19. Press Close to close the Database Connection Definition window. (Save the settings if
prompted)
After the connection to the database has been configured, we have acccess to the tables,
views, and stored procedures within it. Our next task will be to identify which tables and
which columns we wish to expose. For this exercise, we’ll expose all of the columns in
case we want to use any of them in a transaction.
20. Select the “dbo.t_FTTM_Training” table from the drop down list.

21. Select all of the columns from the list on the left (Shift+click) and click the button to
move them into the Data Object Columns table at the right.

NOTE: You must move over all columns that do not allow Null values. For any columns
that do allow nulls, we have two options:
• Move them over when configuring the data object
• Move them over, but don’t bind them in any transactions

© 2020 Rockwell Automation, Inc. All rights reserved. 1-19


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

22. Press Apply, OK to confirm the change, and Close.

Configuration Checklist – Step 5


The creation of a transaction involves the “binding” of control system data points to columns,
fields, or parameters in a data object. The complete transaction definition also includes options
which control how the transaction executes.
• Transaction Name
• Transaction Timeout
• Transaction Type
• Transaction Status
• Data Object Name
• Bindings of data object elements to data points/expressions
• Trigger/Storage Method

FactoryTalk Transaction Manager supports two types of transactions: Unidirectional and


Bidirectional. For now, we will focus on uni-directional transactions and discuss bi-directional in
a later exercise.

Uni-directional 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 and account for the majority of transaction
volume.

1. Press the button.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-20 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

2. Set the following parameters in the Transaction Definition window:

Transaction Name: tran_Mach1_Oven_Temps


Data Object Name: do_FTTM_Training
Transaction Type: Use Real Time Thread
Transaction Status: Enable

3. Right-click on the String1 row in the table list and select Bind Expression.

4. Once the expression editor window has opened, press the button for the String function.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-21


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

5. In the expression string window, add the text ‘Line1’ and press OK.

This will fix the text “Line1” to the String1 column in MSSQL.
6. Using the same procedure, bind String2 to the text, ‘Mach1’ and String3 to the text,
‘Oven A’.

7. Double click in the open white space in the bottom (table list) pane to open the Filter &
Select window.

8. Drag the data point “Oven_1_Temp” in the Filter dialog over to the Data1 field (row) in the
Transaction Definition window.
9. Similarly, assign “Oven_2_Temp” to the Data2 field and “Oven_3_Temp” to the Data3
field.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-22 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

10. Close the tag filter window and verify you have not assigned a point for the Data4
field. If you have assigned a data point to Data4, please right-click on the data point and
select Delete Binding.
11. We will use an alternative method to bind the last tag. Right-click on the Data4 row and
select Bind Data Point.

12. If your window and column sizes are large enough, you will see and be able to select the
full data point tag name from the list as seen below. Select the ‘Oven_4_Temp’ data
point from the list.

13. Let’s continue on. Right-click on the TransTime field and select Bind Expression.
14. From the Expression Editor window select the TransTimestamp() expression and press
OK.

The Time Functions are not controller data points. They are a collection of pre-defined
timestamp options built into Transaction Manager.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-23


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

15. Using same method, configure TransTime_MS field to display the MTransTimestamp().
16. Verify your transaction definition matches the one below:

So far, we have set up the basic options for this transaction and mapped data point/data
object bindings. Next, we will define the conditions which will initiate this transaction.

17. Press the button on the right.


18. Set the Scan Rate for the transaction to 5 seconds.

19. Press OK and Apply and OK to acknowledge the save was successful.
Your Transaction Validation indicator should read “Valid”.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-24 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

20. If the transaction does not say “Valid” go back and check your work, otherwise, press
Close and verify your Step 5 is complete.

Your Configuration Checklist should now be complete.

21. Click the button to close the Configuration Checklist.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-25


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

Execute a Transaction Configuration


It is time to start the Transaction Manager services and verify that they are running properly.

1. Select your My_FTTM_App configuration in the tree, press the Start button and Yes
to confirm.

2. Once the traffic light to the left of your configuration is green, open the Transaction
Monitor. (This can be done from the View menu or the toolbar)

The important columns to inspect here are the Passed and Database Passed. They
indicate that data is being collected AND that the SQL Server database is also being
populated.

3. Verify that both Passed column values are increasing.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-26 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

4. To verify that data has made its way into the FTTM_Training table, open the SQL Server
Management Studio.
5. In the Object Explorer tree, expand the FTTM_Training database, right-click on the
dbo.t_FTTM_Training table and choose Select Top 1000 Rows to view the data.

Your results table (bottom pane) should look similar to the table below. The most recent
entries will be at the bottom of the table.

End of Lab Section.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-27


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

Lab 2: Modifying FactoryTalk Transaction Manager


Configurations

Objectives
After completing this lab, you should be able to:
• Add data points to a running configuration
• Modify the transaction bindings
• Configure processing/calculation functions (Min/Max/Avg)
• Examine which actions cannot be changed in a running configuration

Background
We have successfully configured and executed transactions. Based on the previous exercise,
transactions continue to run. However, we all know that circumstances change. Your manager
has asked you to include shift data in the data captures. She is also interested in tracking the
minimum and maximum range of oven temperatures during collection.
A configuration that uses online edits allows users to add new data points and transactions as
well as change existing data points and transactions while it is running. These changes are
referred to as pending edits. Configurations with online edits enabled automatically use the
Transaction Control Manager to communicate exclusively with FactoryTalk Live Data servers.

In a running configuration that uses online edits, you can:


• Create new and modify existing data points (except name or mode)
• Create new and modify existing transactions
• Enable and disable transactions

In a running configuration that uses online edits, you cannot:


• Modify configuration properties
• Modify error logging properties
• Add, modify, or delete enterprise connectors
• Modify enterprise or control connector properties
• Modify database connection properties
• Add, modify, or delete data objects
• Modify a starting or stopping event definition
• Change data point names or modes (scheduled, unscheduled or device-scheduled)
• Delete data points
• Delete transactions

© 2020 Rockwell Automation, Inc. All rights reserved.


1-28 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

Modifying a Running Configuration


Let’s begin by adding some new data points to the configuration.
1. Verify your My_FTTM_App configuration is running.

2. From the menu bar, open the Configuration  Checklist and select .
3. Drill down into the Mach1 controller, select the “Day_of_Year” and “Shift” tags and add
them to the list.
The two new tags will appear in Red font as they have not yet been accepted into the
configuration.

4. Select the two rows (Shift-click) and press Save Edits then Assemble Edits.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-29


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

The font color should change from red to black and the data points will be available to be
bound in a transaction.

5. Click Close to complete the Step.


6. Next, we’ll bind these new data points to our SQL data table fields in our running
transaction. Open and select our Tran_Mach1_Oven_Temps transaction
from the drop down list.

7. Press the button on the right.


8. Bind the Shift and Day_of_Year column fields to the tags we just added. (Right-click 
Bind Data Point)

9. Press Save Edits.


10. Before we assemble the changes, let’s take a look at a summary of what has been
changed in the transaction definition. Press the button.
The resulting screen displays both the current and pending transaction parameters and
bindings in tiled windows.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-30 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

Since this is a rather simple transaction with only a few tag bindings, the differences
between the running configuration and the pending are easy to see once you organize the
columns. However, in larger systems, these differences would be much more difficult to
identify. Let’s simplify the display a little more.
11. Select the Differences radio button option at the top of the dialog so that we are only
shown what has been altered in the transaction definition.

12. Next, slide the columns in the Binding area (bottom pane) so that you can see both current
and pending bindings.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-31


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

13. Now that seems much better. When you are satisfied that the two tag bindings are
correct, click Close.
14. Press Assemble Edits.
15. You are prompted that there are differences which generated alerts and asked if you wish
to assemble the edits without viewing the alerts. We’ve already verified the differences,
so we can continue confidently here. Click Yes.

16. Confirm the pending transaction was assembled, click OK.

17. Close the Transaction Definition window.


18. To verify that the new data has made its way into the FTTM_Training table, open the SQL
Server Management Studio.
19. In the Object Explorer tree, expand the FTTM_Training database, right-click on the
dbo.t_FTTM_Training table and choose Select Top 1000 Rows to view the data.

Of course, if your transactions have been running for a while, the latest data may not be
contained in the last 1000 records and it would be at the bottom of the table anyway. As
such, all of the Shift and Day_of_Year column data will be <NULL>. We really need to
look at the “most recent” entries.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-32 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

20. Modify the SQL query code in the upper pane by adding the following text at the end.
ORDER BY [TransTime] DESC

21. Press .
22. Verify the Shift and Day_of_Year columns contain are no longer NULL.

We have successfully modified transaction data points on the Control Connector. Let’s now
make a change to the Enterprise Connector.
23. Still within the SQL Server Management Console, right-click on the dbo.t_FTTM_Training
table and select Design.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-33


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

24. Modify the dbo.t_FTTM_Training table by adding a new column as shown below (and
Save the changes).

25. Return back to FactoryTalk Transaction Manager.

26. Open and select the do_FTTM_Training Data Object from the drop down list
next to Name.
27. Immediately, the dbo.t_FTTM_Training table columns appear – and even the additional
“New_Column” field is available in the list on the left side.

28. Click the button to move the New_Column into the Data Object table at the right.
You will notice that the Data Object field populates, but unfortunately, we can’t save this
change while the Transaction Manager is running.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-34 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

As we noted at the beginning of this exercise, modifications to enterprise database


connections can only be made to a stopped configuration.

Offline Transaction Modifications


Transaction Manager is capable of examining data as its collected, performing real-time
calculations on the incoming data and storing the resulting values. These “functions” are
grouped into categories such as logical/mathematical operations, time functions, parser
functions and Data Range functions.
In this exercise, we’ll use a combination of data range and math functions to provide Min, Max,
and Avg statistics on the Machine_1 oven temperature.

Performing Calculations on Collected Data


Mathematical operators define simple expressions that perform calculations that are evaluated
after all data has been collected (or substituted). Once the data points have been collected, their
current values are used to evaluate the expression. The results are then passed to the database
for processing.
The Expression Editor supports a data point range syntax that compares a data point value over
a series of transactions. Each time the transaction runs, a new value is added to the data range
for a given transaction. Transaction Manager can then make running calculations based on the
previous “X” transaction values.
We will first create a new SQL table Data Object which will be used to store calculation
information.
1. From the FactoryTalk Transaction Manager software, Stop your configuration from
running.

2. Create a new ODBC Data Object with the following properties:

Data Object Name: do_Avg_Min_Max


Database Connection: dsn_FTTM
Database Table: dbo.t_Average_Max_Min
Data Object Columns: <select all database columns>

© 2020 Rockwell Automation, Inc. All rights reserved. 1-35


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

3. Click Apply, OK to acknowledge and Close.


Next, we need to define a transaction to perform the calculations and store the results.

4. Create a new Transaction with the following properties:

Transaction Name: tran_Mach1_Avg_Min_Max


Data Object Name: do_Avg_Min_Max
Transaction Options: Use Cache Transaction Files
Transaction Status: Enable

© 2020 Rockwell Automation, Inc. All rights reserved.


1-36 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

5. Using the binding procedure we used earlier, bind the String_1 column to the expression
‘Mach1’.
6. Next, bind the String_2 column to the expression ‘Oven1’.
7. Open the Filter and Select Data Points window.

8. Right-click the Maximum column and select Bind Expression. Select the Max() function
and insert (drag over) the Oven_1_Temp data point from the Filter & Select window.
9. Click the Data Point Range function button and verify the range ‘[0:4]’ was added in the
Expression String field.

This expression will dynamically calculate the maximum value of the oven temperature
using the last five (5) data samples collected.
10. Click OK.

IMPORTANT
If you receive any errors, go back and verify that the syntax for the expression is correct based
on the screenshot in step 9 above.

11. We will use the same procedure to obtain a calculation for the minimum and the average.
Repeat the steps to calculate the Minimum and Average values for the Oven_1_Temp
data point.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-37


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

12. Complete the column mapping using the bindings below:

Shift_Number  Shift (Data Point)


Day_of_Year  Day_of_Year (Data Point)
TransTime  TransTimestamp (Expression)
TransTime_MS  MTransTimestamp (Expression)

13. Click and schedule the transaction to trigger every 8 seconds.


14. Click Apply to save the new transaction and Close.

15. Start the My_FTTM_App configuration.

16. Turn on the Transaction Monitor to monitor your transactions.


You may notice that a few of the new Avg/Min/Max transactions failed. Each time the
Transaction Manager service is restarted, calculations can’t be executed from the last
(five) values until there have been at least five transactions!

© 2020 Rockwell Automation, Inc. All rights reserved.


1-38 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

17. To verify that the new calculations were stored in the Avg_Max_Min table, open the SQL
Server Management Studio.
18. In the Object Explorer tree, expand the FTTM_Training database, right-click on the
dbo.t_Average_Max_Min table and choose Select Top 1000 Rows to view the data.

19. Once again, to view the most recent entries at the top of the table, modify the SQL query
code in the upper pane by adding the following text at the end.
ORDER BY [TransTime] DESC

20. Press .
21. Verify the three calculated fields are present and populated.

End of Lab Section.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-39


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

Lab 3: Creating Bi-Directional Transactions

Objectives
After completing this lab, you should be able to:
• Implement a stored procedure to select a set of values from a data source
• Trigger a transaction based on an unscheduled tag value (event)
• Transfer enterprise data to a controller data point
• Use a handshake to confirm the successful transfer of data

Background
You have proven to be very skilled at manipulating data into the company’s SQL database. Of
course, that means your production manager is going to see what else you can do!
She has claimed that the operators are really struggling with properly entering work instruction
parameters into the machines during changeovers. Being a manual process, it is no surprise
that mistakes occur. As savvy as you are, you know that managing the setpoints, ingredients
and timing values can easily be accomplished in one of the site’s SQL Server databases. All we
need to know is where the parameters are stored in SQL and when to initiate the transfer of the
information to the controller.

Bi-directional Transactions
The simplest bi-directional transactions in FactoryTalk Transaction Manager basically send a
request to an enterprise data source to transfer a set of values to the control system.
More sophisticated bi-directional transactions use data from the control system to call a stored
procedure that analyzes the data and then provides the software with output values that can be
written back to the control system.
Applications that are possible with this type of transaction include:
• Product parameter/recipe downloading
• Dynamic routing
• Dynamic production scheduling
• Controller centralizing
• Production floor interacting
• Automated storage and retrieval warehousing

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.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-40 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

Transactions with input/output bindings use the following types of parameters:


• Input parameters. In a stored procedure, these parameters must have a binding (a
data point, expression, or a null). A transaction must have all input parameters bound
to it before it can be enabled.
• Output parameters. These parameters do not require a binding. 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 data point. Transactions
with output bindings must use the Real Time Thread Storage option on the
Transaction Definition dialog box because the procedure or method must complete
before data can be returned to the Transaction Control Manager service or
FactoryTalk Transaction Manager service.
• Input/output parameters. These 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.

In this example, we will be using a simple stored procedure (below) to interrogate a SQL
table to determine if a specified RecipeNumber exists. If it does, the data set associated
with that RecipeNumber is output to the bound controller tags (data points).

© 2020 Rockwell Automation, Inc. All rights reserved. 1-41


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

1. In FactoryTalk Transaction Manager, Add the following Data Points from


the “Mach1” controller:

• Recipe_BTR_Error
• Recipe_Error
• Recipe_On_Off
• Recipe_Requested
• Recipe_Sent
• Flour
• Sugar

2. Change the Mode of the Recipe_On_Off data point to “Unscheduled”.

3. Save and Assemble the new data points.


4. Next, we will be adding components that require that Transaction Manager be stopped.
From the FactoryTalk Transaction Manager software, Stop your configuration from
running.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-42 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

5. Return to the Checklist or use the menu bar to create a new ODBC Data Object
with the following properties:

Data Object Name: do_Recipe_SP


Database Connection: dsn_FTTM
Stored Procedure: dbo.Recipe_sp
Data Object Columns: <All Parameters>

6. Apply the changes to the new data object and Close.

7. Create a new Transaction with the following properties:

Transaction Name: tran_Mach1_Recipe


Data Object Name: do_Recipe_SP
Transaction Options: Use Real Time Thread
Transaction Status: Enable

© 2020 Rockwell Automation, Inc. All rights reserved. 1-43


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

In order to configure the individual bindings for this procedure, we will want to separate the
input and output column references. This will allow us to use a field for output without
sending the same field an input value or simply map different data points to each field.
8. Let’s start with the RecipeNumber field. Right-click on @RecipeNumber and select
Separate Input /Output Parameter.

9. In a similar way, separate the Input and Output parameters for both Flour and Sugar.

10. Right-click on the @Flour (Input) parameter and select Bind Null Value.

11. Repeat the procedure to bind the Null value to the Sugar (Input) parameter.
12. Complete the column mapping using the “Mach1” data point bindings below:

@RETURN_VALUE  Recipe_Error
@Recipe_Number (Input)  Recipe_Requested
@Recipe_Number (Output)  Recipe_Sent
@Flour (Output)  Flour
@Sugar (Output)  Sugar

© 2020 Rockwell Automation, Inc. All rights reserved.


1-44 [Course Code] – Rev. April 2020
[Title of the Lab] Basic Configuration

Verify that your mappings match the screenshot below.

13. Click and set the transaction to trigger when the Recipe_On_Off bit
changes from low to high. (Hint: Recall that this data point was Unscheduled)

14. Click Apply to save the new transaction and Close.

15. Start the My_FTTM_App configuration.

16. Turn on the Transaction Monitor to monitor your transactions.


Your transactions should be executing with the exception of the tran_Mach1_Recipe,
which is configured to trigger based on a low-to-high transition of the Recipe_On_Off bit in
the controller.
We will need to modify two tags:
• RecipeRequested – to select the recipe data set that we want to transfer
• Recipe_On_Off – to trigger the transaction

17. Switch back to Studio5000 Logix Designer and make sure you are online with the
“Machine_1” controller.
18. Open the MainProgramParameters and Local Tags, select the Monitor Tags tab and
filter the tag list on ‘recipe’ to display only the Recipe control tags.

© 2020 Rockwell Automation, Inc. All rights reserved. 1-45


[Course Code] - Rev. April 2020
FactoryTalk Transaction Manager Basic Configuration

19. Using the table below, enter a valid RecipeNumber value into the RecipeRequested
controller tag.

20. Next, change the Recipe_On_Off tag value to a “1” and then back to “0”.
21. Let’s verify that the transaction was successful. There are a few places we can check, but
we’ll work our way backwards.

• In Studio5000,
- Check that the value for Recipe_Error = “0”
- Check that the value for Recipe_Sent = Recipe_Requested
- Remove the “recipe” Program Tags filter and verify that the Flour and Sugar tag
values match those in the table above for the RecipeNumber you chose
• In the Transaction Manager Monitor, verify that a single transaction executed
successfully (Passed and Database Passed)

22. Feel free to experiment with additional RecipeNumbers.

Note: If you enter an invalid RecipeNumber, the


Recipe_Error value should indicate “99” and the
Recipe_Sent tag will be set to “0”.

In this case, Transaction Manager Monitor will still indicate a successful transaction since
information was sent to the database and the procedure executed properly.

End of Lab.

© 2020 Rockwell Automation, Inc. All rights reserved.


1-46 [Course Code] – Rev. April 2020

You might also like