Documente Academic
Documente Profesional
Documente Cultură
Student Manual
Version: September 15, 2016
For Rockwell and Partner Use Only!
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
4 of 74
5 of 74
6 of 74
7 of 74
8 of 74
9 of 74
Tip: Additional FactoryTalk-related overview, task, and definition information can be found
in the online help for the FactoryTalk Administration Console.
10 of 74
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:
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
The ODBC enterprise database connector allows you to interface with virtually any ODBCcompliant 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
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:
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.
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:
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.
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
2. Click Connect.
19 of 74
4. From the C:\Class Files\IS Core FTTM DB folder select the FTTM_ISCore.sql file.
a. Click Open
20 of 74
6. Expand the Databases tree and verify that the FTTM_Training database was created.
21 of 74
22 of 74
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
23 of 74
Click Apply
7. Click OK.
24 of 74
8. Click Close.
25 of 74
Click Close
26 of 74
14. Expand the BL1 Folder to Online > Program:Proof_Oven > OvenUDT.
a. Note: You can use the Ctrl key to select more than one tag
b. Select the TempZone1, TempZone2, TempZone3 and TempZone4 tags
c.
27 of 74
28 of 74
20. From the Name list box cursor to the end and select SQL Server Native Client 10.0.
a. Click Finish
29 of 74
Click Next
30 of 74
31 of 74
32 of 74
d. Click Close
33 of 74
d. Click Close
34 of 74
35 of 74
36 of 74
37 of 74
40. For the Scan Rate enter 10 and select the Seconds option.
a. Click OK
41. Click Apply and then OK to the message dialog box if it is displayed.
a. Click Close
38 of 74
46. Verify that both the Transaction and the Database actions are passing (will take a little time for
the values to start incrementing).
47. Open the SQL Server Manager by double-clicking the SQL Server Manager icon.
39 of 74
50. Verify that the data is being inserted in to the String1, String2, Data1, Data2 and TransTime
columns.
a. Verify the that Transtime timestamps are occurring every 10 seconds
51. Close FactoryTalk Transaction Manager and SQL Server Management Studio.
40 of 74
3. Double-click on the BL1_OvenTemps transaction (may need to click off and then back on the
My_FTTM_Application configuration first to give it focus).
41 of 74
42 of 74
43 of 74
10. Click the Save Edits button and then OK or Yes to any dialog boxes.
a. Click Assemble Edits and the OK or Yes to any dialog boxes
b. Click Close
11. Open the SQL Server Manager by double-clicking the SQL Server Management Studio icon.
44 of 74
14. Verify that the data is being inserted in to the String1, String2, String3. Data1, Data2, Data3,
Data4, TransTime and TransTime_MS columns.
Note: You will have to scroll down to the end of the results to see the new data.
Note: If you have more than 1000 rows of data you will have to modify the query as follows
and rerun the query. Delete the Top 1000 and click Execute
45 of 74
46 of 74
Select all the Database Columns and move them to the Data Object Columns window using
the right double arrow icon
6. Click Yes.
Note: When Starting or Stopping a FTTM Configuration you are always asked to confirm
the action being taken
47 of 74
8. Verify that both the Transaction and the Database actions are passing.
48 of 74
3. Cursor to the right and change the Mode of the Heartbeat_Toggle_Bit to Unsched.
5. Select ALL the Red rows. You must select the entire rows.
a. Click Save Edits then OK or Yes to any dialog boxes
b. Click Assemble Edits and then OK or Yes to any dialog boxes
c.
Click Close
49 of 74
2. IMPORTANT: Verify that the Pending Transaction Definition dialog box is completely blank.
d. Highlight the HS_Source column then right-click and select Bind Expression
50 of 74
5. Double-click in the white space (see screen shot) to open the Filter and Data Point Editor.
51 of 74
6. Drag and Drop as follows (Note: the tags name are using the last part of the FTLD name).
HS_Number to HS_ID
HS_Missed to HS_Num_Missed
HS_Comm_Error to HS_Comm_Error
HS_Error_Code to HS_BindTranResult_Error
Highlight the TransTime data column then right-click and select Bind Expression
52 of 74
8. Highlight the TransTime_MS data column then right-click and select Bind Expression.
53 of 74
11. Select the On Unscheduled Event option AND the On High Transition option.
a. From the Unscheduled Event list box select the Heartbeat_Toggle_Bit
b. Click OK
13. From the desktop double-click the BL1 Heartbeat Status icon to open the FTView SE client.
54 of 74
14. If not already On (green), turn the BL1 Heartbeat Status On by clicking the RED HB Off button.
15. Verify that the BL1 Heartbeat Status is On (green) and that the HB Number is increasing
without any errors (may take some time to start).
Note: A heartbeat occurs every 20 seconds
16. From the FTTM Manager, select the View tab and then select Transaction Monitor (you may be
in this view from a previous lab).
a. Verify that the t_Handshake transaction is working and has no errors
Note: You can leave the FTTM Manager and the FTView Client open for the next lab
55 of 74
g. Observe that the .rsl file is changing (number in the file name is incrementing and timestamp
is updating). This is your cache file
h. Open the FTView BL1 Heartbeat Status Client (if not already open)
i.
56 of 74
2. Verify that the BL1_OvenTemps transaction is passing and that the t_Handshake transaction is
failing.
a. Verify that the number of .rsl files are increasing. These are the BL1_OvenTemp data that
is being cached
Note: The t_Handshake data is lost BUT an error code is returned to the controller via the
Bind Transaction Result function
Note: The FTView client is displaying a 1235 error
57 of 74
3. From the Start menu select All Programs > Rockwell Software > FactoryTalk Transaction
Manager > Error Messages.
Click Close
58 of 74
5. Highlight the ODBC connector then right-click and select Start Connector Service.
a. When the dialog box pops up click Yes
6. The cached .rsl files are sent to the database and the error is cleared and both transactions are
now passing.
59 of 74
2. From either the Start menu or the desktop icon open the Microsoft SQL Server Management
Studio.
a. Highlight the vm-image1 server and right-click and then select Pause
b. Click Yes
3. From the FTTM Manager select the My_FTTM_Application and click the Start icon then click
Yes.
60 of 74
A file named dsn_FTTM_Training.sql was created. This file contains the content of the first
.rsl file that failed to have its data loaded into the FTTM_Training database.
d. Additional .rsl files are created once the Enterprise connector is aware that the database has
been lost.
e. A file named rt_dsn_FTTM_Training.sql was created and contains the real time
t_Handshake data
f.
An error number 1519 was returned to the controller via the Bind Transaction Result
function
61 of 74
5. From the Start menu select All Programs > Rockwell Software > FactoryTalk Transaction
Manager > Error Messages.
Click Close
62 of 74
7. From FTTM select the View tab and then Error Log Files.
9. From either the Start menu or the desktop icon open the Microsoft SQL Server Management
Studio.
a. Highlight the vm-image1 server and right-click and then select Resume
b. Click Yes
63 of 74
10. Once the database has resumed you should note and verify the following.
a. The .rsl cached files have been loaded in the database.
b. Both the dsn_FTTM_Training,sql and the rt_ dsn_FTTM_Training,sql file are still present
and the data in these files has not been transferred into the database. This must be done via
a program like a VB app or manually using the SQL Management Studio
c.
64 of 74
65 of 74
From the Stored Procedure combo box select or verify dbo.Machine_Setup_sp is selected
d. Select and move all the Parameters in the Parameters window to the Data Object
Columns window by clicking the move all icon
e. Click Apply
f.
Click Close
66 of 74
Click Close
67 of 74
68 of 74
In the Transaction Option frame select the Use Real time Thread option
5. Highlight the @Parameter1 I (input) parameter, then right-click and select Bind Null Value.
69 of 74
7. Note: Double-clicking in the blank Bound Value window will open the Data Points Dialog box.
a. Check the Bind Transaction Result check box
b. Drop and drag the following data values to bind them with the stored procedures parameters
@RETURN_VALUE
@MachineSetupNumber (input)
@MachineSetupNumber
(output)
@Parameter1 (output)
@Parameter2 (output)
Bind TractionResult
c.
BL1_Program:Machine_Setup.Machine_Setup_Error
BL1_Program:Machine_Setup.Machine_Setup_Number_Requested
BL1_Program:Machine_Setup.Machine_Setup_Number_Returned
BL1_Program:Machine_Setup.Machine_Setup_Parameter1
BL1_Program:Machine_Setup.Machine_Setup_Parameter2
BL1_Program:Machine_Setup.Machine_Setup_BTR_Error
Click OK
70 of 74
9. Click Apply
a. Click Close
10. From the FTTM Manager select the My_FTTM_Application and click the Start icon.
a. Click Yes
11. From the Desktop select the Machine Setup display icon.
71 of 74
12. Click the Machine Setup 1 button and verify that setup number 1 was loaded.
a. Click the Download Requested Machine Setup button
Note: No parameters were returned and the communication error of 99 was returned. This
indicates that no setup matched the requested number.
13. From the Desktop select the SQL Server Management icon.
72 of 74
Parameter1
111
222
333
444
Parameter2
111
222
333
444
73 of 74
18. Select Machine Setup 2, 3 and 4 in turn and verify the correct parameters were downloaded.
19. Stop the My_FTTM_Application configuration.
21. Close View Client, Transaction Manager and SQL Management Studio.