plcpeople / nodepccc

Library for node.js to communicate with some Allen-Bradley programmable controllers (PLCs)
MIT License
81 stars 24 forks source link

Looks like nodepccc is sending multiple read request #25

Closed adhavann closed 5 years ago

adhavann commented 5 years ago

Hello, I am using this module to connect to the Allen Bradley PLC , i could see everything is fine until I I try to read the value at addresses of higher value for ex:310 or 410 . When I am reading the address of 410 , It always returns value 0 and also I could see the log message saying "An oversize packet was detected . Usually because two packets were sent at nearly the same time by the PLC. We slice the buffer and schedule the second half for later processing". When i captured the network packets , I could see the nodepccc is requesting data has more than one packets rather than one -( refer second screenshot) ( when it sends the read request for lower address value, it usually includes one packets (refer first screenshot) ). screenshot-1 screenshot-2

plcpeople commented 5 years ago

Can you please test and let me know if this is now fixed in 0.1.19? I did find an issue with offsets over 254.

KamalAman commented 2 years ago

@plcpeople it does not seem like version 0.1.19 exists or is published. Please advise,

plcpeople commented 2 years ago

When I looked at the commit that closed the bug report, the changes to the changelog indicate it was fixed in 0.1.9 so when I said 0.1.19 it was a typo. The latest version is 0.1.17. Are you experiencing this issue? I don't think I was that clear in my first response - the program is supposed to send multiple read requests, and the bug shown in the Wireshark trace wasn't that it was sending multiple requests, but that it was not properly requesting data with a register offset > 254 and that was fixed. But if someone really does not want it to send multiple job requests, I think this can be done by setting self.maxParallel to 1 instead of 4 in the code, around line 84, and if this helps some situations I can make this configurable.