plcpeople / nodepccc

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

Is it possible to open this up to reading tag based addresses? #3

Closed dlbrown06 closed 9 years ago

plcpeople commented 9 years ago

Like so many things, it is possible with enough time and money...

The PCCC protocol does have support for limited access to simple named datatypes. There are no plans to add support for this to nodepccc as it's not really complete support for tag-based addressing as it doesn't support structured data, so it's a lot of work for what you get.

Implementing "CIP Tag Read" (same/similar protocol that is usually used when you write a CLX to CLX message instruction) is the proper way to do this, and I wrote a test program with a hard-coded tag name and was able to read a couple of numbers from a ControlLogix, but there is a lot to do to support every case properly. We don't know the data type for certain until we receive a response from the controller, and there are special fragmented reads to be done to read large arrays, special procedures for handling structured data (where the data type can either be defined at both ends or read from the controller in detail), and many different data types to test, and while it's possible and fairly well documented by AB, we haven't had the time to develop on our own and haven't had a related project come to us that would help pay for the development. I'm still hoping we can work on it later in the year. If anyone else has time to contribute it would be appreciated as well.

As the protocol is so different it would probably be best done as a separate project rather than part of nodepccc, as it isn't really PCCC anymore when we use CIP.

dlbrown06 commented 9 years ago

I think it would be a pretty interesting project to get started and I think our team could hopefully contribute to the project a bit once started.