modbus icon indicating copy to clipboard operation
modbus copied to clipboard

How to not loose values or not read values twice (synchronisation)

Open ToM-MaS opened this issue 4 years ago • 1 comments

The Energy meters made by www.janitza.de update their internal modbus registers every 0.2 seconds. When I poll these values each 0.2 seconds over TCP, I want to:

  • not loose an updated value because in my setup each value is important
  • not read a value twice (or discard a duplicated value an immediately try to catch the next updated value) But because afaik modbus does not provide any synchronisation method. I'm not sure how and where to solve this. Does anyone have an idea?

( https://www.janitza.de/betriebsanleitungen.html?file=files/download/manuals/current/UMG96RM/EL/Janitza-Manual-UMG96RM-EL-Modbus-adress-list-and-formulary-en.pdf )

ToM-MaS avatar Sep 08 '19 22:09 ToM-MaS

I understand what you mean, and this is not an answer to how to do that but rather suggestions.

From what you describe I understand that you want to calculate energy. I have to say that the method you've chosen is not used for that purpose. That one is more lime monitoring purposes. Imagine your request for some reason is longer than 0.2? First, you must use ticker to send requests, in that case, you can send a new request while you did not get a previous one. You must handle that. And what does connection lose for a minute? Then your data is not reliable. It is never reliable. Then what is the purpose to get data if you cannot reliably estimate it?

The solution on meter there is impulse output. For instance, one pulse is 100W. It is very hard to miss impulse. So, you use PLC and calculate impulses. You can also measure the time between impulses, and you can also show current consumption and other valuable and reliable data.

Serhioromano avatar Apr 02 '20 13:04 Serhioromano