plcpeople / nodepccc

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

Mapping Values to PLC5/SLC Messages for CLX #1

Closed dlbrown06 closed 9 years ago

dlbrown06 commented 9 years ago

I've been trying to test this functionality out with my CLX I have. I believe I setup the map correctly. It's simply a DINT to file number 7 and downloaded to the CLX. However when I try to read N7:0 from the CLX its coming back as Bad 255. Is there any other configuration needed that I'm missing here?

plcpeople commented 9 years ago

You might want to try reading it as L7:0 if it's a DINT - I seem to remember on newer CLX (rev 20) having to either declare it as an INT in the CLX or read it as an "L" file using nodepccc.

Other possibilities are that for your application you may need to specify the routing: [0x01,0x00,0x01,0x00] option when you initiateConnection, possibly changing the last 0 to something else if your processor is a ControlLogix and not in slot 0.

If this doesn't help, any output to the console might be useful to help troubleshoot.

dlbrown06 commented 9 years ago

Updating the routing and reading it as an 'L' fixed it. Thanks!