When does this occur:
When PLC is disconnected and reconnected physically
Expected behaviour
Reconnect to the PLC, read and return values
Behaviour in WSL
This works as expected in WSL environment where removing the PLC rj45 connector starts the console log
Waiting to read all R/W operations to complete. Will re-trigger readAllItems in 100ms ( on a loop )
Meanwhile the read data is empty
After connecting the PLC the loop stops in a few seconds and read data is sent correctly
Behaviour on Windows
Removing the RJ45 connector brings up a bunch of different logs
Unable to read when not connected. Return bad values.
READ TIMEOUT on sequence number
After connecting the PLC it attempts to connect shows TCP connection is successful on host:port
And then there's a loop of
Waiting to read all R/W operations to complete. Will re-trigger readAllItems in 100ms ( on a loop )
Overall the behaviour is a little unpredictable
The reason it's happening is because it's triggering this
Some futile efforts to make it work included:
Started off by resetting a few things then added more to experiment, either readAllItems doesn't have addresses it needs ( in which case there's no read ) or it goes back to the stale data and goes into the isWaiting loop
Please share your thoughts and also if there's any information you need do let me know
When does this occur:
When PLC is disconnected and reconnected physically
Expected behaviour
Reconnect to the PLC, read and return values
Behaviour in WSL
This works as expected in WSL environment where removing the PLC rj45 connector starts the console log
Waiting to read all R/W operations to complete. Will re-trigger readAllItems in 100ms ( on a loop )
Meanwhile the read data is empty
After connecting the PLC the loop stops in a few seconds and read data is sent correctly
Behaviour on Windows
Removing the RJ45 connector brings up a bunch of different logs
Unable to read when not connected. Return bad values.
READ TIMEOUT on sequence number
After connecting the PLC it attempts to connect shows TCP connection is successful on host:port
And then there's a loop of
Waiting to read all R/W operations to complete. Will re-trigger readAllItems in 100ms ( on a loop )
Overall the behaviour is a little unpredictable
The reason it's happening is because it's triggering this
Some futile efforts to make it work included:
Started off by resetting a few things then added more to experiment, either readAllItems doesn't have addresses it needs ( in which case there's no read ) or it goes back to the stale data and goes into the isWaiting loop
Please share your thoughts and also if there's any information you need do let me know