Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore Appendix E

Appendix E

Published by OCS, 2021-11-18 07:59:08

Description: Appendix E

Search

Read the Text Version

Appendix E Peer-to-Peer Communication 1 Internal



Appendix Contents of This Appendix Overview of Peer-to-Peer Communication ....................................5 Peer-to-Peer Data Transfer Time ....................................................6 Using Send and Receive Function Blocks ....................................7 Send and Receive Function Blocks...................................................7 Sample Send and Receive Pair ..........................................................8 Restrictions on Data Transmission Speed ....................................9 Monitoring Peer-to-Peer Communication ................................... 10 Status of Communication Paths ......................................................10 Status of Ethernet (Net1 and Net2) Ports ........................................10 Using the SYS_CM_STATUS Function Block ...............................10 Using the Tri-GP CM System Attributes.........................................11 Sample Peer-to-Peer Programs ................................................... 12 Fast Send to One Controller.............................................................12 Sending Data Every Second to One Controller ..............................12 Sending Data Only When Requested ..............................................12 Fast Send of Safety-Critical Data.....................................................12 Sample Timing Calculations ............................................................13 Lab 1: Configuring Peer-to-Peer Data Transfer Time ................ 15 Introduction .......................................................................................15 Objectives ..........................................................................................15 Lab Procedure ...................................................................................15 Estimate Memory for Peer-to-Peer Data Transfer Time.................15 Configure Peer-to-Peer Ports for Tri-GP Controllers .....................17 Allocate Peer-to-Peer Memory.......................................................18 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Appendix 4 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Appendix Overview of Peer-to-Peer Communication Triconex™ Peer-to-Peer protocol is designed to allow multiple Triconex controllers closed network to exchange safety-critical data. (If you plan to implement a complex Peer-to- Peer network, please contact Global Customer Support.) To enable Peer-to-Peer communication, you must connect each controller to an Ethernet network by using an Ethernet port on the Triconex General Purpose (Tri-GP™) Communication Module (CM). The controllers exchange data by using Send and Receive function blocks in TriStation™ 1131 Developer’s Workbench software. Figure 1 To configure a TriStation 1131 application for a Peer-to-Peer communication, you must perform the following tasks: • Configure the physical port connection for Peer-to-Peer mode • Allocate memory for Send and Receive function blocks • Add Send and Receive function blocks to the programs • Observe restrictions on data transmission speed In addition, Schneider Electric recommends that you calculate the data transfer time to determine whether the control algorithms will operate correctly or not. Peer-to-Peer communication speed for Tricon™ controllers is 10 megabits per second with an NCM installed, and 10 or 100 megabits per second with a TCM installed; however, the TCM Model 4354 supports only 100 megabits per second connections. Tri-GP controller communication speed is 10 or 100 megabits per second. If your network includes a Tricon controller with a TCM and a Tri-GP, you can run the entire network at 100 megabits per second. If your network includes a Tricon controller with an NCM and a Tri-GP controller, you can run the entire network at 10 megabits per second, or you can use a hub or switch that converts messages from 10 to 100 megabits per second when they are transferred from the Tricon controller to the Tri- GP controller. In this scenario, Schneider Electric suggests using the NET 1 port on both Tricon and Trident™/ Tri-GP communication modules, because 10 megabits per second is the only speed available on NET 1. With this setup, NET 2 is available for faster communication with external devices on an Ethernet network. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 5 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Appendix For monitoring Peer-to-Peer data exchange, TriStation 1131 provides function blocks and Tri-GP attributes to track network communication paths and verify whether the Ethernet ports are receiving data from other controllers or not. The sample programs described in this appendix are on the TriStation 1131 CD. These programs show how to send data at high speed and under controlled conditions and how to measure the maximum data transfer time. Peer-to-Peer Data Transfer Time In a Peer-to-Peer application, data transfer time includes the time required to initiate a send operation, send the message over the network, and have the message read by the receiving node. Additional time (at least two scans) is required for a sending node to get an acknowledgment from the MPs that the message has been acted on. These time periods are a function of the following parameters of the sending and receiving controllers: • Scan time • Configuration size • Number of bytes for aliased variables • Number of Send function blocks, Receive function blocks, printing function blocks, and • Modbus master function blocks Number of controllers on the Peer-to-Peer network Send function blocks require multiple scans to transfer data from the sending controller to the receiving controller. The number of send operations initiated in a scan is limited to 5. The number of pending send operations is limited to 10. A typical data transfer time (based on a typical scan time) is 1 to 2 seconds, and the time- out limit for a Peer-to-Peer send (including 3 retries) is 5 seconds. Consequently, the process-tolerance time of the receiving controller must be greater than 5 seconds. Process- tolerance time is the maximum length of time that can elapse before your control algorithms fail to operate correctly. If these limitations are not acceptable, further analysis of your process is required. 6 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Appendix Using Send and Receive Function Blocks A TriStation 1131 application must use a specific Send function block to send data of a certain type to a matching Receive function block in another TriStation 1131 application. Each Send function block has a parameter that identifies the Receive function block to which it sends data. Each Receive function block has a parameter that identifies the Send function block from which it receives data. For more on information on function blocks, refer to the TriStation 1131 Libraries Reference. Send and Receive Function Blocks The Send and Receive function blocks that you can include in a TriStation 1131 application have data types of BOOL, DINT, and REAL. These function blocks are available. Table 1 lists the Send and Receive Function Blocks: Table 1 Send Function Blocks Receive Function Blocks TR_USEND_BOOL TR_URCV_BOOL TR_USEND_DINT TR_URCV_DINT TR_USEND_REAL TR_URCV_REAL TR_USEND_BOOL_32 TR_URCV_BOOL_32 TR_USEND_DINT_32 TR_URCV_DINT_32 TR_USEND_REAL_32 TR_URCV_REAL_32 The _32 ending means that the function block can send 32 data values. Function block names that do not include the _32 ending can send 20 data values. All Send and Receive function blocks have the same parameters, except for the data transfer parameters which are BOOL, DINT, or REAL. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 7 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Appendix Sample Send and Receive Pair Figure 2 shows a sample pair of Send and Receive function blocks. A Send function block in one TriStation 1131 application is sending input values from the field over a Peer-to-Peer network to a matching Receive function block in another TriStation 1131 application. The Received and Sent parameters are used to cross-reference the Send and Receive function blocks. The Recvnode and Sendnode parameters are used to cross-reference the sending and receiving nodes (TriStation 1131 applications). For more information, refer to Sample Peer-to-Peer Programs. Figure 2 8 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Appendix Restrictions on Data Transmission Speed Tri-GP controllers with a CM installed and Tricon controllers with a TCM installed can perform Peer-to-Peer communication at 10 or 100 megabits per second. Peer-to-Peer communication can be performed across the entire network at 100 megabits per second if your network satisfies one of the following conditions: • Includes only Tricon controllers with TCMs installed • Includes only Trident and/or Tri-GP controllers • Includes only Tricon controllers with TCMs installed and Trident and/or Tri-GP controllers If your network includes a Tricon controller with an NCM and a Tri-GP controller, you must choose either of the following solutions. Table 2 Solution Description Run the entire network at Data exchange among Triconex controllers can be 10 megabits effectively done at a rate of 10 megabits per second. Schneider Electric suggests using the Net1 port on both Convert messages from 10 Tri-GP and Tricon communication modules, because 10 to 100 megabits megabits per second is the only speed available on Net1. Using this setup, Net2 is available for faster communication with external devices on an Ethernet network. The data rate can be converted when messages are transferred from a Tricon controller to a Tri-GP controller. A typical method is to connect the Tricon, Trident, and Tri- GP controllers to a hub that can convert from 10 to 100 megabits. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 9 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Appendix Monitoring Peer-to-Peer Communication TriStation 1131 provides function blocks and system attributes for monitoring the status of Peer-to-Peer communication paths (routes between Triconex communication modules on the network) and the status of communication ports. For detailed information, refer to the TriStation 1131 Libraries Reference. Status of Communication Paths A Peer-to-Peer network can communicate over one or two paths, depending on whether each controller contains one or two Tri-GP CMs. If there are two paths (two communication modules), then both are used simultaneously to exchange Peer-to-Peer data. The failure of one path does not affect Peer-to-Peer communication. To monitor the paths, use the TR_PEER_STATUS function block in the TriStation 1131 application. Path status is updated every 30 seconds. The following figure shows the FBD representation of a TR_PEER_STATUS function block. Figure 3 Status of Ethernet (Net1 and Net2) Ports You can determine whether the Net1 and Net2 ports are receiving Peer-to-Peer data by using the SYS_CM_STATUS function block or CM_ system attributes in the TriStation 1131 application. Using the SYS_CM_STATUS Function Block The SYS_CM_STATUS function block is used to monitor the status of the Net1 and Net2 ports, serial ports, and the print buffer on the CM. The NET1OK or NET2OK parameter is True if a message was received by the Net1 or Net2 port in the last 15 seconds. (Most of the other parameters in the function block are for serial ports.) The network port status is updated every 30 seconds. 10 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Appendix Figure 4 shows the FBD representation of a SYS_CM_STATUS function block. Figure 4 Using the Tri-GP CM System Attributes System attributes are points that help you monitor the status of system components and conditions and control several system operations. The following system attributes for the CM can be used to verify whether the Net1 and Net2 ports have received messages in the last 15 seconds from other controllers in a Peer-to-Peer network or not. Table 3 System Attribute Name Port on the CM CM_L.NET1_OK NET1 port on the left CM CM_L.NET2_OK NET2 port on the left CM CM_R.NET1_OK NET1 port on the right CM CM_R.NET2_OK NET2 port on the right CM 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 11 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Appendix Sample Peer-to-Peer Programs The sample programs described in this appendix are on the TriStation 1131 CD. These programs show how to send data at high speed and under controlled conditions, and how to measure the maximum data transfer time. The topics included are: • Fast Send to One Controller • Sending Data Every Second to One Controller • Sending Data Only When Requested • Fast Send of Safety-Critical Data Fast Send to One Controller These programs show how to send data as fast as possible from Node 2 to Node 3. This technique can be used with a scan time as low as 100 milliseconds. • PEER_EX1_SEND_FBD (for sending Node 2) • PEER_EX1_RCV_FBD (for receiving Node 3) Sending Data Every Second to One Controller These programs show how to send data every second from Node 2 to Node 3. This technique can be used with a scan time as low as 100 milliseconds. • PEER_EX2_SEND_FBD (for sending Node 2) • PEER_EX2_RCV_FBD (for receiving Node 3) Sending Data Only When Requested These programs show how to use Send and Receive function blocks in a controlled way. The programs send data only when an acknowledgment for the last send operation is received and new data is available. • PEER_EX3_SEND_FBD (for sending Node 2) • PEER_EX3_RCV_FBD (for receiving Node 3) Fast Send of Safety-Critical Data These programs show how to transfer a small amount of safety-critical data between two TriStation 1131 applications as fast as possible. The programs also show how to measure the actual maximum time for transferring data from the sending node to the receiving node. • PEER_EX4_SEND_FBD (for sending Node 1) • PEER_EX4_RCV_FBD (for receiving Node 3) 12 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Appendix The data transfer time described in this section is calculated using this equation. DT = (2 • <Larger of TS or SS>) + (2 • <Larger of TR or SR>) Table 4 Parameter Description DT TBS Data transfer time in milliseconds. TS Total bytes of aliased variables in the sending node. SS TBR Time for sending controller to transfer aliased data TR over the communication bus in milliseconds. TS = (TBS ÷ 100,000) * 1000 SR Scan time of sending node in milliseconds. Total bytes of aliased variables in the receiving node. Time for receiving controller to transfer aliased data over the communication bus in milliseconds. TR = (TBR ÷ 100,000) * 1000 Scan time of receiving node in milliseconds. Sample Timing Calculations SS = 150 milliseconds TBS = 2000 bytes TS = (2000/100,000) • 1000 = 20 milliseconds SR = 250 milliseconds TBR = 5000 bytes TR = (5,000 ÷ 100,000) • 1000 = 50 milliseconds DT = 2 • 150 + 2 • 250 = 800 milliseconds Process-tolerance time = 4 seconds The PEER-EX4_SEND_FBD program packs 32 BOOL values into a DWORD (for Tri-GP) and sends the value with a diagnostic variable to a receiving node as fast as possible by permanently setting the SENDFLG parameter to 1. The diagnostic variable is incremented every time a new send operation is initiated. The receiving node verifies that the diagnostic variable has changed from the previous value received. The receiving node also verifies that it has received at least one sample of new data within the process-tolerance time. If not, the receiving program takes an appropriate action, such as using the last data received or using default data to make safety- critical decisions. If the sending controller does not receive acknowledgment from the receiving controller in 1 second, it automatically retries the last Send message a second time. Due to network collisions, communication bus loading or other problems that may also occur, the sending controller occasionally has to retry the send a third time. This is why the general rule for data transfer time is 1 to 2 seconds, even though the estimated time (DT) is 800 milliseconds. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 13 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Appendix The application running in the receiving controller includes a network that measures the actual time so that you can validate the assumed 2-second maximum transfer time. Since the process- tolerance time of the receiving node is 4 seconds, the maximum time-out limit is set to 2 seconds (half the process-tolerance time). The receiving node should get at least one sample of new data within the maximum time-out limit. Using this criterion satisfies the basic requirement for using Peer-to-Peer to transfer safety critical data. 14 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Appendix Lab 1: Configuring Peer-to-Peer Data Transfer Time Introduction In this lab, you will configure Peer-to-Peer data transfer time. In a Peer-to-Peer application, data transfer time includes the time required to initiate a send operation, send the message over the network, and have the message read by the receiving node. Objectives After completing this lab, you can: • Estimate memory for Peer-to-Peer data transfer time. • Configure Peer-to-Peer ports for Tri-GP controllers. Lab Procedure Estimate Memory for Peer-to-Peer Data Transfer Time The following steps explain how to estimate memory for Peer-to-Peer data transfer time between a pair of Triconex controllers. The more memory allocated for aliased points the slower the transfer time. 1. Open the TriStation 1131 project used for the sending controller and navigate to the Memory Allocation window. 2. Find the bytes allocated for BOOL, DINT, and REAL points. • Add the number of bytes allocated for all BOOL input, output, and aliased memory points. • Repeat these steps for DINT and REAL points. 3. Open the TriStation 1131 project used for the receiving controller and navigate to the Memory Allocation window. 4. Find the bytes allocated for BOOL, DINT, and REAL points. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 15 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Appendix 5. Add the number of bytes allocated for all BOOL input, output, and aliased memory points. • Repeat these steps for DINT and REAL points. • Use the following worksheet to estimate the transfer time. Table 5 Steps Point Type Allocated Operation Result Bytes 1 Enter the number of bytes for BOOL ÷ 8= each point type on the sending DINT +376 controller and divide or REAL TBS= multiply as indicated and add System the results. Variables Total bytes of aliased points 2 Multiple total bytes sending TS= TBS (step 1) by .01 3 Enter the number of bytes for BOOL ÷ 8= 4= each point type on the DINT 4= receiving controller and divide REAL +376 or multiply as indicated and System add the results. Variables TBR= Total bytes of aliased points 4 Multiple total bytes receiving TR= TBR (step 3) by .01. 5 Get the scan time of sending SS= node in milliseconds by viewing the Scan Time in the diagnostic screen or by using a function block to get the value; get the ACTUAL_SCAN_TIME parameter in the SYS_MP_EXT_STATUS function block. 6 Get the scan time of receiving SR= node in milliseconds by viewing the Scan Period in the Execution List. 7 Multiply the larger of TS or SS by 2. 8 Multiply the larger of TR or SR by 2. 16 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Appendix Steps Point Type Allocated Operation Result Bytes 9 Add the results of step 7 and 8 to get the data transfer time = Adjusted DT. DT 10 If the number of pending send requests in the application is greater than 10, divide the number of send requests by 10. 11 Multiply the results of steps 9 and 10 to get the adjusted data transfer time. 12 Compare the adjusted DT to the process-tolerance time to determine if it is acceptable. Configure Peer-to-Peer Ports for Tri-GP Controllers The following steps explain how to configure an Ethernet port on the Tri-GP CM for communication with other Triconex controllers on a Peer-to-Peer network. 6. Open the TriStation 1131 project and navigate to the Network tab on the CM Setup window. This is the CM Setup window in TriStation 1131 v4.0. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 17 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Appendix 7. Configure the following properties, as needed: • Mode • Transceiver Port • Transceiver Mode • Time Synchronization Allocate Peer-to-Peer Memory This procedure explains how to allocate memory for Peer-to-Peer functions, which is based on the maximum number of Send and Receive numbers you specify. To save memory and minimize scan time, you should use the lowest possible numbers. The maximum number does not have to be the same for Sends and Receives. For example, a TriStation 1131 application might need to send messages to three applications running on other controllers but need to receive messages from only one application. 8. Expand the Application tree, double-click Implementation and click Peer-to-Peer Configuration. 9. Set the following properties by clicking the up and down arrows: • Maximum Number of Peer-to-Peer Receive (function blocks) • Maximum Number of Peer-to-Peer Send (function blocks) 10. If you wish to change the settings for an application running on the controller, you must build the application and click Download All. 18 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Appendix Action Plan List skills you learned in this course that you can use on the job. 1. ______________________________________________________________________ 2. ______________________________________________________________________ 3. ______________________________________________________________________ 4. ______________________________________________________________________ 5. ______________________________________________________________________ 6. ______________________________________________________________________ 7. ______________________________________________________________________ 8. ______________________________________________________________________ 9. ______________________________________________________________________ 10. _____________________________________________________________________ 11. _______________________________ ______________________________________ 12. _____________________________________________________________________ 13. _____________________________________________________________________ 14. _____________________________________________________________________ 15. _____________________________________________________________________ 16. _____________________________________________________________________ 17. _____________________________________________________________________ 18. _____________________________________________________________________ 19. _____________________________________________________________________ 20. _____________________________________________________________________ 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 9 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook