Giter Club home page Giter Club logo

Comments (9)

kyle-github avatar kyle-github commented on July 3, 2024

After some experimentation I have some results that are annoying. While reading multiple strings works with a MicroLogix, you can only read a maximum of two strings because of the response packet size limitations. For some DH+ connected SLC models (5/01 and 5/02 apparently), the limit is so small (41 words) that you can only get one string.

I will modify the library in the following ways:

  • Add in logic to handle multiple request packets for embedded PCCC calls.
  • Add in logic to parse the PLC/5-style data file names so that I can determine when I need to request one thing at a time (strings) and when I do not (INT). Experimentation will be needed to determine what I can read in groups and what I need to read one at a time.
  • Refactor some of the DH+ and PCCC embedded handling so that there is not so much duplication of code.

I am not sure how long this will take. I am pretty busy right now. But it is one of my top priorities.

from libplctag.

kyle-github avatar kyle-github commented on July 3, 2024

Marking this as an enhancement. Apparently this is exactly how AB decided to make the protocol respond. This seems highly annoying.

from libplctag.

I-Campbell avatar I-Campbell commented on July 3, 2024

As the maximum response size is unknown without experimentation, is it feasible to do:

  1. Ask for everything
  2. Processor will respond with as much it can, eg two strings.
  3. Examine response for completeness of data.
  4. If only a portion of the data is responded, ask for the rest.
  5. Repeat until all data retrieved or error.

A further enhancement on this would be to then store the expected number of elements returned for a particular processor type / data type / tag, and get it right first time the next time a read is requested.

from libplctag.

kyle-github avatar kyle-github commented on July 3, 2024

Possible? Yes. Feasible? Not with the 1.x version of the library. The problem there is that there is nothing to drive the above sequence of steps. There isn't a thread of control for it. I could build a state machine that sequenced when you called plc_tag_status() on a tag, but that is... not ideal.

The version 2.x (which exists, really!) is shaping up to be able to do this. Not trivial by any means, but a lot more feasible than in the 1.x version.

from libplctag.

kyle-github avatar kyle-github commented on July 3, 2024

Version 2.0 does allow for shorter-than expected responses, but only on Logix-class tags so far.

I think the real fix will be to implement multiple-request support in PCCC. It looks feasible, but it probably will not be a 2.0 feature.

from libplctag.

kyle-github avatar kyle-github commented on July 3, 2024

It may be easier to implement real CSP/PCCC/DF1 support first and then base the solution on the target PLC type. Different CSP PLCs prefer different DF1 dialects.

from libplctag.

kyle-github avatar kyle-github commented on July 3, 2024

I am marking this as post 2.0.

from libplctag.

kyle-github avatar kyle-github commented on July 3, 2024

Now that SLC/MicroLogix support is broken out into two parts, it may be possible to look at this again. I will take this up after I get the Debian packaging and some internal clean ups done.

from libplctag.

kyle-github avatar kyle-github commented on July 3, 2024

Closing this in favor of #114. That will be the general issue for this support.

from libplctag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.