<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Comparing Arrays of structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1d6698e28d/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1d6698e28d/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/1d6698e28d/</id><updated>2024-08-23T21:21:55.112000Z</updated><subtitle>Recent posts to Comparing Arrays of structure</subtitle><entry><title>Comparing Arrays of structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1d6698e28d/?limit=25#ba48" rel="alternate"/><published>2024-08-23T21:21:55.112000Z</published><updated>2024-08-23T21:21:55.112000Z</updated><author><name>gilbertamine</name><uri>https://forge.codesys.com/u/gilbertamine/</uri></author><id>https://forge.codesys.com517edb3894fd46c6345012fd27194da8a6220010</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If I knew it was this simple...&lt;br/&gt;
Exactly what I was looking for ! Thanks you very much.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Comparing Arrays of structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1d6698e28d/?limit=25#ffc9" rel="alternate"/><published>2024-08-23T06:54:49.625000Z</published><updated>2024-08-23T06:54:49.625000Z</updated><author><name>gatto</name><uri>https://forge.codesys.com/u/gatto/</uri></author><id>https://forge.codesys.comb633278f7a73881e9f0041e39450956bb6a5bda7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, something like this ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Comparing Arrays of structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1d6698e28d/?limit=25#02b6" rel="alternate"/><published>2024-08-22T13:51:17.123000Z</published><updated>2024-08-22T13:51:17.123000Z</updated><author><name>gilbertamine</name><uri>https://forge.codesys.com/u/gilbertamine/</uri></author><id>https://forge.codesys.com46c392f0ca93f8c99fb9cdb6d83bb6a301426068</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Everybody,&lt;/p&gt;
&lt;p&gt;I'm looking for a simple way of comparing two array of a structure.&lt;br/&gt;
My structure is define like this :&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;TYPE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Positions_T&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="nt"&gt;STRUCT&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;PosX&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;DINT&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;PosY&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;DINT&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;PosZ&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;DINT&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_STRUCT&lt;/span&gt;
&lt;span class="nt"&gt;END_TYPE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I have multiples Var : ARRAY &lt;span&gt;[0..220]&lt;/span&gt; OF Positions_T, that I need  to compare quickly.&lt;br/&gt;
I don't really want to do a Loop that goes by every 220 points and compare each one of them so I was wondering if there is another way.&lt;br/&gt;
I came accross the MEM.Compare function, but it require to know the size in Bytes of the memory, and I don't know how to do that...&lt;/p&gt;
&lt;p&gt;Has anybody an idea on how to do the comparing easily ?&lt;br/&gt;
Thanks in advance&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>