Comments (10)
Can you please modify the tag string to include "&debug=1", capture the output and add that to the issue? This will print out everything that is going back and forth between the PLC and the PLC (and a lot more).
-33 means that the PLC returned an error to the library. It is possible that there is a bug in the parsing, but that will show up in the packets.
Thanks for the bug report!
from libplctag.
Thanks, I will add the &debug=1 tomorrow and report back. By the way, THANKS for actively developing this much needed library!
from libplctag.
I had another thought. What CPU and firmware version are you running? I thought I read somewhere that AB has started to enforce the restrictions on tag access more.
I also have a question to ask: what is the next protocol that I should add? I am leaning toward Modbus TCP. There are some internal simplifications and changes I want to make to the library first.
from libplctag.
Ah, in looking in the code, I am not handling ":" characters at all!
Oops!
Can you copy the debugging output of TuxEIP too? I need to see how to encode that. My guess is that I encode it much like I handle "." which is just skipping over it and putting down the remaining parts as ASCII names, but I need to make sure. AB is not the most consistent...
from libplctag.
I found the TuxEIP code and looked at how they are doing it. It looks like they do not handle colons at all! So, maybe it is copied directly into the name. I modified my code and checked it in to GitHub. Please give that a try.
I also saw another difference: they handle multiple values within arrays but I do not.
TuxEIP: fooTag[12,42]
libplctag: fooTag[12][42]
I may modify libplctag if it is enough of a problem.
from libplctag.
Ok, I had to modify cip.c to also allow ':' characters in the case NAME: clause of the switch/case in cip_encode_tag_name(), but now it works!
I'm no expert at github, so if you want to make the change shown below and check it in, that would be great!
while(p) {
switch(state) {
case START:
/ must start with an alpha character. _/
if(isalpha(_p) || (p == '') || (_p == ':')) {
state = NAME;
} else if(_p == '.') {
state = DOT;
} else if(_p == '[') {
state = ARRAY;
} else {
return 0;
}
break;
case NAME:
*dp = 0x91; /* start of ASCII name */
dp++;
name_len = dp;
*name_len = 0;
dp++;
while(isalnum(*p) || (*p == '_') || (*p == ':')) { /// ADD COLON SUPPORT HERE TOO
*dp = *p;
dp++;
p++;
(*name_len)++;
}
[ ... ]
from libplctag.
D'oh, I forgot the second one! I will make sure that that is in GitHub. Give me a little while, I'm on a conference call.
from libplctag.
OK, I updated GitHub. Can you please repull and do the test again?
Thanks again for the bug report!
from libplctag.
Done. New code pull works like a charm. Thanks!
from libplctag.
I will close this now. Thanks for the bug report!
from libplctag.
Related Issues (20)
- Many "INFO" messages output in command prompt after .AddTag(something) command HOT 2
- how many characters can we write using libplctag write?
- Problems with Greek letters in tag names HOT 2
- Connection Issue When Processor Is Deep In Rack ex.. Slot16 HOT 3
- Access AB L73 PLC through Private LAN HOT 1
- Can we use unconnected messaging with multi service request? HOT 3
- Use Libplctag Library as Server HOT 2
- path
- ErrorBadParam when reading a value from bool dimension HOT 3
- Data checking HOT 1
- libplctag never stops after disconnect / reconnect (AB CLX) HOT 3
- String Write is not working for Omron NJ/NX Controller HOT 5
- Multiple request are not packed into single request for Omron NX/NJ PLC HOT 2
- 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
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.