Author Topic: Control Logix ReadRaw with Rockwell Plant Pax AOIs  (Read 1377 times)

AllenBradleyTagReader

  • Newbie
  • *
  • Posts: 3
    • View Profile
Control Logix ReadRaw with Rockwell Plant Pax AOIs
« on: April 02, 2019, 09:30:09 PM »
Hello,

First of all thank you for your time and energy you have put in to Advanced HMI and released for the world to build on. It is truly impressive. I am just getting started but it looks like it is going to be infinitely superior to my various home-made modbus drivers and dataloggers.

I am reading some tags out of a 1756-L75 v32 using Advanced HMI. Everything works terrifically except reading some tags that are defined by add on instructions. Our customer wants us to use the Rockwell Process Library Objects (Plant PAX) add on instructions in the PLC program and they have tags with hundreds of members, some of which themselves are of add-on-defined type, so they are nested.  I normally try to keep things as simple as possible ... this is different.

I have tried to narrow down what exactly in these tags is causing the problem with no success, all of the tags of UDT types I create myself I can read.  I've tried UDTs with strings, nested UDTs, kilobytes of arrays, it all works. The error that occurs when reading the Rockwell AOI instances is a privilege violation which actually comes back from the controller as that message is displayed in wireshark.  I have verified the tags are read/write.  Oddly enough there is one Plant PAX AOI that does read successfully, P_Gate.

I have attached a zip with
1. the control logix PLC program in l5k and l5x that has all of the tag type definitions.
2. a wireshark capture where it fails to read the tag of type P_Alarm tag both with read and ReadRaw and then succeeds in reading the tag of type P_Gate.
3. a wireshark capture where it gets the tag list and then tries to read all of the tags in the program with ReadRaw and Read.

Let me know if there is any more information I can provide.  I am curious to know what is different about these tags that aren't working, but I certainly have no expectation that they need to be accommodated.

Thanks again for your work


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Control Logix ReadRaw with Rockwell Plant Pax AOIs
« Reply #1 on: April 02, 2019, 10:35:43 PM »
I have looked at the Wireshark and it shows a general status of 0x0f with an extended status of 0x2100. I think the key to understanding the problem is in the extended status code. However I have looked through every piece of documentation I have and I am unable to find that combination of error codes.

Have you tried to read individual tags within any of the AOI's that is causing the problem? For instance try to read my_AI.EnableIn

Tomorrow I will load the program you supplied into a controller and do some testing to see if I can narrow it down any further.

AllenBradleyTagReader

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Control Logix ReadRaw with Rockwell Plant Pax AOIs
« Reply #2 on: April 03, 2019, 11:43:36 AM »
Hi Archie,

I am able to read my_AI.EnableIn (returns true)

There is one other advanced HMI post that had the same privilege violation error at https://www.advancedhmi.com/forum/index.php?topic=2177.msg12552#msg12552

and one on PLCtalk.net where the fellow has developed a driver but it doesn't use the same initialization procedure as RSlinx: http://www.plctalk.net/qanda/showthread.php?t=92941

I tried rebooting my programming laptop in case logix5000 or ftview studio had some kind of a lock on the tags, and I also power cycled the controller.  Thankfully none of that made any difference.

Thanks for doing some investigation!  I had exhausted all my options

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Control Logix ReadRaw with Rockwell Plant Pax AOIs
« Reply #3 on: April 03, 2019, 02:39:10 PM »
Here is the cause of the privilege violation.... There are a number of tags in the AOI that have "None" for the external access. So when you try to read the complete AOI, it gets to those tags and gives the access error.

Attached is a screen shot showing some of the tags without external access.

AllenBradleyTagReader

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Control Logix ReadRaw with Rockwell Plant Pax AOIs
« Reply #4 on: April 03, 2019, 06:18:32 PM »
Thanks for the insight.

I changed all of the local tags that had external access none to read only and that made some of the AOI tag reads work. 

P_Ain, P_Alarm. P_Intlk, P_Runtime, and P_Gate (which worked originally) all can be read with either ReadRaw or Read.

P_AOut, P_CmdSrc, P_DIn, P_Dout, and P_ValveMO still return privilege violation. 

If I try to read every member in an instance of P_Aout by reading one member at a time all reads return success except CmdSrc (which isn't surprising since the CmdSrc type itself does not work)

If I try to read every member in an instance of P_Din by reading one member at a time I can read all of the members.

I've attached my test program with the modified instances of the AOIs.

I am not sure it is worth spending any more time troubleshooting since anything that is reading tags from the PLC has to know the structure of the types it is reading, and therefore should know if there are members that can't be read, and it can simply read or write the members one at a time anyway (performance won't be an issue for me).

I'll let you know if I am able to narrow it down further.

Phrog30

  • Guest
Re: Control Logix ReadRaw with Rockwell Plant Pax AOIs
« Reply #5 on: April 03, 2019, 06:44:26 PM »
Just a suggestion, but I'm assuming you are going to use popups/faceplates similar to SE? If so, there is no need to read everything. Just read the tags you need. If you have tabs, take it even further, only read the tags that are on the active tab.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Control Logix ReadRaw with Rockwell Plant Pax AOIs
« Reply #6 on: April 03, 2019, 07:12:51 PM »
I used your sample project as is and I was able to read P_AOut (tag_cmdsrc) and P_CmdSrc (tag_Aout)

Also I used the ReadUDT to verify it worked correct, but it did not because of a bug in the parsing class which I will fix. But the code would look like this:
Code: [Select]
        Dim pg As PGateUDT = EthernetIPforCLXCom1.ReadUDT(Of PGateUDT)("tag_gate")
[code]

Attached are the class maps.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Control Logix ReadRaw with Rockwell Plant Pax AOIs
« Reply #7 on: April 03, 2019, 07:15:59 PM »
If interested , attached is a driver patch to 3.99y Beta 30 that will make the ReadUDT work correctly when reading the AOI.

Replace the file found in AdvancedHMIDrivers\Support folder with the attached file