<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Can't get the IEC var address correcttly  when using the function "IecVarAccGetAddress 2"</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/14d8a1761a/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/14d8a1761a/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/14d8a1761a/</id><updated>2020-02-27T13:51:17.036000Z</updated><subtitle>Recent posts to Can't get the IEC var address correcttly  when using the function "IecVarAccGetAddress 2"</subtitle><entry><title>Can't get the IEC var address correcttly  when using the function "IecVarAccGetAddress 2"</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/14d8a1761a/?limit=25#a5a1" rel="alternate"/><published>2020-02-27T13:51:17.036000Z</published><updated>2020-02-27T13:51:17.036000Z</updated><author><name>zhanjun717</name><uri>https://forge.codesys.com/u/zhanjun717/</uri></author><id>https://forge.codesys.com7c46af7b69d13bf89fc35ebb063a466e3d3fac61</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello ! Recently, I encountered a difficult problem in the process of developing PLC in codesys. I really need your help.&lt;/p&gt;
&lt;p&gt;In my current PLC, I use CoDeSys V3.4 SP4 software. When I define "Retain. SRAM. Size" and "Retain. SRAM. Address" in the CFG file, I can start my APP normally during the system reboot process, but this configuration will make it impossible for me to obtain the address of IEC variables successfully through the "void&lt;em&gt; IecVarAccGetAddress 2" function provided by 3S. When these variables are defined in the CoDeSys program(ST) as global structure arrays under RETAIN, and when I specify "Retain.SRAM.Size" and "Retain.SRAM.Address" and "Retain.SRAM.AddressMapped" in the CFG file, I can correctly obtain the address of IEC variables from the bottom through the "void&lt;/em&gt; IecrAccGetAd2" function provided by 3S, When these variables are defined in the CoDeSys program(ST) as global structure arrays under RETAIN, But my APP can no longer start automatically.&lt;/p&gt;
&lt;p&gt;For this reason, my development has reached a deadlock, and I would like to ask for your help.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: question.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4263"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>