<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Wrong order of bytes received from serial port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b672086ef/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b672086ef/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/0b672086ef/</id><updated>2021-09-13T17:06:05.045000Z</updated><subtitle>Recent posts to Wrong order of bytes received from serial port</subtitle><entry><title>Wrong order of bytes received from serial port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b672086ef/?limit=25#f362" rel="alternate"/><published>2021-09-13T17:06:05.045000Z</published><updated>2021-09-13T17:06:05.045000Z</updated><author><name>damian177</name><uri>https://forge.codesys.com/u/damian177/</uri></author><id>https://forge.codesys.com6904c07b28ea2ccb6cfe6e928594e80c38906f61</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Any idea?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Wrong order of bytes received from serial port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b672086ef/?limit=25#2f65" rel="alternate"/><published>2021-09-12T19:55:12.908000Z</published><updated>2021-09-12T19:55:12.908000Z</updated><author><name>damian177</name><uri>https://forge.codesys.com/u/damian177/</uri></author><id>https://forge.codesys.comef9757b7606e217fd4fc2988bb907caf71a4d90a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It is other problem - not a wrong order of bytes. I should wait for all bytes, how do this in above example  ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Wrong order of bytes received from serial port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b672086ef/?limit=25#5ff6" rel="alternate"/><published>2021-09-12T18:06:23.283000Z</published><updated>2021-09-12T18:06:23.283000Z</updated><author><name>damian177</name><uri>https://forge.codesys.com/u/damian177/</uri></author><id>https://forge.codesys.com99fd2ecbc7d62d0fd9e15a9ee7e40f55ab367fc6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi&lt;br/&gt;
I tried communication with serial port device with SysCom library.&lt;br/&gt;
I was read four bytes like this :&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;IF&lt;/span&gt; &lt;span class="nt"&gt;hCom&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;RTS_INVALID_HANDLE&lt;/span&gt; &lt;span class="nt"&gt;AND&lt;/span&gt; &lt;span class="nt"&gt;bReadCom&lt;/span&gt; &lt;span class="nt"&gt;THEN&lt;/span&gt;
    &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;Read&lt;/span&gt; &lt;span class="nt"&gt;data&lt;/span&gt;
    &lt;span class="nt"&gt;dwRead&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;SysComRead&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;hCom&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;hCom&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;pbyBuffer&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;byteRead&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt; &lt;span class="nt"&gt;ulSize&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;SIZEOF&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;byteRead&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt; &lt;span class="nt"&gt;ulTimeout&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;100&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;pResult&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;Result&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;

&lt;span class="nt"&gt;END_IF&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I get the bytes but still in bad order. What should I do to get byte in appropriate order?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>