Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

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!

M172 - Modbus RTU + Saving to EEPROM

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.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Industrial Automation
  • HVAC and Pumping Forum
  • M172 - Modbus RTU + Saving to EEPROM
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
FedericoM
Commander FedericoM Commander
86
Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
53
LeTomas
Lt. Commander LeTomas Lt. Commander
14
M_Cervati
M_Cervati Support
9
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to HVAC and Pumping Forum
Solved
Jacek_S
Lieutenant JG Jacek_S
Lieutenant JG

Posted: ‎2025-08-19 03:54 AM

0 Likes
2
57
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2025-08-19 03:54 AM

M172 - Modbus RTU + Saving to EEPROM

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!

Jacek_S_0-1755600475392.png

Jacek_S_1-1755600510922.png

 

Labels
  • Labels:
  • HVAC
  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
obscuresc
Lieutenant obscuresc
Lieutenant

Posted: ‎2025-08-20 11:53 PM

0 Likes
0
35
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

obscuresc_0-1755759019238.png

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.

See Answer In Context

Reply

Link copied. Please paste this link to share this article on your social media post.

M_Cervati
M_Cervati Support
Support

Posted: ‎2025-08-21 12:39 AM . Last Modified: ‎2025-08-21 12:39 AM

0 Likes
0
34
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

See Answer In Context

Reply

Link copied. Please paste this link to share this article on your social media post.

Replies 2
obscuresc
Lieutenant obscuresc
Lieutenant

Posted: ‎2025-08-20 11:53 PM

0 Likes
0
36
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

obscuresc_0-1755759019238.png

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.

Reply

Link copied. Please paste this link to share this article on your social media post.

M_Cervati
M_Cervati Support
Support

Posted: ‎2025-08-21 12:39 AM . Last Modified: ‎2025-08-21 12:39 AM

0 Likes
0
35
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

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.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

Welcome!

Welcome to your new personalized space.

of