<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Cyclic written REAL gets shifted value on RPi MC</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c24d2c57d5/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c24d2c57d5/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/c24d2c57d5/</id><updated>2022-10-27T22:20:12.744000Z</updated><subtitle>Recent posts to Cyclic written REAL gets shifted value on RPi MC</subtitle><entry><title>Cyclic written REAL gets shifted value on RPi MC</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c24d2c57d5/?limit=25#d812" rel="alternate"/><published>2022-10-27T22:20:12.744000Z</published><updated>2022-10-27T22:20:12.744000Z</updated><author><name>onstage</name><uri>https://forge.codesys.com/u/onstage/</uri></author><id>https://forge.codesys.comdd9bdf9731da3ab4da3afaca689b2509421687b2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Stuff learned every single day, thanks! &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Cyclic written REAL gets shifted value on RPi MC</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c24d2c57d5/?limit=25#8d2f" rel="alternate"/><published>2022-10-27T22:09:45.702000Z</published><updated>2022-10-27T22:09:45.702000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.comfdbba6b261ad131518422d4fada5716bb361a0eb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thats just how reals work. see &lt;a href="https://www.h-schmidt.net/FloatConverter/IEEE754.html" rel="nofollow"&gt;https://www.h-schmidt.net/FloatConverter/IEEE754.html&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Cyclic written REAL gets shifted value on RPi MC</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c24d2c57d5/?limit=25#6516" rel="alternate"/><published>2022-10-27T20:38:06.245000Z</published><updated>2022-10-27T20:38:06.245000Z</updated><author><name>onstage</name><uri>https://forge.codesys.com/u/onstage/</uri></author><id>https://forge.codesys.com73df451b5839afcbcdb13d69ccd728f9f6333985</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This is an input of another POU being cyclically written from the main POU.&lt;br/&gt;
&lt;img src="./attachment/attachment.png" width="50%"/&gt;&lt;/p&gt;
&lt;p&gt;Does anybody have an idea of why the assigned and actual values differ?&lt;br/&gt;
Different assigned value produces different delta.&lt;/p&gt;
&lt;p&gt;The only piece of code in the "another" POU that deals with this var looks like this:&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Encoder handling&lt;/em&gt;)&lt;br/&gt;
    IF bInvertEncoder THEN&lt;br/&gt;
        nActPos:= (DWORD_TO_REAL(SHL(WORD_TO_DWORD (InEncoder&lt;a class="alink" href="/forge/talk-ru/1/"&gt;[1]&lt;/a&gt;XOR 16#FFFF),16) OR InEncoder&lt;span&gt;[0]&lt;/span&gt;XOR   16#FFFF)&lt;em&gt;nEncScale)+nEncBias;&lt;br/&gt;
    ELSE&lt;br/&gt;
        nActPos:= (DWORD_TO_REAL(SHL(WORD_TO_DWORD (InEncoder&lt;a class="alink" href="/forge/talk-ru/1/"&gt;[1]&lt;/a&gt;),16) OR InEncoder&lt;span&gt;&lt;span&gt;[0]&lt;/span&gt;&lt;/span&gt;)&lt;/em&gt;nEncScale)+nEncBias;   &lt;br/&gt;
    END_IF&lt;/p&gt;
&lt;p&gt;As I don't have access to any other hardware at the moment I cannot verify this, but I believe that this problem didn't exist prior to updating Runtime from 4.0.1.0 to 4.5.0.0 and IDE to V3.5 SP18 Patch 3. &lt;/p&gt;
&lt;p&gt;I've tried the obvious things, reboot of PC and target, origin reset of target. (Which is a RPi 4B with 32-bit OS)&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>