st-one-io / node-red-contrib-cip-ethernet-ip

A Node-RED node to interact with Allen Bradley / Rockwell PLCs
GNU General Public License v3.0
51 stars 26 forks source link

Plc is not automatically reconnected #39

Open bombjackit opened 1 year ago

bombjackit commented 1 year ago

Describe the bug

When a plc, for a known reason (like maintenance, firmware upgrade or software upload), is disconnected from the lan, sometimes it does not automatically reconnect : I have to restart flow manually.

Expected behavior

I expect that the plc is reconnected, in all case, automatically

Logs

This is the log (after this plc is disconnected) 26 Jun 08:03:27 - [error] [eth-ip endpoint:Plc] Error communicating with the PLC: {"generalStatusCode":4,"extendedStatus":[0]}

Environment

r4nd0wn commented 1 year ago

same on a linux machine. This error occurs every time there is a download on the plc side and is elimited as soon as I redeploy (probably because of the forced reconnect).

cgraun commented 1 year ago

Same here.

Describe the bug

After a network interruption (unplugging PLC network cable) or going to STOP and RUN it automatically reconnects. However, after downloading the program, it doesn't, throwing the following error on console. The only way to get it back working I've found is restarting node-red.

Logs

3 Aug 10:48:12 - [error] [eth-ip endpoint:myPLC] Error communicating with the PLC: {"generalStatusCode":4,"extendedStatus":[0]}

Environment

bombjackit commented 10 months ago

Reposted in the right place https://github.com/SerafinTech/node-red-contrib-cip-st-ethernet-ip/issues/5

bombjackit commented 9 months ago

@cgraun and @r4nd0wn there is a new version of node-red-contrib-cip-st-ethernet-ip (2.0.2, see https://www.npmjs.com/package/node-red-contrib-cip-st-ethernet-ip) that may resolve this issue (I try thid new version and works well but actually I haven't try if auto reconnect in case of download really works).

bombjackit commented 8 months ago

I tried automatic reconnect after download to plc (with node-red-contrib-cip-st-ethernet-ip 2.0.2) and all go well.