<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Reverse bytes in an array</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/9998f2ca94/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/9998f2ca94/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/9998f2ca94/</id><updated>2024-08-22T04:38:49.704000Z</updated><subtitle>Recent posts to Reverse bytes in an array</subtitle><entry><title>Reverse bytes in an array</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/9998f2ca94/?limit=25#9ca7" rel="alternate"/><published>2024-08-22T04:38:49.704000Z</published><updated>2024-08-22T04:38:49.704000Z</updated><author><name>micik</name><uri>https://forge.codesys.com/u/micik/</uri></author><id>https://forge.codesys.com8bbb5bf2a5eff344b265b5eca0da0c66528333f7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
I'm getting the data in Codesys that is an array of 8 bytes. From this array, I need to foram LREAL number, however, because of different endiannes I need to reverse bytes in this array and then copy to a LREAL variable. For this I'm using a loop and it works OK. I wonder if there is a built in function to do this. I have found CAA Memory library but it has functions like reverse bytes in DWORD. But it seems it doesn't have what I need.&lt;br/&gt;
&lt;a href="https://content.helpme-codesys.com/en/libs/CAA%20Memory/Current/CAA_Memory/Reverse-Bit-Swap-ByteWord-order/ReverseBYTEsInDWORD.html" rel="nofollow"&gt;https://content.helpme-codesys.com/en/libs/CAA%20Memory/Current/CAA_Memory/Reverse-Bit-Swap-ByteWord-order/ReverseBYTEsInDWORD.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What I need is a function to reverse bytes in an 8 byte array, or something similar.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>