Is there a way to simulate/calculate Hardware constraints while running an ArSim?
I’m asking because ive been working with a X20CP0411 recently. My project was working fine in simulation, but on real hardware, it turns out i have not enough RAM.
It would be great to know that before having the actual hardware present.
But there are some System-Features like MappView with require some minimal RAM-Size of the PLC, which is documented in AS-Help and hast to be known by the developer.
In general i would recommand to get in contact with B&R Sales and use their expertise. They can also let Support have a look at it, if the facts are on the edge or unclear.
I was already in contact with B&R support. In fact, they asked me to create this post because they weren’t sure themself.
The problem was that I was using Safety, MappConnect(which requires mappView), and that exceeded the RAM on this CPU.
I thought maybe there’s something similar to the hardware analyzer to automatically calculate the minimum required resources.
Also (at least for mappView), there seems to be no specific mention of RAM requirements.
Only that the recommended minimal CPU is CP0484(which is bigger than the one I was using).
But now we have a better idea about the limitations of these small CPU’s.
To the best of my knowledge, there is nothing like that. That is why, before you start new project development, define the maximum functionality you would like to have and create simulation software and test it. What is good with B&R is that even if you underestimate the hardware or your project gets more complex over time, you can “easily” exchange the hardware in the AS project.
For mapp Safety i tested once to use only Library SfDomain and skip default Safety-HMI to lower requirements. This can work to get to the smaller PLC.
But if there are other Components requiering MappView you normaly need some RAM for it.
I am not sure why mapp View itself does not have it in its requirements. But the other Components which use mappView, like Cockpit does have a hint for it.
Hi @mreiter ,
I faced same issue in the past, and usually I disable features (mappView, mappCockpit…) until the CPU is running fine.
Once CPU is running I enable one feature each time time until I see the issue back and I monitor memory resources with Online Info :
=======================
Example (typical use case: system is running fine and after upgrades we see memory issue):
Last week one customer (APC3100 + Hypervisor) updated mapp libraries (mapp Services, mapp Motion, mapp View, mapp Cockpit) and He reported a service mode all the time He transferred a small change:
at the end our local Support (thanks Anthony), found the cause of the problem: the memory assigned to AR embedded (default value 512 MB) was too small with new mapp libraries:
that’s a very interesting topic!
As @kovarj already mentioned, also to the best of my knowledge there’s no functionality to simulate or pre-calculate the DRAM need of an application (especially, depending on the functionality used in the project, because there’s DRAM allocated and de-allocated by system, drivers, functions and so on).
But I was curious if there’s at least a way to get a rough estimation.
So I tried the following:
using the MEMxInfo function block to get information of DRAM usage
measured once the DRAM usage of an empty ArSim running Automation Runtime only
measured once the DRAM usage on the empty hardware just running AR (I only had a X20EM0612 as hardware available, which has quite much DRAM)
with these two values, I tried to calculate in ArSim the estimation of DRAM needed on the real hardware
you need to have a real PLC at least once, to get a base value about the DRAM usage of “AR installed only”
for sure, some functionality will need more or less DRAM if running in ArSim or in a real system
It’s always just a rough estimation, nothing more
just have done one test until now, so I’m not sure if it the relationsship I’ve seen always hold true
…
Nevertheless I wanted to share those information, maybe someone can utilize it.
For example when having already the suitable PLC type as hardware, but developing most of the time in simulation with still keeping an eye on the rough estimation of DRAM needed and signaling it in ArSim application if some threshold is reached.
If available, I’ll try to do one more test with a smaller PLC to solidify the findings (or destroying them )
small note, Martin, when you do tests proposed by Alex be sure all AS watch windows are closed, don’t open SDM, don’t make SystemDump because all those tools needs DRAM.
X20CP0411 has only 128 MB.
I don’t know if you are using mappMotion and in case if you have enabled mappCockpit, but just for that I found a note in the Help:
I’ve tried your suggestion to check the RAM load, but I’m getting conflicting results.
ARsim Baseload: 179.7 MB
ARsim with Program: 268.8 MB
Only Program in ARsim: 89.1 MB
CP0411 Baseload: 65.1 MB
CP0411 with Program: 107.3 MB
Only Program on CP0411 : 42.2 MB
So my Program size doesn’t match at all between Sim and actual Hardware. Also, my RAM usage in Sim is way higher than yours.
What I have noticed is that you used AS4.9 for your tests. I’m on the newest AR6.6.2 .
I don’t know if there is a huge difference between AR4 and AR6, but could you maybe repeat your test with AS6.6 to see if there’s a noticeable difference?
hmm okay, it seems that AR6 is behaving very different then my tests done with AR4.
Unfortunately, I don’t have access to suitable test hardware right now.
But at least I can confirm the around 180 MB with AR6.6 in simulation with an empty project (no mappView in Logical View, because as I known mappView is always deployed as soon as it exists).