-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add FLOAT64-IEEE support to inputs.modbus #8361
Comments
@Nemecsek please do feel free to make a PR with the changes |
Thank you.
I will try again when I am not so pressed by other job related tasks... |
Also interested (For a Siemens PAC2200) |
@youcann, sorry but I continuously get a |
Thanks alot! |
@youcann, I cannot push my branch to github, that's the problem. So no PR. Credentials have been reset: HTTPS URL has been tried with both formats:
It should be straightforward, but actually it isn't. I don't want to fill this thread with unrelated stuff. If you can push it using your account and PR, it would be great. |
Created a PR for this: #8474 |
@Nemecsek you cannot push to Telegraf directly. You should fork the repository, push your changes there to a branch and then create a pull-request (PR). You can find information here. Pull-requests ensure that code gets reviewed to find issues and guaranteeing quality before code hits people (at least in theory ;-)). Ok short step-by-step as I see you are still trying to push to telegraf directly (
|
merged in #8474 |
Feature Request
Proposal:
Add FLOAT64-IEEE Modbus registers support.
INT64, UINT64, FLOAT32-IEEE are already available.
FLOT64-IEEE is used natively at least in some Janitza devices or can be added to some of them through Jasic code.
Current behavior:
A 32-bit float has about 7 digits of precision and a 64-bit double has about 16 digits of precision.
Some counter registers are read and a delta is calculated after a period in time. If the counter is big enough, the lack of precision given by a float32 register is enough to lose changes.
Desired behavior:
Adding FLOAT64-IEEE support to inputs.modbus solves the problem.
Use case:
In a Janitza UMG604 an Energy counter is read every 15 minutes. Natively UMG604 exposes only float32 Modbus registers while internal calculations are float64.
When the counter is low (i.e. below 1.000.000) the number of meaningful digits is enough to detect unitary changes in the counter during this interval. As soon as the counter is bigger than maximum precision (about 7 digits), less significant digits are lost and little changes in the counter are no more detected.
UMG604 can be extended by using Jasic code: I exposed the internal float64 registers adding some new Modbus registers to the standard ones. Alas inputs.modbus plugin does not support FLOAT64-IEEE registers to read them back.
For this reason I implemented for personal use and tested this FLOAT64-IEEE extension in
modbus.go
I can commit the change if somebody thinks it is worth. I am not a go developer but the change was very easy using the template provided by the other data formats.
It has been tested on the real devices and verified thoroughly.
The text was updated successfully, but these errors were encountered: