after investigating the problem, I found that the problem comes from the ReceiveString function over a TCP connection. If the connection is lost (unplugged cable), The CPU hangs in the function, The the other charts are still running, but the OPC communication with the supervisor PC is lost and the debug view in pacControl crashes. When I replug the cable, everything comes up again. I tried to protect the call of ReceiveString (with IsCommunicationOpen), it is better, but the problem is still possible.
I am going to try to set the communication timeout value to see if it does anything.
If you have any advice on how to use this function securely, let me know,