Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ToM-MaS opened this issue Sep 8, 2019 · 1 comment
Open

Comments

@ToM-MaS
Copy link

ToM-MaS commented Sep 8, 2019

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 )

@Serhioromano
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants