Closed georgenici closed 6 years ago
You close the client Connection after the first request on each client.
We need to close connection on each request and create new connection each time we read data. But we can't close and connections are duplicated. This causes reaching the max number of connections.
Can you format your code a bit. It is really hard to read.
Sorry. now, i guess. it's better.
I have no idea what the async module is doing. Can you try stripping away everything not related to jsmodbus and just connect two clients, make the requests and close the client and shutdown the application. Shouldn't be that hard.
We have several modbus devices and i'd like to request data from each of them simultaneously and then agregate all data into one array. What do you recommend in this case?
Thank you for your help and your product. The problem was with the emulator. On our PLC devices everything works great. Thanks a lot, great job. P.S. are you planning to create a bacnet/ip driver? )
Hi! I created the program that makes 2 parallel requests to modbus devices using jsmodbus (node.js driver) and asyncjs every 3 seconds. I get an error after some time (random periods of time) during the first run and if i try to run it again i immediately get the same error.
Error:
My code:
Thank you.
P.S. this program creates many connections (10 max on our emulator) and then error occurs.