Time violation in cyclic task

Hi all,

We have a project in automation studio and we have a problem in cyclic task C#1, sometimes the PLC goes to service mode, because of time violation. I checked the profiler and I’m not sure how to read this, because there’s is no record of program which might have failed.
I can see that class #1 has started but after interruption, system exception appears and plc goes to service mode.

I already checked programs in cyclic #1 (FOR loops, code effectivity.) but it seems to be ok.
In cyclic 1 programs we have a lot of variables which are mapped to opc because we’re using 3rd party HMI. Can it have an impact ?

Thanks for any advice.

Hello and welcome to the Community,

The best way to diagnose cycle time violations is with displaying profiler data as a diagram. You should see what delays an execution and is a reason for the ArException. Be sure to set up the profiler correctly before the error happens; see How to create a long profiler with enough data for analysis Community topic.

It’s also a good idea to check normal (average) CPU usage (either with profiler or with SDM). It could also be that the CPU is already on the edge and every little execution delay causes the cycle time violation.

1 Like