plcpeople / nodepccc

Library for node.js to communicate with some Allen-Bradley programmable controllers (PLCs)
MIT License
81 stars 24 forks source link

Allen Bradley Micrologix 1400 PLC Error "Failure (Bad values)" #32

Open youngkzy opened 5 years ago

youngkzy commented 5 years ago

I'm connected to the MicroLogix-1400, working just fine, until errors. 192.168.254.220 Port 44818 Routing <--- ?? what's that ? Cycle Time Adjusted it from 500 -700, No differences noted
Timeout, Adjusted it from 1500 - 3500, No differences noted

Node-RED program is simple. I have pccc-node-red-failure Input - 500 ms delay - json true =1; json false =2; on output 1>> Set msg.payload = 0

on output 2>> Set msg.payload = 1. This is a simple 50% duty cycle at 500ms. It works perfectly... Until "Failure (Bad values)" erupts on the debug pane. Usually it works for about 5 minutes. and crashes. The other post about this issue was never addressed... The discussion was about someone failing to connect... Does anyone have any idea what I can do to understand what is going on and how to clear the error and get back to working? Kind Regards, kzy
plcpeople commented 5 years ago

Routing is more for Compact/ControlLogix, when you have a "path" through your communication module and backplane to get to your controller.

I would want to have a look at the console log of nodepccc to see exactly what's making it unhappy. You could also try this with the nodepccc example run outside of Node-Red if that is possible/practical for you.

I have tested with a Micrologix 1400 in the past but no longer have the hardware to test.

@gfcittolin has this been a regular issue?

youngkzy commented 5 years ago

plcpeople, I changed the logging to "Debug" in the Settings.js file. The output is not verbose to display any pertinent information. Here is the last test. It ran for 10 minutes with no issues. Then this. "26 Jul 10:50:36 - [error] [pccc endpoint:e7d57a07.3bed28] Failure (Bad values)". and it repeats every 3 seconds. The problem is that it is in a loop which never allows to reset unless I initialize Node-RED. I must re-start flows to get communication to the PLC. I tried to inject a value to the output, but nothing will reset the problem.

Thanks, kzy

youngkzy commented 5 years ago

What would be the proper syntax for using "Routing" given some ways to address, lets say an Allen Bradley Micrologix 1400... Your information tab and "Readme" is curiously depleted of information. You can still have the notice that the node is experimental, but still include how to use it. An example of PLC's and settings to match settings syntax would be helpful.

I use Kepware for example and it has an "Allen Bradley Suite". The Micrologix, actually uses the "Ethernet/IP" driver instead of the "Network Devices" which are SLC types. The AB "Ethernet/IP" driver for RSLinx does not pick up the Micrologix or SLC's using the "Ethernet/IP" driver. That's a curiosity. The Micrologix 1400 seems to be a hybrid of sorts.

kzy

youngkzy commented 5 years ago

Hello, I realize that your work is not the Node-RED"node-red-contrib-pccc", but the background for this. I ran an alternate test. This time I'm writing to N7:0 as a word. I have not seen any errors for 30 minutes and the code essentially reads the value, adds +1 and writes it back to the PLC with no time delays. I'm at 7325 and still counting.

I removed the bit writing nodes. I'll do some testing with the B3 table next.

Kind Regards, kzy

gfcittolin commented 5 years ago

Hello,

Thanks @plcpeople for your support. I'm continuing the discussion on netsmarttech/node-red-contrib-pccc#2. Feel free to join us there.