Steve-Mcl / node-red-contrib-mcprotocol

A Node-red node for communicating with mitsubishi PLCs using MC Protocol over Ethernet
https://github.com/Steve-Mcl/node-red-contrib-mcprotocol
21 stars 18 forks source link

Not automatically connect to Q series PLC in node red #19

Open vikrimg opened 1 year ago

vikrimg commented 1 year ago

when the plc is lost connection to the node red, it won't automatically reconnect to the plc, it must be re deploy the flow or fully restart the node red.

is there any other way to fix this problem?

Steve-Mcl commented 1 year ago

What protocol are you using?

As stated in the readme, UDP 4E is the most reliable (In my previous job, I had years of problems with the TCP connections on Mitsubishi PLCs)

Regarding auto reconnect, you can also watch the status of the node or the output of the node and determine if a reconnect is necessary & issue a disconnect/connect.

The built in help states...

INFO: To open / close the MC Protocol connection, send boolean true in msg.connect , msg.disconnect or msg.reinitialize. Alternatively, send string connect, disconnect or reinitialize in msg.topic to the any mc read / mc write node.