<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to NaNs don't work in the simulator</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/24cd42656b/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/24cd42656b/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/24cd42656b/</id><updated>2020-02-27T20:40:18.762000Z</updated><subtitle>Recent posts to NaNs don't work in the simulator</subtitle><entry><title>NaNs don't work in the simulator</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/24cd42656b/?limit=25#1060" rel="alternate"/><published>2020-02-27T20:40:18.762000Z</published><updated>2020-02-27T20:40:18.762000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.comc960a18926e5e036e0a0bbb9c351f0dddbf4a7cb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;so what is the definition of a NaN.&lt;br/&gt;
so poking is not always giving an answer.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>NaNs don't work in the simulator</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/24cd42656b/?limit=25#9409" rel="alternate"/><published>2020-02-27T20:40:17.379000Z</published><updated>2020-02-27T20:40:17.379000Z</updated><author><name>Yegor</name><uri>https://forge.codesys.com/u/yegor/</uri></author><id>https://forge.codesys.com7c2e4c334387a3fe7e6f3a41976861f0173ce116</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It seems I've forgotten my download area credentials (did I ever have them? there's no link to try to restore the password), so the most recent version I have is 2.3.9.41 and the misbehavior can be reproduced in it.&amp;gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
Are you developing a test suite for a CoDeSys compiler?&lt;br/&gt;
Nah, that sounds like a 3S developers' job. I'm just &lt;a class="" href="http://forum.codesys.com/viewtopic.php?f=1&amp;amp;t=6002&amp;amp;p=11410&amp;amp;lan=en" rel="nofollow"&gt;poking&lt;/a&gt; this creature with a pointy stick for fun. And I think in this particular case the runtime is to blame, not the compiler. It'd be nice to have NaNs consistently and reliably supported.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>NaNs don't work in the simulator</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/24cd42656b/?limit=25#5ce8" rel="alternate"/><published>2020-02-27T20:40:13.509000Z</published><updated>2020-02-27T20:40:13.509000Z</updated><author><name>Rapucha</name><uri>https://forge.codesys.com/u/rapucha/</uri></author><id>https://forge.codesys.com8ecca5ad1a9ab10dd2a9d23e92d30af7433024a5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;2.3.9.40 build has Apr 16 2013 date. I will be surprised with any fixes ((&lt;/p&gt;
&lt;p&gt;Are you developing a test suite for a CoDeSys compiler?&lt;/p&gt;
&lt;p&gt;PS &lt;br/&gt;
I was wrong, 2.3.9.49 is available for download now. Have you tried it?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>NaNs don't work in the simulator</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/24cd42656b/?limit=25#e7e0" rel="alternate"/><published>2020-02-27T20:40:12.101000Z</published><updated>2020-02-27T20:40:12.101000Z</updated><author><name>Yegor</name><uri>https://forge.codesys.com/u/yegor/</uri></author><id>https://forge.codesys.comfc55031d575abbcdcc7bc7f705443b859049cbd7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The CoDeSys 2.3 sim and PLCWinNT don't seem aware of the &lt;a class="" href="https://en.wikipedia.org/wiki/NaN" rel="nofollow"&gt;not-a-number&lt;/a&gt; type. Attached to this post (in reverse order, apparently) are a few screenshots demonstrating the improper handling of NaNs by the simulator and PLCWinNT.&lt;/p&gt;
&lt;p&gt;Use the following code to reproduce the results:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;PROGRAM&lt;/span&gt; &lt;span class="nt"&gt;PLC_PRG&lt;/span&gt;
&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nt"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;UDINT&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;2&lt;/span&gt;&lt;span class="p"&gt;#&lt;/span&gt;&lt;span class="nn"&gt;0111_1111_1000_0000_0000_0000_0000_0001&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nt"&gt;nan&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;POINTER&lt;/span&gt; &lt;span class="nt"&gt;TO&lt;/span&gt; &lt;span class="nt"&gt;REAL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nt"&gt;equ&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;span class="nt"&gt;nan&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;ADR&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;equ&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;nan&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nt"&gt;nan&lt;/span&gt;&lt;span class="o"&gt;^;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;img alt="IMG: div_zero_sim.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1462"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: div_zero_plc.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1461"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: nan_vs.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1460"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: nan_sim.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1459"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: nan_plc.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1458"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>