Closed Sisco21 closed 8 years ago
Please check #19. I had the issue and it was solved when I rewrote the code using async approach.
The code you wrote seems fine. How often do you call this function? Making two Modbus calls every two seconds doesn't seem to be so memory intensive.
Can you provide some more Code?
If you want to periodically update Registers try the jsmodbus-tools Library in npm. It does what you describe without the memory Problem. It currently supports Holding Register only but I can extend it to Coils and Input Register.
Thanks
It's working great now. Holding registers seem to be limited to 40000 (Max address)?
It's right? On our automat, we could go higher than this limit.
Best regards
François
If I remember correctly that is the maximum value for an address determined in the Modbus specs.
Hello, and congratulation for your code. I've just a question about a supposed memory leak.
I try to read holding register all 2000 ms with the code below (i read 50 objects)
But after few minutes, the memory used reach 512 Mb and stop. There is a solution to clear memory once the job is done?
Thanks
François