<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to __TRY __CATCH questions</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6300b1d3a7/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6300b1d3a7/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/6300b1d3a7/</id><updated>2020-02-27T13:47:44.635000Z</updated><subtitle>Recent posts to __TRY __CATCH questions</subtitle><entry><title>__TRY __CATCH questions</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6300b1d3a7/?limit=25#6b18" rel="alternate"/><published>2020-02-27T13:47:44.635000Z</published><updated>2020-02-27T13:47:44.635000Z</updated><author><name>Joan M</name><uri>https://forge.codesys.com/u/joan-m/</uri></author><id>https://forge.codesys.com7a930c9f120cd1857e2b5cd72a515b3866f7dea6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you Josep M.&lt;/p&gt;
&lt;p&gt;It was well implemented (as you did and also as the code in the sample on that linked PDF file).&lt;/p&gt;
&lt;p&gt;I have not been able to find information about the enumeration __system.exceptionCode, but by now I think I won't need it.&lt;/p&gt;
&lt;p&gt;Thank you again!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>__TRY __CATCH questions</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6300b1d3a7/?limit=25#d07a" rel="alternate"/><published>2020-02-27T13:47:44.574000Z</published><updated>2020-02-27T13:47:44.574000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.com5c93601b88f4977580f0f98fff1e54627c99acfe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Joan.&lt;/p&gt;
&lt;p&gt;It  works for me as:&lt;/p&gt;
&lt;p&gt;You can found __system.exceptionCode enum on Codesys help.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Captura de 2017" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2753"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Captura de 2017" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2755"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Captura de 2017" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2754"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>__TRY __CATCH questions</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6300b1d3a7/?limit=25#0f55" rel="alternate"/><published>2020-02-27T13:47:44.512000Z</published><updated>2020-02-27T13:47:44.512000Z</updated><author><name>Joan M</name><uri>https://forge.codesys.com/u/joan-m/</uri></author><id>https://forge.codesys.coma9412a2e0a2232162f84254eae581875f1dd961f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;I've been using structured exception handling in C and in other high level languages and I'm familiar with it's intended use.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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).&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;See page 5 and 6 of the following PSF file: &lt;a class="" href="https://www.codesys.com/fileadmin/data/Images/Download/FeaturesAndImprovementsV3.5SP6_en.pdf" rel="nofollow"&gt;https://www.codesys.com/fileadmin/data/Images/Download/FeaturesAndImprovementsV3.5SP6_en.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Should I activate something to get the SEH working in the controller (a PC)?&lt;/p&gt;
&lt;p&gt;And... How I should declare HandleException?  Which type does it has?&lt;/p&gt;
&lt;p&gt;As always thank you very much.&lt;/p&gt;
&lt;p&gt;Joan.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>