I've been using structured exception handling in C and in other high level languages and I'm familiar with it's intended use.
In one big program I'm developing now with TwinCAT 3 I have a problem in which randomly my programming computer gets disconnected from the controller and the controller reverts to configuration mode or simply hangs.
There are plenty of loops and pointers involved and, even I've seen that same program working before... now it fails some times... (I've changed the TwinCAT version).
Given __TRY __CATCH... are there to be able to help the programmer when a loop or a pointer are not working as expected I've tried to put a __TRY clause at the beginning and a __CATCH clause at the end of the main cycle (and of course the __END_TRY at the end), but the same behavior happens.
See page 5 and 6 of the following PSF file: https://www.codesys.com/fileadmin/data/Images/Download/FeaturesAndImprovementsV3.5SP6_en.pdf
Should I activate something to get the SEH working in the controller (a PC)?
And... How I should declare HandleException? Which type does it has?
As always thank you very much.
- robots, CNC and PLC programming.