Professional Documents
Culture Documents
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
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.
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.
11. Next, expand the Security Logins folder from the Object Explorer and verify the user
account ‘FTTM_User’ is listed in the tree.
Setup Complete.
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
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.
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.
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.
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)
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.
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.
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.
8. Click OK to acknowledge the change and Close to complete the Connector configuration.
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
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.
That was easy! Let’s perform a similar selection on the enterprise side.
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.
6. Scroll down, select the “SQL Server” driver and press Finish.
IMPORTANT
If you see multiple instances of (local) and the image Server as seen below…
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.
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:
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
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.
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.
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.
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.
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.
19. Press OK and Apply and OK to acknowledge the save was successful.
Your Transaction Validation indicator should read “Valid”.
20. If the transaction does not say “Valid” go back and check your work, otherwise, press
Close and verify your Step 5 is complete.
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.
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.
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.
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.
The font color should change from red to black and the data points will be available to be
bound in a transaction.
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.
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.
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.
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.
24. Modify the dbo.t_FTTM_Training table by adding a new column as shown below (and
Save the changes).
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.
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.
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.
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.
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).
• Recipe_BTR_Error
• Recipe_Error
• Recipe_On_Off
• Recipe_Requested
• Recipe_Sent
• Flour
• Sugar
5. Return to the Checklist or use the menu bar to create a new ODBC Data Object
with the following properties:
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
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)
17. Switch back to Studio5000 Logix Designer and make sure you are online with the
“Machine_1” controller.
18. Open the MainProgramParameters and Local Tags, select the Monitor Tags tab and
filter the tag list on ‘recipe’ to display only the Recipe control tags.
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)
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.