0

For my work, I am currently working on a existing system (C++) that communicates with a beckhoff PLC. This PLC reads the current speed of the process and controls a light.

This program needs an update to work with the new thickness measurement. The code for this new measurements works, we tested it on another computer.

The problem is that the communication between the beckhoff and the computer is not working anymore. This problem starts when we rebuild (a part of) the program. To check what went wrong, we used wireshark to check the communication.

In the figure below, you can see the correct communication with the Beckhoff PLC (with Ethercat).

Correct communication

In this figure, you can see the communication after we build the new program.

After build communication

Of course, we tested a lot of option to elimate this problem but at the moment we cannot think of any other method to get the communication back.

Things we tried:

  • Compile the old code to see if the communication still works. This doesn't work. Only the originale .exe file works.
  • Go a few version back to test the communication. This also doesn't work.
  • We check the hardware configuration and the mac adress of the Beckhoff PLC. This is all correct.

It would be great if someone knows a solution for this problem. Please, don't hesitate to ask question for more information about the problem.

kiner_shah
  • 3,939
  • 7
  • 23
  • 37
Wendy
  • 11
  • Did you go from debug build to release build by any chance, or a new compiler version? It kind of looks like some memory that was previously initialized now isn't anymore. If you have control over the code that sends the packet, check if the output buffer and/or packet are correctly initialized. (That's all I can say based on the little information I have) – Pepijn Kramer Nov 19 '21 at 11:26
  • 1
    Without looking at the code, it's difficult to know what may have been changed. Please include a [mre] which highlights the changes done to original code. Please include both the original and the changed version. – kiner_shah Nov 19 '21 at 11:26
  • @PepijnKramer No we didn't go from the debug build to the release build. So that should not be the problem. We also did not change the code for the Ethercat. The initialisation of the Ethercat is also correct. The problem is when the C++ program asks for the speed of the production. For some reason the PLC does not respond in the correct way – Wendy Nov 19 '21 at 11:36
  • @kiner_shah I understand. But at the moment, we didn't change anything of the program. Even rebuilding the old program gives this problem. Because this is a program used by a company that doesn't want to share it, I cannot post the code online. I will check if I can post some part of the Ethercat code. – Wendy Nov 19 '21 at 11:39

0 Answers0