Closed MattCost closed 6 years ago
Hey man, thanks for letting us know. Your code looks fine. I think this may be related to #1.
If you have a few minutes, can you run the following code and let me know what it prints?
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);
}).catch(e => {
console.log(PLC.properties);
console.log("=========================");
console.log(e);
});
This should give some more insight into what might be happening.
C:\NodeJS\PLC01>node plc01.js { name: '1756-L75/B LOGIX5575', serial_number: 14878836, slot: 0, time: null, path: <Buffer 01 00>, version: '28.12', status: 12384, faulted: false, minorRecoverableFault: false, minorUnrecoverableFault: false, majorRecoverableFault: false, majorUnrecoverableFault: false, io_faulted: false }
{ generalStatusCode: 8, extendedStatus: [] }
Time Settings. Only issue is DST adjustment is off.
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 =].
You should be able to upgrade the npm package npm install --save --upgrade ethernet-ip
and your issue should be resolved. The call to readWallClock
has been removed so you should no longer get that error.
@MattCost Can you confirm that v1.1.1
resolves your issue?
Yup! All working now
Awesome! 🎉 Closing this.
HI Can Some one please help me I Have a Similar problem. But I keep getting this error: caught error!Error Code:undefined { generalStatusCode: 5, extendedStatus: [] }.
Does this mean information is missing in the readtag parameters? This is my Code: var test = new Tag("CCW_Roll_RRCtrl", null, DINT); PLC.connect("192.168.1.200", 2).then(async () => { var { name } = PLC.properties;
console.log(`\n\nConnected to PLC ${name}...\n`);
await PLC.readTag(test);
console.log(tes.value);
}).catch(error => { console.error('caught error!' + 'Error Code:' + error.Code, error); });
Secondly: Does this module connect with the Allen bradley Rockwell 1756-EN2T/D\u0003\u0000\u0000\u0000 PLC
1756-EN2T is an Ethernet card, not a PLC. You are connecting to slot 2. Is that where the EN2T is? Because that would be wrong. You need to enter the slot number for the processor, the one with a keyswitch and probably a 1756-Lxx part number. As a reminder, slot counting starts at 0.
Okay great, I did not take that in consideration. I will test today and see what is my results. Thanks for the assistance
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
Your Environment
npm list
- e.g. 1.0.6): ethernet-ip@1.1.0 dateformat@3.0.3node --version
- e.g. 9.8.0): v9.9.04 slot rack, plc is in slot 0. EN2TR cards in slot 1 and slot 2. Slot 3 is open.
Error output
(node:14792) UnhandledPromiseRejectionWarning: #
Test Code