Skip to content
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

Intermitent modbus failure on state connected, all nodes #504

Open
NSAButForDogs opened this issue Nov 19, 2024 · 2 comments
Open

Intermitent modbus failure on state connected, all nodes #504

NSAButForDogs opened this issue Nov 19, 2024 · 2 comments

Comments

@NSAButForDogs
Copy link

Which node-red-contrib-modbus version are you using?

5.13.3

What happened?

I am attaching a raspberry pi 3 to a CLICK PLC where the raspberry pi is writing and reading. I am using modbus TCP. I have found that at random, all the nodes will seemingly fail to connect, where they say they are connected for about 3 seconds, then say reconnecting for 2000 ms, but fail to contact and will give the error: modbus failure on state connected.
Writing fails, and often times out, and reading fails as well.

Strangely enough, nodes that worked previously will stop working, and even trying to add additional nodes identical (except in name) to working flows will cause all nodes to stop working. The first time this happened, I made all of the unit IDs 1, and that fixed it. After that, it stopped working after maybe an hour. It started working again after I made zero changes, and then stopped working after making zero changes as well.

Any help would be really appreciated. It is entirely possible that this is not a bug and just user error, but I have been trying for a long time with no success.

Also the error recommends to look at log, but looking at the log reveals nothing, as it was completely empty. I tried checking the boxes in options to show things in the log, but it was still empty.

Server

Other/External server

How can this be reproduced?

I do not know how to reproduce my issues, but I will attach code that was working flawlessly and then stopped working with zero changes.
flows (1).json

What did you expect to happen?

The flows shown in that json file were able to read and write to the PLC. They worked with no issues until they all stopped working.

Other Information

I am using older software, but I can't update because of issues with my pi. Here is the version:
Node: v12.20.1

@NSAButForDogs
Copy link
Author

I am unsure of what was causing that. I switched from a CLICK PLC to a Productivity PLC and the intermittent issues have completely gone away. For whatever reason, maybe the CLICK PLC just does not play well with a raspberry pi.

@grewek
Copy link

grewek commented Dec 5, 2024

Glad to hear that the issue has been resolved. I don't know the CLICK PLC but it can happen that devices send messages that are incomplete because the connection wasn't stable. This could lead to errors such as the one described!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants