Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
Hello everybody! Recently, I encountered a difficult problem in the process of developing PLC in codesys. I really need your help.
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 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 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.
For this reason, my development has reached a deadlock, and I would like to ask for your help.
The configuration of the " cfg" file:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everybody! Recently, I encountered a difficult problem in the process of developing PLC in codesys. I really need your help.
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 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 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.
For this reason, my development has reached a deadlock, and I would like to ask for your help.
The configuration of the " cfg" file: