I’m encountering an issue while writing data into a Siemens S7 1515 PLC. Let me explain : I have an application “A” looping on some business data then emitting, let’s say, 20 Actyx events on 20 fishes (same fish description but with 20 different ID). I have then an application “B” observing a state changes on those 20 fishes. When a specific state change is detected, the application “B” is writing 50 data into the PLC for the current fish. Because all state changes are received in parallel in an asynchronous way the application B is trying to write a lot of data at the same time so the PLC is overloaded and seems to reject a lot of write operation. Not good…
My first try was to use the node-snap7 library and for every single data to write do this : connect/write one data/disconnect. PLC reject some random write operation.
2nd try was to use the node-snap7 library again but group some data (20 max) to be written in a single shot. So do this : connect/write 20 data/disconnect. PLC reject some random write operation.
So now I’m trying to use, as advised by people from Actyx, the nodeS7 library. With library I need to rewrite my code to use a single long lived connection to write all the data, it’s ok for me. But now how to handle the asynchronous state changes I will receive on the 20 fishes to be able to write all the data in the single long lived connection ?
Thanks a lot,