Data stills on read buffer..
Hello Sirs,
I'm using the 2.9.3 version and sometimes when I try to do some consecutive readings I'm getting a weird behavior.
In my application ( in this case for a energy meter) I have a list of registers, and in a middle of it, I have to read register 2825 and next the register 2837 (which is the scale to calculate the current real value).
The expected value for register 2825 is about 30 (current value) and for 2837 is 2.
So I read the register 2825 and I get 31, I store this value and next I read the register 2837 to get the scale and I get the same value (31). The read buffer seems that was not cleared.
This issue was being happening many times, so now I'm calling the modbus_flush function before each reading, thus the problem occurs much less times, but stills happening.
Is there anything that I can do to avoid this behavior? Is this a libmodbus 2.9.3 bug?
Thanks in advance,
Nuno Santos
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- libmodbus Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Nuno Santos
- Solved:
- Last query:
- Last reply: