Modicon PAC Forum
A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.
Posted: 2020-01-15 10:57 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-15 10:57 AM
I have a situation where my program is storing real variables with the starting word is an odd %mw for example %mw1553. My version of the program from a week ago the same real in the same structure was at %mw1554. There is not change to the structure, no new variables added or removed. I was under the impression that all real data types need to start at even address. Can anyone help me find what setting I may have changed or what may have happened here. We are running unity 13.1, and ran an update recently. All I can recall settings wise that has been changed is increasing memory size from 5000 to 7000 and "allowin dynamic arrays". This is an M580 2040
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-22 08:50 AM
hey @Anonymous user , thank you for your question
I moved it to this forum when the community of experts will be able to provide you the right support
@Oncom , I know you post a lot about M580 , can you help here please?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-23 07:54 PM
The reason was due to unity shuffling memory addresses when it is in simulation mode
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-23 08:12 PM
@Omaelk sure.
@Anonymous user Hi,
do you mean your Odd %MW address is incidentally shifted to Even after you Rebuild?
Actually, Even addressing on Real data type is not new feature. if you try on Unity Pro 8.0 giving Odd address on Real data type variable it would be Error.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-23 08:29 PM
yes I know its not a new feature, that is the problem. In our original developed program we put a ddt at address %mw1000 for example. the first word is at %mw1000, the second thing in there is a real and is placed automatically at %mw1002. If you put your plc in simulation mode it will put the word at %mw1000 and the real at %mw1001
For testing a program in simulation mode the plc re positions reals that are in DDTs to be able to start on odd addresses without error. I see this as a huge flaw with the simulator mode, it should act identically to regular operation in terms of memory allocation.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-23 11:26 PM
Ok, now I understand what you are facing.
And I try this also on unity 8.0 and control expert 14.1 and you are absolutely right. 😂
Hi @Omaelk can you mention/forward to M580 Product manager / R&D team. about this issue. Thanks
Simulation:
Standard:
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-23 11:29 PM
Hello,
The problem comes from the 32 bits alignment in the M580 platforms. If you map a structure on %MW, due to the 32 bits alignment some holes can be created to align the 32 bits variable on even addresses. (DWORD, REAL...) this is not the case when you use the simulator which is based on 16bits alignment. this is due to the legacy platforms which are all 16 bits, when the simulator was developed. This is explained in the online help in the topic: DDT: Mapping Rules.
KR
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-24 12:10 AM
I just forgot something, There is a warning message that can be triggered in case of mapping compatibility. this message is displayed if Control Expert needs to align the 32 bits variable:
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-09-30 08:22 PM
Hi @Eric_Coudurier ,
Is there a workaround to this issue other than filling these holes with dummy integers to be able to work on the simulator? Do you know if there is a newer release of the simulator that addresses this issue?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-10-13 06:55 AM
Unfortunately there is no other options. There is no evolution plan in the new ECE version V15 for this issue.
If you use OFS server, with unlocated data there is no issue. the issue is only present when you use located data on %MW.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-10-13 07:06 AM
An other way to overcome the issue, is to arrange the DDT to avoid the "holes". For example, instead of creating a structure like a Word, Real and Real, you can create it using a Real, Real and a Word.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.