WinCC Modbus TCP Driver
Assuming we have a Schneider PLC and we want to communicate it with WinCC, these would be the steps to configure the communication driver. First of all, we need to know that the communication is via Modbus TCP.
The procedure is as follows: in Tag Management, we add a new Driver and select Modbus TCPIP.
The next step is to add a new connection, giving it a name that interests us.
I named it UnityPro, and then with the right button, we access Connection Parameters.
This is where we will define the type of CPU. From the three available, I selected as shown in the image. By default, the port for Modbus TCPIP communications is port 502, we leave it as is, and in our case, we do not need to define the remote slave address, we leave it at 255.
After conducting some tests, the checkbox for Swap words in 32 bit values must be unchecked.
Now we move on to the driver documentation to know what type of data it allows. This is the information from the manual and will be what we will test.
And for the addressing, we will use the following information.
That said, these are the variables I created to check the operation, which are the ones we have created in our Control Expert project.
We start the Runtime and display the value and Quality code to verify that everything is correct.
Do you remember this fragment "For example, the variable defined as M1 is mapped to address %M1, and in turn, the variable defined as M11 points to Q1.5.1, which is the same address as %M1"? Well, in WinCC, the variable M11-M12-M13, etc., do not update the data correctly; in this example, the outputs should be activated, but they are not!!!
Here you can see the values we have in the PLC Simulator that is on another machine.
This is the configuration we are checking.
An image to illustrate read-only variables and read/write variables.
21-04-2019