Ask Me About Webinar: Data Center Assets - Modeling, Cooling, and CFD Simulation
Join our 30-minute expert session on July 10, 2025 (9:00 AM & 5:00 PM CET), to explore Digital Twins, cooling simulations, and IT infrastructure modeling. Learn how to boost resiliency and plan power capacity effectively. Register now to secure your spot!
HVAC and Pumping Forum
Support Forum for HVAC and pumping machines, Modicon M17x and EcoStruxure Machine Expert HVAC software for chillers, AHU, CRAC units for datacenters or process chillers applications - from design, implementation to troubleshooting and more, by Schneider Electric.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-08-19 03:54 AM
Hello everyone,
I have a topic related to the integration of Carel HMI panels and a Modicon M172 PLC.
Currently, the communication between the PLC and the Basic HMI panel is done via Modbus RTU.
What I would like to achieve is that, after a power loss, the air handling unit retains its last operating state. This means I need to store the following parameters in non-volatile memory:
setpoint temperature,
operating mode (e.g. ECO / Comfort),
ON/OFF status.
The unit is controlled simultaneously from the BMS system, from the PLC, and from the Carel panel, so correctly saving and restoring the parameters after a restart is critical.
I have already tried different approaches and tests, but I keep getting the error: Invalid Access to Variable (screens attached).
My question is:
What is the best and safest way to handle writing to EEPROM, so as not to damage it with frequent writes, while still ensuring data persistence?
Thanks in advance for your help and guidance!
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: 2025-08-20 11:53 PM
Hi @Jacek_S,
In the help menu for the M172 covering memory, there is some retain memory available at %MD102.0 that is maintained by the RTC battery. This should persist through a power cycle without having the write limitation that EEPROM has. I do not have much experience with this memory.
I recommend being mindful of the different restart controls that affect the retain storage.
and, under watchdog errors, I think that the retain memory might be cleared.
There might be some methods that make EEPROM useable in the way that you're asking but it would be likely be harder than using retain.
The error you are getting is because you are not using the 'ADR' or '?' functions to get the address of the EEPROM parameter, which is what the 'sysWritePar' functions take.
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: 2025-08-21 12:39 AM . Last Modified: 2025-08-21 12:39 AM
Hi,
in the TM172P the eeprom writing procedure is protected to avoid to perform unuseful writings if the same value is already present in the memory location. So don't worry if you write the same value continuously because BIOS performs this protection procedure.
Then the compilation error is due to a wrong usage of FB sysWritePar and also the output of the last MOVE to an eeprom parameter PLCStartStop. To write a parameter you need to use the FB sysWritePar.
Best regards
Marco Cervati
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: 2025-08-20 11:53 PM
Hi @Jacek_S,
In the help menu for the M172 covering memory, there is some retain memory available at %MD102.0 that is maintained by the RTC battery. This should persist through a power cycle without having the write limitation that EEPROM has. I do not have much experience with this memory.
I recommend being mindful of the different restart controls that affect the retain storage.
and, under watchdog errors, I think that the retain memory might be cleared.
There might be some methods that make EEPROM useable in the way that you're asking but it would be likely be harder than using retain.
The error you are getting is because you are not using the 'ADR' or '?' functions to get the address of the EEPROM parameter, which is what the 'sysWritePar' functions take.
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: 2025-08-21 12:39 AM . Last Modified: 2025-08-21 12:39 AM
Hi,
in the TM172P the eeprom writing procedure is protected to avoid to perform unuseful writings if the same value is already present in the memory location. So don't worry if you write the same value continuously because BIOS performs this protection procedure.
Then the compilation error is due to a wrong usage of FB sysWritePar and also the output of the last MOVE to an eeprom parameter PLCStartStop. To write a parameter you need to use the FB sysWritePar.
Best regards
Marco Cervati
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.
Welcome to your new personalized space.
of