FactoryTalk Transaction Manager Student Training Manual

August 11, 2017 | Author: Oscar Alejo | Category: Oracle Database, Microsoft Sql Server, Databases, Database Transaction, Component Object Model
Share Embed Donate


Short Description

Descripción: What you will learn:  Configuring a FactoryTalk enabled application  Selecting the connectors  Config...

Description

FactoryTalk Transaction Manager

Student Manual Version: September 15, 2016 For Rockwell and Partner Use Only!

Copyright © 2015 Rockwell Automation, Inc.

This page intentionally left blank

2 of 74

Table of Contents FactoryTalk Transaction Manager ................................................................................................................ 4 Introduction to FactoryTalk Transaction Manager ................................................................................... 10 Configurations ...................................................................................................................................... 10 Configurations that use online edits ..................................................................................................... 10 Monitor configurations.......................................................................................................................... 11 Control connectors ............................................................................................................................... 12 Enterprise database connectors .......................................................................................................... 13 Enterprise application connectors ........................................................................................................ 14 Transactions ........................................................................................................................................ 14 Lab 1: Creating the FTTM_Training Database ........................................................................................ 19 Part A - Creating a Database Using SQL Server Management Studio ............................................... 19 Lab 2: Creating a FactoryTalk Transaction Manager (FTTM) Edit Enable Application ......................... 23 Lab 3: Editing a Running FactoryTalk Transaction Manager Edit Enable Application ........................... 41 Lab 4: Bidirectional Transaction with Bind Transaction Result Option .................................................. 46 Part A - Adding an FTTM Data Object ................................................................................................. 46 Part B - Adding FTTM Data Points to a Running Configuration .......................................................... 48 Part C - Adding a FTTM Transaction to a Running Configuration ....................................................... 50 Lab 5: Discussion of FTTM Errors and Data Buffering/Loss .................................................................. 56 Part A - Setting Up the VM-Image Desktop ......................................................................................... 56 Part B - Enterprise Connector Failure .................................................................................................. 57 Part C - Database Connection Failure ................................................................................................. 60 Lab 6: Using FTTM Stored Procedures .................................................................................................. 65 Part A - Adding a FTTM Data Object ................................................................................................... 65 Part B - Adding the Machine Setup Data Points .................................................................................. 66 Part C - Adding the Machine Setup Transaction ................................................................................. 68

3 of 74

FactoryTalk Transaction Manager What you will learn:        

Configuring a FactoryTalk enabled application Selecting the connectors Configuring the connectors Adding FactoryTalk data points Creating a data object Creating a unidirectional transaction Running and monitoring a FactoryTalk Transaction Manager (FTTM) application Using stored procedures in a FTTM transaction

4 of 74

5 of 74

6 of 74

7 of 74

8 of 74

9 of 74

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

Configurations that use online edits You can make changes to data points and transactions in configurations that use online edits while they are running. These changes are referred to as pending edits. In a configuration that use online edits, the Transaction Control Manager is used instead of the Transaction Manager service. Transaction Control Manager is a service similar to the Transaction Manager, but with the additional functionality of the FactoryTalk Live Data control connector embedded in it. In a configuration that use online edits, the Transaction Control Manager replaces the separate Transaction Manager and control connector services. Keep in mind the following guidelines while you are working with configurations that use online edits. In a running configuration that uses online edits, you can:     

create new and modify existing data points create new and modify existing transactions enable and disable transactions save and assemble pending edits view differences between current transaction definitions and transactions with pending edits

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

modify configuration properties modify error logging properties add new, modify, or delete existing enterprise connectors modify enterprise or control connector properties use any control connector except FactoryTalk Live Data

Tip: Additional FactoryTalk-related overview, task, and definition information can be found in the online help for the FactoryTalk Administration Console.

10 of 74

     

modify database connection properties add new, modify, or delete existing data objects modify a starting or stopping event definition change data point names or modes delete data points delete transactions (although you can disable them)

If you have a running configuration with pending edits and then stop it, you cannot make any further changes to those items with pending edits until you cancel or assemble the pending edits.

Monitor configurations You can monitor transactions as they are executed while your configuration runs. Click Transaction Monitor on the toolbar for a summary of cumulative activity by transaction. The Monitor automatically updates, but you can manually update it by clicking on a column heading. Tip: Click any column heading except Total to resort the listed transactions. The following columns display in the Transaction Monitor view:        

Total --Total number of transactions that have been triggered. Passed -- The number of completed transactions without errors. Failed -- The number of failed transaction. % Passed -- Passed/Total * 100 Cached -- The number of transactions currently in Cached Transaction files. Database Passed -- The number of transactions that have been successfully executed by the database. Database Failed --The number of transactions that have experienced a database error. Pending -- The number of transactions that have been started but not completed.

11 of 74

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

These control connectors are Windows 2000/2003/XP services that support bidirectional transactions. If the configuration uses online edits, the Transaction Control Manager service communicates only with the FactoryTalk Live Data connector.

12 of 74

Enterprise database connectors The Connector Definition dialog allows you to define the following enterprise database connectors: ODBC connectors  



The ODBC enterprise database connector allows you to interface with virtually any 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

Enterprise application connectors The Connector Definition dialog allows you to define the following enterprise application connectors: Microsoft COM+ The Microsoft COM+ enterprise application connector allows you to interface with Microsoft COM+ application components. These components must be integrated into a Windows 2000/2003/XP COM+ environment. Time-series data compression This Time-series data compression enterprise application connector compresses data from the control system via a lossless algorithm to conserve space. This connector can only be used by and configured by FactoryTalk Historian Classic. FactoryTalk Metrics The FactoryTalk Metrics enterprise application connector is used only with FactoryTalk Metrics and can be configured only through the Service Console. The connector stores data in the Information Services Manager.

You can create new, modify existing, and delete unwanted enterprise application connectors. In addition, you can test a connector and edit it before sending it to the database. You can create a FactoryTalk Transaction Manager data object from the enterprise applications objects. Tip: In a running configuration that uses online edits, you cannot add new, modify, or delete existing enterprise connectors.

Transactions Unidirectional transactions Unidirectional transactions in FactoryTalk Transaction Manager use information from the control system to add records to a database table, update the contents of existing records, or call stored procedures that do not contain output parameters. Unidirectional transactions are commonly used to log production data to a database, including:      

Performance monitoring Quality analysis sampling Real-time production information collecting Material consumption tracking Product tracking End of job/batch/shift reporting

Unidirectional transactions are the simplest transaction type. They can be used to perform database Insert or Update commands. They can also be used to perform simple stored procedures, provided no output parameters or return codes exist. In most applications, unidirectional transactions account for the majority of transaction volume. Data may be collected frequently from a large number of data points.

14 of 74

Bidirectional transactions Bidirectional transactions in FactoryTalk Transaction Manager take data from the control system and call a stored procedure that exercises some logic, and then provides the software with output values that can be written back to the control system. You can also set up bidirectional transactions so that data is not sent to a database, but only downloaded from a database to a control system. This transaction type is the most powerful because it allows transactions to interact with a database stored procedure or Microsoft COM+ method. This capability makes it possible for FactoryTalk Transaction Manager to perform functions that were previously possible only through custom application development. Applications that are possible with this type of transaction include:      

Product parameter downloading Dynamic routing Dynamic production scheduling Controller centralizing Production floor interacting Automated storage and retrieval warehousing

A bidirectional transaction with input/output bindings implements a data transfer from the enterprise system and sends it to the control system, binding database stored procedure input and output parameters. The control system data serves as input to a stored procedure. The results of a stored procedure can be written back to data points in the control system (enabling the creation of sophisticated transactions that allow a high degree of interaction between a database system and the factory floor). Transactions with output bindings must use the Real Time Thread Storage option on the Transaction Definition dialog because the procedure or method must complete before data can be returned to the Transaction Manager service or Transaction Control Manager service. FactoryTalk Transaction Manager allows you to specify the number of database threads used by a connector to improve performance. When creating a transaction using input/output bindings, parameters are bound in the same manner as columns in a table. The input data points are collected, any expressions are evaluated, and the procedure is called. If the procedure succeeds, any output parameters are written to the control system.

Transactions with input/output bindings use the following types of parameters: Input parameters Input parameters for a stored procedure must have a binding (a data point, expression, or a null). Select a data object parameter, right-click and select either Bind Data Point or Bind Null Value from the menu. A transaction must have all input parameters bound to it before it can be enabled. Binding a null value to an input eliminates the need to gather a value from the database. Output parameters Output parameters do not require a binding. The results of the bound value display under the Bound Value column. If an output parameter is not bound or is bound to a null, the value is ignored and this column is empty. A procedure must succeed before output parameters can be returned to the control system. Normally, you bind outputs to a data point in the control system; upon the successful completion of a transaction, a value is written from the stored procedure to the datapoint.

15 of 74

Input/output parameters Input/output parameters are handled as a single binding unless they are separated using the Separate Input/output option. This option permits separate data points to be bound to the same procedure parameter. This implies that the address from which the input parameter is derived is different from the address to which the output parameter is written. This also implies that if an input/output parameter is used only for output, then the input portion can be bound to a null value. Leaving an input/output parameter bound to a single data point causes the value to be read prior to executing the procedure and the output value to be written upon completion of the transaction. The Microsoft® SQL Server RETURN_CODE contains data that can be bound as an output to a stored procedure. This value is only available if the procedure executes successfully. A successful return code does not guarantee a successful transaction as the transaction is not yet complete. Unidirectional or bidirectional transactions with transaction result bindings A bidirectional or unidirectional transaction with a transaction result binding implements a data value that is written back to the control system; that data value allows you to determine if the transaction completed successfully. The control system can then take appropriate action based on the success or failure of the transaction. For example, consider a high liability manufacturing environment where a verifiable quality record is a requirement for each product produced. At various steps in the manufacturing process, a transaction may send a test result to be stored in a central database. If that test result is not recorded successfully, the part on the production line may become worthless. The Transaction Result, which notifies the control system that the transaction was successful, is sent variably based on the type of transaction. In a real-time transaction (where data flows straight to the database), the Transaction Result is sent upon data being successfully logged into the database. However in a cached transaction, where a cache is used to ensure data integrity, the Transaction Result is sent once data has been logged into the cache, and not necessarily into the database. The Transaction Result is used to confirm that the test result was recorded. If the Transaction Result indicates the test result was not recorded, the control system can respond appropriately by alerting an operator, changing the part's routing, or retrying the transaction. Some examples may include:  

Validated data logging Closed-loop quality tracking

The Transaction Result Binding option allows a transaction to return a Transaction Result code to the control system. To enable the Transaction Result Binding option, select the Bind Transaction Result check box on the Transaction Definition dialog, then select a data point to accept the Transaction Result code. The control system should take appropriate action depending upon the result of the transaction. The Transaction Result code is a 16-bit integer. Bit 0 is the least significant, Bit 15 is the most significant. The Transaction Result code consists of: Bit 0 - Done bit A 1 indicates the transaction has completed, a 0 indicates that it has not completed. No information is given as to whether the transaction was successful or unsuccessful. Bit 1 - Error bit A 1 indicates there was an error, a 0 indicates no error. Bits 2 through 15 - Error code

16 of 74

If Bit 1 contains a 1, these bits contain the error code. Otherwise, these bits are zeros. If you chose to use the Transaction Result code, you can run the FactoryTalk Transaction Manager error utility by selecting Start > Programs > Rockwell Software > FactoryTalk Transaction Manager > Error Messages. This eliminates the need to decode the integer to determine the error code. To convert the error code to a proper error number: 1. Select Start > Programs > Rockwell Software > FactoryTalk Transaction Manager > Error Messages. The FactoryTalk Transaction Manager Error Messages dialog appears. 2. Enter the Transaction Result code number (binary or decimal). 3. Click the Bind Transaction Result Error radio button. 4. Click Apply. For example, a transaction result code of 0000000000000001 (binary) or 1 (decimal) indicates that the transaction has completed without errors. If the Transaction Result code is: 0000010111101111 (1519 decimal) Then the FactoryTalk Transaction Manager error code is: 33147 Verify transactions It is important to verify transactions so that FactoryTalk Transaction Manager can check for conflicts between the defined data points and the corresponding data object columns. Click Verify on the Transaction Definition dialog. The Verify Transaction dialog displays. You may see the following types of information on the Verify Transaction dialog: errors Fatal errors that must be corrected before the transaction can be enabled. warnings Non-fatal errors that may cause unexpected behavior. informational Errors that provide advice about common parameter settings and possible interactive behaviors. Click Close to close the Verify Transaction dialog and return to the Transaction Definition dialog. The type of verification for the transaction displays in the Transaction Validation group. In a running configuration that uses online edits, you must save and assemble the data points with pending edits before you verify a transaction (if you wish to use the new data point definitions). FactoryTalk Transaction Manager verifies only transactions with pending edits (if any exist). The transactions with pending edits are verified using current data point definitions (data points that have been saved and assembled). In a stopped configuration that uses online edits, FactoryTalk Transaction Manager verifies transactions with pending edits (if any exist). If no pending edits exist, FactoryTalk Transaction Manager verifies the current transaction definition. To verify a transaction on the main FactoryTalk Transaction Manager dialog, select it in the right pane, right-click, and then select Verify Transaction from the menu.

17 of 74

You can verify multiple transactions at once on the main FactoryTalk Transaction Manager dialog by using the Verification Report. Select Tools > Verification Report. On the Verification Report dialog, choose to verify either enabled or disabled transactions or both. View transaction differences The Transaction Differences dialog allows you to view the differences between the current transaction definition and the transaction with pending edits. You can view transaction differences after you save pending edits, but before you assemble. 1. On the Pending Transaction Definition dialog, click Show Differences. 2. On the Transaction Differences dialog, select one of the following view options: 

All Displays all the parameters and bindings in the current transaction definition and the pending edits transaction definition.



Differences Displays only those parameters that have been changed for the current transaction and the transaction with pending edits. Bindings for current data points and data points with pending edits display.

3. Close the dialog. Tip: You can also access the Transaction Differences dialog from the Pending Edit Alerts dialog. Pending edit alerts Pending edit alerts are informational messages about the pending edits you are trying to assemble. Pending edit alerts are caused because some transactions require "state" information (internal buffers that contain information about the current and previous states of the transaction). This state information is no longer valid if certain changes are made to a data point or transaction that cause it to be reset when it is assembled. A transaction that is reset behaves as if it is running for the first time. The conditions necessary for a transaction to be reset are described in detail below. To review transactions that have pending edit alerts (and will be reset), open the Pending Edit Alerts dialog. FactoryTalk Transaction Manager warns you that the transaction will be reset by displaying a pending edit alert message. If the transaction includes any of the following characteristics, it requires state information:     

Ignore First Unscheduled Event (Trigger and Storage Parameters dialog) Transactions Stores Data On Number of Completed Transactions (Trigger and Storage Parameters dialog) Transactions Stores Data On Data Change and/or Rate (Trigger and Storage Parameters dialog) Expression using DIFF function (Expression Editor dialog) Expression using Data Point Range function used in conjunction with the Min, Max, and Avg functions (Expression Editor dialog)

A pending edit alert occurs if your enabled transaction contains state information and you perform any of the following tasks or change any of the parameters:

18 of 74

Lab 1: Creating the FTTM_Training Database Part A - Creating a Database Using SQL Server Management Studio 1. On VM-Image1, double-click the SQL Server Management Studio icon.

2. Click Connect.

3. From the File menu select Open > File.

19 of 74

4. From the C:\Class Files\IS Core FTTM DB folder select the FTTM_ISCore.sql file. a. Click Open

b. Click the Execute icon.

20 of 74

5. Verify that the command(s) completed successfully. a. Right-click on Databases and select Refresh

6. Expand the Databases tree and verify that the FTTM_Training database was created.

21 of 74

7. From the File menu select Exit.

This lab is complete

22 of 74

Lab 2: Creating a FactoryTalk Transaction Manager Edit Enable Application 1. From the Desktop, double-click on the FactoryTalk Transaction Manager (FTTM) Icon.

2. If the RA Foods configuration is running (green light), right-click on it and select Stop Configuration.

3. Click Yes. Note: In the following steps we will be creating a new FTTM application and we can have only one FTTM application running at a time on a computer

4. Click on the Configuration tab and select New.

23 of 74

5. In the Configuration Name textbox enter My_FTTM_Application. a. Click the Step 1 button

6. In the Path textbox enter C:\My_FTTM_Application. a. Check the Enable Online Edits checkbox Note: When you select the Enable Online Edits checkbox the only Control connector that can be selected is the FactoryTalk Live Data connector. This connector is selected by default. b. Check the ODBC checkbox c.

Click Apply

7. Click OK.

24 of 74

8. Click Close.

9. Click the Step 2 button.

10. In the Password textbox enter rockwell (all lower case). a. Click Passwords then OK to the next 2 dialog boxes b. Click Apply (may require Yes response and an OK)

25 of 74

11. From the Connector Service listbox select ODBC Connectors. a. In the Connector Name textbox enter ODBC b. Click Apply and then click OK to any dialog boxes c.

Click Close

12. Click Step 3.

13. Select RA Foods. a. Click OK

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.

Click the Add Selected Tag(s) button

15. Verify that the selected tags were added. a. Click Apply and then OK to any dialog boxes b. Click Close

27 of 74

16. Click Step 4.

17. In the Name textbox enter t_FTTM_Training. a. Click the Database Connection browse icon

18. Click the System DSN browse icon.

28 of 74

19. Select the System DSN tab. a. Click Add

20. From the Name list box cursor to the end and select SQL Server Native Client 10.0. a. Click Finish

21. In the Name textbox enter dsn_FTTM_Training. a. In the Server textbox type (local) b. Click Next

29 of 74

22. Select the With SQL Server authentication option. a. In the Login ID textbox enter FTTM_User b. In the Password textbox enter Rockwell1 c.

Click Next

23. Verify that the FTTM_Training database is selected. Note: If the FTTM_Training database is NOT selected check with your instructor a. Click Next

30 of 74

24. Click Finish.

25. Click the Test Data Source button.

31 of 74

26. Verify that the test completed successfully. a. Click OK

27. Click OK.

32 of 74

28. Click OK.

29. From the System DSN list box select dsn_FTTM_Training. a. In the User Name textbox enter FTTM_User b. In the Password text box enter Rockwell1 c.

Click Apply and then OK to any dialog boxes

d. Click Close

33 of 74

30. From the Table listbox select the dbo.t_FTTM_Training table. a. Select all items on left and click the move to right icon b. Verify that all the columns in the table were moved to the Data Object Columns window c.

Click Apply and then OK to any dialog boxes

d. Click Close

31. Click Step 5.

34 of 74

32. Do the following steps. a. In the Transaction Name textbox enter BL1_OvenTemps b. In the Data Object Name list box select t_FTTM_Training c.

In the Transaction Status pane select the Enable option

d. Right-click on String1 and select Bind Expression

33. In the Expression String window enter “Baking”. Note: The string expression must be in double quotes a. Click OK

35 of 74

34. Right-click on String2 and select Bind Expression.

35. In the expression window enter “Line 1”. Note: The string expression must be in double quotes a. Click OK

36. Double-click in the “blank area” of the Bound Value column. Note: This will open the Data Points dialog

36 of 74

37. Drag and drop TempZone1 to Data1. a. Drag and drop TempZone2 to Data2 b. Right-click on TransTime and select Bind Expression Note: We will be adding TempZone3 and TempZone4 as Online edits in a later lab

38. Click the TransTimestamp() button. Note: The TransTimestamp() is a built in function and by default adds to correct syntax to the Expression window a. Click OK

37 of 74

39. Click the Trigger / Storage button.

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

42. Click Close to close the configuration checklist dialog.

38 of 74

43. Highlight the My_FTTM_Application, right-click and select Start Configuration.

44. Click Yes. Note: When Starting or Stopping a FTTM Configuration you are always asked to confirm the action being taken

45. Select the View tab and select Transaction Monitor.

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

48. Click the Connect button.

49. Expand the Databases tree to FTTM_Training > Tables. a. Highlight the dbo.t_FTTM_Training table, right-click and select Select Top 1000 Rows

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.

This lab is complete

40 of 74

Lab 3: Editing a Running FactoryTalk Transaction Manager Edit Enable Application 1. Open the FTTM Manager by double-clicking the FTTM icon on the desktop.

2. Verify that the My_FTTM_Application is running (Green traffic light). Note: The My_FTTM_Application must be running for this lab

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”).

4. Click the Create Edits button.

41 of 74

5. Highlight String3, right-click and select Bind Expression.

6. In the Expression Editor enter “ProofOven” and then click OK. Note: The string must be in double quotes

7. Double-click in the Bound Value window. Note: This will open the Data Points dialog

42 of 74

8. Drag and drop TempZone3 to Data3. a. Drag and drop TempZone4 to Data4 b. Right-click on TransTime_MS and select Bind Expression

9. Click the MTransTimestamp() button. Note: The MTransTimestamp() is a built in function and by default adds to correct syntax to the Expression window a. Click OK

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.

12. Click the Connect button.

44 of 74

13. Expand the Databases tree to FTTM_Training > Tables. a. Highlight the dbo.t_FTTM_Training table, right-click and select Select Top 1000 Rows

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

15. Close SQL Server Management Studio and Transaction Manager.

This Lab is complete

45 of 74

Lab 4: Bidirectional Transaction with Bind Transaction Result Option Part A - Adding an FTTM Data Object 1. Open the FTTM Manager by double-clicking the FTTM icon on the desktop.

2. Stop the My_FTTM_Application by highlighting the My_FTTM_Application, then right-click and select Stop Configuration. Click Yes to the confirmation dialog box. Note: The My_FTTM_Application must be stopped when creating a Data Object

3. Expand the My_FTTM_Application tree to ODBC Connectors > ODBC. a. Highlight ODBC, right-click and select Define Data Object

46 of 74

4. In the Name textbox enter t_Handshake. a. From the Database Connection list box select dsn_FTTM_Training b. From the Table list box select dbo.t_Handshake c.

Select all the Database Columns and move them to the Data Object Columns window using the right double arrow icon

d. Click Apply and then OK or Yes to any dialog boxes e. Click Close

5. Highlight the My_FTTM_Application, right-click and select Start Configuration.

6. Click Yes. Note: When Starting or Stopping a FTTM Configuration you are always asked to confirm the action being taken

47 of 74

7. Select the View tab and select Transaction Monitor.

8. Verify that both the Transaction and the Database actions are passing.

Part B - Adding FTTM Data Points to a Running Configuration 1. Expand the My_FTTM_Application tree and select FT. a. Right-click and select Define Data Points

2. Expand the BL1 tree to Online > Programs:HB_HandShake. a. Select the Heartbeat_Toggle_Bit b. Click Add Selected Tag(s)

48 of 74

3. Cursor to the right and change the Mode of the Heartbeat_Toggle_Bit to Unsched.

4. Expand the Program:HB_HandShake tree and select the HS folder. a. Select the HS_Comm_Error, HS_Error_Code, HS_Missed and HS_Number data points b. Click the Add Selected Tag(s) button

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

Part C - Adding a FTTM Transaction to a Running Configuration 1. Right-click in the white space in the right window and select Define Transaction.

2. IMPORTANT: Verify that the Pending Transaction Definition dialog box is completely blank.

3. In the Transaction Name textbox enter t_Handshake. a. From the Data Object Name list box select t_Handshake b. From the Transaction Status options select Enable c.

Select the Use Real Time Thread option

d. Highlight the HS_Source column then right-click and select Bind Expression

50 of 74

4. In the Expression Editor enter “Baking BL1 ControlLogix Processor” a. Note: The string expression must be in double quotes b. Click OK

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

a. Check the Bind Transaction Result check box b. Drag and Drop the HS_Error_Code to the Bind Transaction list box c.

Highlight the TransTime data column then right-click and select Bind Expression

7. Click the TransTimestamp() button. Note: The TransTimestamp() is a built in function and by default adds to correct syntax to the Expression window a. Click OK

52 of 74

8. Highlight the TransTime_MS data column then right-click and select Bind Expression.

9. Click the MTransTimestamp() button. Note: The MTransTimestamp() is a built in function and by default adds to correct syntax to the Expression window a. Click OK

10. Click the Trigger / Storage button.

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

12. Click Save Edits then OK or Yes to any dialog boxes. a. Click Assemble Edits then OK or Yes to any dialog boxes b. Click Close

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

This lab is complete

55 of 74

Lab 5: Discussion of FTTM Errors and Data Buffering/Loss This lab will cover the following topics:    

Differences between Cached and Real Time Transactions Errors and data loss/saved from an enterprise connection failure Errors and data loss/saved from a database failure Errors and data loss/saved from a control side failure

Part A - Setting Up the VM-Image Desktop 1. The following steps will be used as an outline for this discussion. a. From the VM-Server1 image open the FT Transaction Manager (if not already open) b. From the View menu select Transaction Monitor c.

Adjust the interface to the size indicated below

d. Open Windows Explorer e. Open the C:\My_FTTM_Application folder f.

Adjust the interface to the size indicated below

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.

Verify that the HB is running

56 of 74

Part B - Enterprise Connector Failure 1. Highlight the ODBC connector then right-click and select Stop Connector Service. a. When the dialog box pops up click Yes

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.

4. In the Error Number textbox enter 1235. a. Select the Bind Transaction Result Error option b. Click Apply Note: An error message is returned that states the enterprise connector is not connected to the Transaction Manager c.

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

Part C - Database Connection Failure In this section of the lab we will simulate the loss of the FTTM_Training database. To do this we will need to stop the FTTM My_FTTM_Application and then pause the SQL server so that it will not allow any new connections. Then, when we restart the My_FTTM_Application it will not be able to connect to the FTTM_Training database because the SQL server is paused. 1. From the FTTM Manager select the My_FTTM_Application and click the Stop icon then click Yes.

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

4. Note and verify the following: a. The BL1_OvenTemp transaction is passing b. The t_Handshake transaction is failing c.

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.

6. In the Error Number textbox enter 1519. a. Select the Bind Transaction Result Error option b. Click Apply Note: An error message is returned that states to check the Enterprise connector log c.

Click Close

62 of 74

7. From FTTM select the View tab and then Error Log Files.

8. Select the ODBC connector. Note: The ODBC connector error log indicates an error occurred while trying to connect to the FTTM_Training database

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.

The error code has been cleared.

11. Close all the open applications/GUI interfaces.

This lab is complete

64 of 74

Lab 6: Using FTTM Stored Procedures In the following lab we will use a FTTM Stored Procedure to download Machine Setup Parameters from a MSSQL database to a ControlLogix controller. We will use a FTView SE client to select a set of parameters and then trigger the FTTM stored procedure that will select the correct set of parameters and download them to the Logix Controller.

Part A - Adding a FTTM Data Object 1. Open FTTM and Stop the My_FTTM_Application configuration. a. Note: To create a new data object the FTTM configuration must be stopped

2. Expand the My_FTTM_Application and highlight the ODBC connector. a. Right-click and select Define Data Object

65 of 74

3. In the Name textbox enter Machine_Setup. a. From the Database Connection combo box select or verify dsn_FTTM_Training is selected b. Select the Stored Procedure option c.

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

Part B - Adding the Machine Setup Data Points 1. Expand the My_FTTM_Application and highlight FT. a. Right-click and select Define Data Points

66 of 74

2. Expand the BL1 > Online tree to the Program:Machine_Setup folder. a. Select all the Machine_Setup tags EXCEPT the Machine_Setup_ONS tag b. Click Add Selected Tags button

3. Select the Machine_Setup_Get_Parameters tag. a. Change the Mode from Sched to Unsched b. Click Apply c.

Click Close

67 of 74

Part C - Adding the Machine Setup Transaction 1. From the Define tab select Transaction.

2. Verify that the Data Object Column window is BLANK. Note: If you have bindings in this window and you continue you are editing an existing transaction

68 of 74

3. In the Transaction Name textbox enter BL1_Machine_Setup. a. From the Data Name Object combo box select Machine_Setup b. In the Transaction Status frame select the Enable option c.

In the Transaction Option frame select the Use Real time Thread option

d. Highlight the @MachineSetupNumber e. Right-click and select Separate Input/Output Parameter

4. Repeat last steps to separate the @Parameter1 and @Parameter2 parameters. a. Verify that the Data Columns are as indicated below.

5. Highlight the @Parameter1 I (input) parameter, then right-click and select Bind Null Value.

6. Repeat step 5 for the @Parameter2 input parameter.

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 the Trigger / Storage button

8. Select the On Unscheduled Event option. a. Select the On High Transaction b. Select the Machine_Setup_Get_Parameters tag c.

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.

14. Click Connect.

72 of 74

15. Expand the Database tree to FTTM_Training > Tables. a. Highlight dbo.T_MachineSetup and then right-click and select Edit Top 200 Rows Note: The table does not have any Machine Setups entered.

16. Enter the following 4 Machine Setups. Note you must click on the last row to complete the edits MachineSetupNumber 1 2 3 4

Parameter1 111 222 333 444

Parameter2 111 222 333 444

73 of 74

17. Return to the FTView SE Machine Setup Display client. a. Verify that Machine Setup 1 is selected b. Click the Download Requested Machine Setup c.

Verify that Machine Setup 1 was downloaded without any errors

18. Select Machine Setup 2, 3 and 4 in turn and verify the correct parameters were downloaded. 19. Stop the My_FTTM_Application configuration.

20. Start the RA Foods configuration.

21. Close View Client, Transaction Manager and SQL Management Studio.

This lab and manual is complete 74 of 74

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF