-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addressing tags with : in the tag name #8
Comments
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! |
Thanks, I will add the &debug=1 tomorrow and report back. By the way, THANKS for actively developing this much needed library! |
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. |
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... |
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] I may modify libplctag if it is enough of a problem. |
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) {
[ ... ] |
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. |
OK, I updated GitHub. Can you please repull and do the test again? Thanks again for the bug report! |
Done. New code pull works like a charm. Thanks! |
I will close this now. Thanks for the bug report! |
Hi, I'm trying to read some tags in a Control Logix PLC, which are not global in scope. I was previously able to read them using TuxEIP, addressing the tags with names such as:
Program:Supervisor.pidLocal_PV
Program:Zone1.flow_CV
etc.
How can I address these tags with libplctag? When I try to read them, I get error -33 returned. Reading other controller-wide tags works fine.
Thanks!
The text was updated successfully, but these errors were encountered: