-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Need to buffer serial data. #2
Comments
hi, thank you for the issue ! please check the git version, i added a bufferd serial port: happy solstice. |
Great, that has fixed the issue I was seeing. Thanks! |
:-) |
Are you going to release a new version of the package? Thanks |
v3.3.5 ! |
Hi,
I just tried running v3.2.5 of the package in ModbusRTU mode against this Modbus Simulator: http://www.plcsimulator.org/
When I try and run the simple logger example, I get loads of errors about the Data Length not being what is expected (See line 192 of index.js).
This is happening because the serialport module is passing you data as it gets it from the far end and not waiting.
One option would be to configure the serialport module to wait for a delimiter before triggering the 'data' event, but from a quick look at the modbus protocol I don't think that is possible. If that is the case then I think the correct solution is to buffer the data up until you have the expected length and then attempt to process it.
The text was updated successfully, but these errors were encountered: