<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CoDeSys 2.3.9.7 and target change bug in system event</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/a1842cd01e/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/a1842cd01e/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/a1842cd01e/</id><updated>2020-02-27T23:18:41.089000Z</updated><subtitle>Recent posts to CoDeSys 2.3.9.7 and target change bug in system event</subtitle><entry><title>CoDeSys 2.3.9.7 and target change bug in system event</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/a1842cd01e/?limit=25#0cb3" rel="alternate"/><published>2020-02-27T23:18:41.089000Z</published><updated>2020-02-27T23:18:41.089000Z</updated><author><name>yanapa</name><uri>https://forge.codesys.com/u/yanapa/</uri></author><id>https://forge.codesys.coma8c879804dffd5ecd1e08ffbac53919bb1bd9adb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a program made with CoDeSys and that can run on multiple target:&lt;/p&gt;
&lt;p&gt;Wago 750-841, 750-871, 750-849, etc.&lt;/p&gt;
&lt;p&gt;I'm using the USR led that exist on these devices and that can be blink programmatically.&lt;/p&gt;
&lt;p&gt;To warn the user that the PLC is in RUN or STOP I'm using system events to run some PRG : LED_START_PRG, LED_STOP_PRG (wichh are called nowhere).&lt;/p&gt;
&lt;p&gt;A problem occured when I'm doing a target change, because system events are cleared but a bug seems to be present because when I upload the rebuilt project to the PLC it turns to a failure mode when set to run.&lt;/p&gt;
&lt;p&gt;I'm using a telnet connection with the PLC serial cable to see that the error occured when calling the LED_START_PRG (that should not be called as system events table has been cleared and concerned programs are not built and linked in the binary file, they are grayed).&lt;/p&gt;
&lt;p&gt;Any idea to fix this issue, because every time I forgot to re-add system events on target change, I'm crashing the PLC.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>