Reputation: 3007
I have some PLC code which crashes two different PLCs.
On one PLC (CX2040 x64) whenever I activate the solution, the CPU cores where the project is running on, jumps to 99%. At this time it seems to be stuck in some infinite loop. When this happens, it is impossible to get the TwinCAT runtime into config mode. Neither from the visual studio remote manager, neither if I would remote desktop onto the PLC itself and try to set the TwinCAT run time into config mode using the tray icon.
This is very frustrating. But even more frustrating is that occasionally the PLC would become totally unresponsive. No connection was possible from the Visual Studio remote manager or normal windows remote desktop. The PLC didn't even respond to ping requests from another PC. The only solution was to power cycle the PLC and let it reboot.
On a second PLC (CX2040 x86) I get the following TcRTime watchdog exception:
This PLC never jumps to 99% CPU usage and no hardware reset is needed, because it never goes into a non-recoverable state. I can just put it back into config mode, since it always goes into the exception state. How can I enable the TcRTime watchdog on the x64 PLC, to prevent that one from going into the unrecoverable state.
I know there are some functions which enable a watchdog on the PLC, but these functions are not used in this project! So I have no clue how the watchdog is activated on one PLC, but not the other since the code is the same. Does anyone know?
Upvotes: 0
Views: 845
Reputation: 3007
Turns out I completely forgot that I had enabled the watchdog cycles in the project.
However, I do not understand why the watchdog cycles were triggered on the x86 PLC, but not the x64 one. Maybe on the x64 one the 99% CPU usage didn't cause cycle overruns? Although that seems very unlikely to me.
Upvotes: 0