12/17/2021 11:52 PM | |
Posts: 257 Rating: (75)
|
Hello SIOS Forum Community, We often receive questions regarding the connection of a PC to a S7-1200/1500 and how the data exchange can be realised. With this contribution we would like to give a rough overview with some information about different possibilities of connection. Since there are many different ways to configure/program a data exchange, we provide four possible solutions here. 1. OPC UA Communication via OPC UA is one possibility to realise data exchange. It must be noted that the S7-1500 can work as an OPC server or as an OPC client, but the S7-1200 can only work as an OPC server. Furthermore, a licence is required for the controllers in order to realise communication in productive use. S7 user module for the OPC UA client of a SIMATIC S7-1500 OPC UA Client Library for Microsoft Excel Furthermore, application examples are also available via SIMATIC NET to show how project planning and programming can be carried out. Programming of an OPC UA .NET Client with C# for the SIMATIC NET OPC UA Server Data exchange between S7 station and PC station with the SIMATIC NET OPC Server 2. Open User Communication With the help of the TCP, UDP or ISO-on-TCP protocols, Open User Communication can be implemented with the TSEND_C and TRCV_C blocks. No licence is required and both S7-1200 and S7-1500 can use the instructions. The following application example shows how the communication can be realised: Basic examples for Open User Communication (OUC). 3 Modbus TCP The communication between the S7-1200/1500 and the PC can also be realised via Modbus TCP. Here, too, no licence is required and you can work with the blocks MB_SERVER and MB_CLIENT. as described in the following FAQ: How do you program and parameterize Modbus/TCP communication between S7-1500 CPU and S7-1200 CPU? 4. Connection to a Database Another possibility to realise the data exchange between an S7-1200/1500 and a PC is the connection to a database. This application is described in the following example: Connection of an S7-1200 / S7-1500 to an SQL database. Please note that the described possibilities each have advantages and disadvantages and are not equally suitable for every application. Furthermore, it must be pointed out that the performance of the controllers is burdened by the communication and it must be checked to what extent the controller is suitable for the data exchange and its further tasks. For example, the PC must support the communication type through a suitable application. Best regards, SIMATIC International Technical Support Hub. |
Follow us on