<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Task can lockup if UDP Transmitter or Receiver is not there.</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/5ef5f83b6c/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/5ef5f83b6c/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/5ef5f83b6c/</id><updated>2020-02-27T19:33:29.504000Z</updated><subtitle>Recent posts to Task can lockup if UDP Transmitter or Receiver is not there.</subtitle><entry><title>Task can lockup if UDP Transmitter or Receiver is not there.</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5ef5f83b6c/?limit=25#200c" rel="alternate"/><published>2020-02-27T19:33:29.504000Z</published><updated>2020-02-27T19:33:29.504000Z</updated><author><name>jking22</name><uri>https://forge.codesys.com/u/jking22/</uri></author><id>https://forge.codesys.com9352fc89b1f705dae11d2aa0fc07b8b5685c9a1c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;We've experience that if you have a UDP nework (Ethernet or CAN) the following has the potential to lockup the task that uses the variables.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If the CAN network over which the UDP messages are sent is disconnected, the task that uses these variables can lockup.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If at least 1 value isn't received for every receive UDP Ethenet variable then any task that uses this variable has a tendency to lockup.  --&amp;gt;We work around this by creating a unique task just for copying incoming UDP messages to another list of global variables that can be used by the original task.  &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you broadcast Ethernet UDP to a specific IP address and that IP isn't online the controller can lockup.  --&amp;gt;  We work around this by doing a global broadcast (255.255.255.255 with unique ID)  This gets broadcasted over every Ethernet port.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Yes we can work around these issues, however this doesn't seem to be as it should and the workarounds can be a little cumbersome.  We do not have these issues with the CANopen stack.  &lt;/p&gt;
&lt;p&gt;Is this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;A problem/limitation of the hardware?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A bug within Codesys or at least the libraries I have.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A case where I'm unaware of some bit I can set in a data structure that basically implies.  Don't throw errors if I never receive any UDP message or the destination is not there.  I'll take care of this on my own?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A case where I need to keep resetting an Ethernet fault stack because the destination is not there?&lt;span&gt;[/img]&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;</summary></entry></feed>