Skip to content

After automatic reconnection, tags are not readable and throw TIMEOUT error #63

@ryangriggs

Description

@ryangriggs

May be related to Issue #56

Steps to reproduce:

  1. Connect to a CompactLogix PLC using:
const plc = new Controller()
plc.connect(ip_address, slot);

(At this point the plc.established property changes to true to indicate an active connection.)

  1. Wait a while and start reading tags repeatedly using plc.readTag()

  2. 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.

  3. After a moment, the readTag() function starts to throw errors, and the plc.established property changes to false.

  4. Wait a few moments, then restore the PLC's connectivity.

  5. 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)
 … …

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions