<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Indirect address on a %IW</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/793d767454/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/793d767454/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/793d767454/</id><updated>2020-04-15T12:47:02.260000Z</updated><subtitle>Recent posts to Indirect address on a %IW</subtitle><entry><title>Indirect address on a %IW</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/793d767454/?limit=25#a9cc" rel="alternate"/><published>2020-04-15T12:47:02.260000Z</published><updated>2020-04-15T12:47:02.260000Z</updated><author><name>bertrand42</name><uri>https://forge.codesys.com/u/bertrand42/</uri></author><id>https://forge.codesys.comdf705bba141b581aeeff98eb79d1026bdeaa1321</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I created an FB with enter a pointer on an address %IW (that's why I use adr (%IW400)). I want to collect the values of %IW400 a %IW845 in an integer table&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Indirect address on a %IW</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/793d767454/?limit=25#967f" rel="alternate"/><published>2020-04-15T12:11:16.783000Z</published><updated>2020-04-15T12:11:16.783000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.com0a6f29ad8988cbd1dd819c5ad01f248ba313ca01</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am lost. What are you trying to do?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Indirect address on a %IW</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/793d767454/?limit=25#b135" rel="alternate"/><published>2020-04-15T12:07:37.857000Z</published><updated>2020-04-15T12:07:37.857000Z</updated><author><name>bertrand42</name><uri>https://forge.codesys.com/u/bertrand42/</uri></author><id>https://forge.codesys.comfd04ca262d40a2750bd0e983fa2d70739b2e44a5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;yes the %IW400 is 446 length UINT, the pb is not the length, my first post indicates my problem&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Indirect address on a %IW</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/793d767454/?limit=25#d81b" rel="alternate"/><published>2020-04-15T11:59:45.265000Z</published><updated>2020-04-15T11:59:45.265000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.combd2bb2b9160c89849e33d4d6b3eefab71cda50bc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;All you need is:&lt;/p&gt;
&lt;p&gt;Tab AT %IW400 : ARRAY&lt;span&gt;[0..445]&lt;/span&gt; OF UINT;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Indirect address on a %IW</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/793d767454/?limit=25#d023" rel="alternate"/><published>2020-04-15T09:49:24.419000Z</published><updated>2020-04-15T09:49:24.419000Z</updated><author><name>bertrand42</name><uri>https://forge.codesys.com/u/bertrand42/</uri></author><id>https://forge.codesys.com7b2f1b60cf34391111ae6ec4a5ef6f2d6ac601e6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for your answer,&lt;/p&gt;
&lt;p&gt;Does that mean I have to concat the data from two pointing addresses and put them in an int? &lt;/p&gt;
&lt;p&gt;And in my previous example what is the value of the second word?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Indirect address on a %IW</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/793d767454/?limit=25#309f" rel="alternate"/><published>2020-04-15T09:19:16.369000Z</published><updated>2020-04-15T09:19:16.369000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.come98457aff85ec7774ab8c97767e3bd4c5a727d4a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Pointers are in bytes, so you will have to add 2 * IIdxIn.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Indirect address on a %IW</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/793d767454/?limit=25#459a" rel="alternate"/><published>2020-04-15T08:49:19.051000Z</published><updated>2020-04-15T08:49:19.051000Z</updated><author><name>bertrand42</name><uri>https://forge.codesys.com/u/bertrand42/</uri></author><id>https://forge.codesys.comd4d003889c129d05be9d247d0d21a5ebfda3c0c7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;FOR IIdx_IN := 0 TO 100  BY 1 DO&lt;br/&gt;
    APtrBCmdIn&lt;span&gt;[IIdx_IN]&lt;/span&gt; := PtrAL_InData + IIdx_IN ;&lt;br/&gt;
    PtrBSrc := APtrBCmdIn&lt;span&gt;[IIdx_IN]&lt;/span&gt;;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;Tab&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;IIdx_IN&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PtrBSrc&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_FOR&lt;/p&gt;
&lt;p&gt;Declaration    APtrBCmdIn: ARRAY&lt;span&gt;[0.445]&lt;/span&gt; OF POINTER TO UINT; &lt;br/&gt;
                        Tab: ARRAY&lt;span&gt;[0..445]&lt;/span&gt; OF UINT;&lt;br/&gt;
                        PtrAL_InData : POINTER TO UINT;   // pointer to start address   %IW  -&amp;gt; ex: adr(%IW400)&lt;br/&gt;
                        IIdx_IN : BYTE;  // index&lt;/p&gt;
&lt;p&gt;My problem is that in the tab the values are informed both words......&lt;/p&gt;
&lt;p&gt;That is to say, first word of tab the value is correct, second word the value is not that expected, Third word value expected to the second word etc.&lt;/p&gt;
&lt;p&gt;Thank you for your help&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>