<?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/22237d5d0a/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/22237d5d0a/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/22237d5d0a/</id><updated>2024-08-22T04:38:53.352000Z</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/22237d5d0a/?limit=25#8691" rel="alternate"/><published>2024-08-22T04:38:53.352000Z</published><updated>2024-08-22T04:38:53.352000Z</updated><author><name>micik</name><uri>https://forge.codesys.com/u/micik/</uri></author><id>https://forge.codesys.comc72c04512ed3f0937cc11042f14338ef42a701b3</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>