09-30-2015 01:14 PM
Hello list,
I’m not new to Labview programming but I am new to using it with a PLC. I have an Allen Bradley CompactLogix L24ER, and I have purchased the Ethernet/IP toolkit here ->http://sine.ni.com/nips/cds/view/p/lang/en/nid/209676
Since the Help is so sparse, there are almost no examples, and I have been told by NI Tech Support that this product is not supported by them but NI R&D instead(?), I am turning to the community for help (where I probably should have gone first anyway.)
It is my understanding that this package will read & write “Controller Tags” and not “Program Tags”. I have modified one of the example VI’s to just send & receive Booleans. It is attached. Using it, I am attempting to read and write individual bits of the “Local:1:O.Data” register, by reading or writing to the Tag Name “Local:1:O.Data.x, where “x” represents the bit I want to read or write.
So I have several questions.
At the suggestion of someone in NI Tech Support, I have been successful setting the VIs in my example to “INT” and reading “Local:1:O.Data”, but I am unable to write to it, so I know that my communications is working somewhat. But I would really like to read and write to individual bits if that is possible.
I have attached my VI, a screenshot of my PLC registers, and a snapshot of my front panel showing the error I’m seeing.
Any help would be appreciated.
Thanks,
Mike
09-30-2015 01:35 PM
http://forums.ni.com/t5/Industrial-Communications/bd-p/260
Have you tried these forums? There's usually some more EIP folks lurking around in there.
09-30-2015 01:52 PM
Sorry I did not.
I will repost over there.
Thanks,
Mike
09-30-2015 02:01 PM
I'm curious if you're able to work with the array of booleans and only read/write the element you're interested in to get the value you want. I'd suspect any software to do that for you behind the scenes if it wasn't showing you that it was happening. I'm unaware of any single bit transmissions taking place.
09-30-2015 02:21 PM
I was able to change the VI I attached from "BOL" to "INT", chaged the data I was writing and reading from "Boolean Arrays" to "I16" and then I could read the 16 bit BOOLEAN register in the PLC, but I was still unable to write to it using the same tag name I was reading it with "Local:1:O.Data". I get the following error:
Details:CIP Error - Extended Status may be available
CIP Status: 0xff (General error)
CIP Extended Status: 0x2105 (Address and count out of range)
Mike
10-22-2015 09:38 AM
Hello Mike,
I am in the same boat as you are, I am attaching Presentation of what i learned about Ethernet Tag Read and Write. let me know if you have any questions.
In short :
1) Yes, you can Read and Write only controller Tags no Program Tags.
2) If tags are Independent i.e. Not in an Array then it is Very easy to Read and Write.
3) You can not Read or Write to UDT's at all.
4) You can not Write to element in an array other then 0th element.
I have multiple times to NI and same response i get like yours. R&D team supports this tool kit.
I have no luck so far from NI Tech Support team to resolve my issues.
Please note if you are trying to Write Tag in to an Array it will make only that that Tag "ON" and rest of the tags will become zero.
In my PPT you can see one can write only 0th element of Array rest of the bits in that array will become zero.
In my example i am using compact Logix L32E Processor.
Thanks
Sanjay
10-22-2015 10:56 AM
Hello,
In My previous post i was trying to Write Tags in to an array and was able to do only 0th element and mentioned that i was getting an error when i tried to write two tags at the same time. Yes, i was getting an error but now i dig in to more for this and find out you can write multiple tags in to an array.
Please see attached slide that how you can do this. I hope this helps.
I still could not able to find out how to Read UDT's. If anyone can find out please post here that would be big help.
Thanks
Sanjay
10-23-2015 09:27 AM
Sanjay,
Thank you for the information...we both have the same issues.
I think I have what I need to do working, but this would have been a lot easier if some PLC specific examples and better documentation had been provided.
It is my understanding that there is now a CAR that will fix the documentation, so that this tool set doesn't advertise things that it does not do. I hope the CAR also includes some good examples with the package.
Mike
10-26-2015 07:49 AM
Mike,
Thank you for following up.
I hope NI Tech support next release will resolves issues with this Toolkit.
Regards
Sanjay
11-04-2015 10:28 AM
Sanjay (or anyone else),
So how fast/often can I expect to be able to read & write Controller Tags since there will be no ladder running in my PLC?
Thanks,
Mike