You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const plc = new Controller()
plc.connect(ip_address, slot);
(At this point the plc.established property changes to true to indicate an active connection.)
Wait a while and start reading tags repeatedly using plc.readTag()
After tags are reading successfully, unplug the PLC's Ethernet cable, power it off, or change its' IP address, causing a loss of connectivity to the PLC.
After a moment, the readTag() function starts to throw errors, and the plc.established property changes to false.
Wait a few moments, then restore the PLC's connectivity.
After a moment, the plc.established property turns to true again, indicating that the library has reconnected to the PLC. However, any subsequent attempts to execute plc.readTag() fail with the following error: (note that the tag being read in this example is named "Int1" and is a Controller-scoped tag.
All subsequent readTag() functions fail until a new plc.connect(...) function is issued, at which point everything starts reading again.
Error: TIMEOUT occurred while writing Reading Tag: Int1.
at Controller._readTag ([snip]\node_modules\st-ethernet-ip\dist\controller\index.js:727:28)
at TaskEasy._runTask ([snip]\node_modules\task-easy\src\index.js:118:9)
at TaskEasy._next ([snip]\node_modules\task-easy\src\index.js:138:18)
at [snip]\node_modules\task-easy\src\index.js:56:22
at new Promise (<anonymous>)
at TaskEasy.schedule ([snip]\node_modules\task-easy\src\index.js:51:16)\
at Controller.readTag ([snip]\node_modules\st-ethernet-ip\dist\controller\index.js:591:34
at Driver_EthernetIP.read ([snip]\Driver_EthernetIP.class.js:150:19)
… …
The text was updated successfully, but these errors were encountered:
plc reconnections are not handled on the base class Controller. Use the extController or ControllerManager class or you can look at its code to see how disconnects are handled there to roll your own controller error handling.
May be related to Issue #56
Steps to reproduce:
(At this point the
plc.established
property changes totrue
to indicate an active connection.)Wait a while and start reading tags repeatedly using
plc.readTag()
After tags are reading successfully, unplug the PLC's Ethernet cable, power it off, or change its' IP address, causing a loss of connectivity to the PLC.
After a moment, the
readTag()
function starts to throw errors, and theplc.established
property changes tofalse
.Wait a few moments, then restore the PLC's connectivity.
After a moment, the
plc.established
property turns totrue
again, indicating that the library has reconnected to the PLC. However, any subsequent attempts to executeplc.readTag()
fail with the following error: (note that the tag being read in this example is named "Int1" and is a Controller-scoped tag.All subsequent
readTag()
functions fail until a newplc.connect(...)
function is issued, at which point everything starts reading again.The text was updated successfully, but these errors were encountered: