Comments (9)
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.
Marking this as an enhancement. Apparently this is exactly how AB decided to make the protocol respond. This seems highly annoying.
from libplctag.
As the maximum response size is unknown without experimentation, is it feasible to do:
- Ask for everything
- Processor will respond with as much it can, eg two strings.
- Examine response for completeness of data.
- If only a portion of the data is responded, ask for the rest.
- 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.
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.
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.
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.
I am marking this as post 2.0.
from libplctag.
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.
Closing this in favor of #114. That will be the general issue for this support.
from libplctag.
Related Issues (20)
- Symbol ID Addressing and quote request for additions to the library HOT 11
- Message packing on OmronNJ/NX beyond max response size HOT 2
- Standalone website to host documentation HOT 4
- Write is not working for SINT and USINT (1 byte) datatype for Omron NX/NJ PLC HOT 5
- MSR is not working for modbus_tcp protocol using libplctag library HOT 3
- MinGW timeapi.h issue HOT 4
- ASP.Net error HOT 2
- Parsing of port/link pairs is not correct in all cases HOT 5
- ControlNet is limited to 504 byte request/response packet sizes HOT 1
- Read/writing OmronNJ/NX TIME and DATE_AND_TIME data HOT 14
- Support data files for input and output without the data file numbers HOT 1
- Support for Omron NX/NJ variable listing HOT 182
- Packet sizes for Omron do not match documentation
- More exposure of internal tag information needed to solve BOOL array problem
- Known Omron problems
- Support Omron-style fragmented reads and writes
- split Omron code out from generic/Rockwell CIP code.
- redo start_read()/start_write() to use data segment descriptors.
- Refactor the existing CIP/Rockwell code to eliminate more of the duplication and split out common versus specific code.
- Document all attributes in one place
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libplctag.