question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to read from Control Logix PLC

See original GitHub issue

Unable to read anything from a control logic PLC. Unable to display controller properties, unable to read a tag value.

Current Behavior

When connecting to PLC, an UnhandledPromiseRejectionWarning is given. I am able to ping the PLCs IP. (EN2TR card) I am able to go online with Studio 5000 programming software. PLC is in Run mode.

Expected Behavior

Connection to PLC should complete, and plc properties would be written to console

Steps to Reproduce

  1. Download current version of Node and install. node-v9.9.0-x64
  2. Create a project directory and install node-ethernet-ip (“npm install ethernet-ip --save”)
  3. Create plc01.js file with sample connection code
  4. Run node plc01.js
  5. Receive error on console

Your Environment

  • Package version (Use npm list - e.g. 1.0.6): ethernet-ip@1.1.0 dateformat@3.0.3
  • Node Version (Use node --version - e.g. 9.8.0): v9.9.0
  • Operating System and version: Windows 7 - SP1 - x64
  • Controller Type (eg 1756-L83E/B): 1756-L75
  • Controller Firmware (eg 30.11): 28.012

4 slot rack, plc is in slot 0. EN2TR cards in slot 1 and slot 2. Slot 3 is open.

Error output

(node:14792) UnhandledPromiseRejectionWarning: #<Object> (node:14792) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:14792) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Test Code

const { Controller } = require("ethernet-ip");
const PLC = new Controller();
// Controller.connect(IP_ADDR[, SLOT])
// NOTE: SLOT = 0 (default) - 0 if CompactLogix
PLC.connect("10.115.45.55", 0).then(() => {
 console.log("Connected to PLC!");
 console.log(PLC.properties);
});

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MattCostcommented, Mar 27, 2018

Yup! All working now

1reaction
cmseaton42commented, Mar 27, 2018

ahhhh, yep this is definitely related to #1. The readWallClock method in the connect method is causing the issue, apparently this feature only works with the latest rockwell releases (e.g. L8 series controllers). We will update the code soon and release a patch today. @patrickjmcd or myself will update the thread once the changes are live. Thanks for helping to track this down =].

Read more comments on GitHub >

github_iconTop Results From Across the Web

OPC Server 2016 - AB ControlLogix Unable to read tag CIP ...
Solved: This is yet another my attempt to try NI OPC Server opposite to opensource has faced out with the impossibility to read...
Read more >
InteractX Troubleshooting - ControlLogix Driver unable to ...
InteractX Troubleshooting - ControlLogix Driver unable to upload tags from Device (PLC) unable to read known good tags from processor.
Read more >
CIP Error=0x04, Ext. Error=0x0000 and no data from the PLC
Symptom Not able to read any of the tags as identified in the IGS OPC and seeing a CIP Error 0x4, but can...
Read more >
Alarming on Controllogix I/O Not Responding in an ... - YouTube
How to make an alarm to tell you that a I/O connection has failed on your Allen Bradley Controllogix or Compactlogix PLC. If...
Read more >
Failure to upload/go online, ControlLogix 5561 [Text] - PLCS.net
Have you tried another PC/Laptop? I have a hunch it is a Linx issue especially if you are also using other communication protocols...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found