Author Topic: EthernetIPforCLXCom and Nested UDTs  (Read 2459 times)

thirdeye73

  • Newbie
  • *
  • Posts: 22
    • View Profile
EthernetIPforCLXCom and Nested UDTs
« on: January 22, 2015, 05:35:17 PM »
I have a nested UDT that looks something like the following:

typInput:
  ResultCode (DINT)
 
typOutput:
  Trigger (DINT)
  Barcode (STRING)

typCommand:
  I (typInput)
  O (typOutput)

Then in my controller tags I declare an array:

  DBCommand (typCommand[50])

What I am trying to do in VB is set up multiple DataSubscribers that listen to the Trigger field of several of the array elements, i.e. DBCommand[1].O.Trigger.  Is this correct syntax for the PLCAddressValue property?  When I create the subscriber and run the project, it doesn't work--actually nothing seems to work.  When I delete the subscriber, all the other controls start working again.

Thanks,
Scott

thirdeye73

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: EthernetIPforCLXCom and Nested UDTs
« Reply #1 on: January 22, 2015, 05:56:22 PM »
Some more info:

I trapped both the SuccessfulSubscription and DataReturned events.  I get the SuccessfulSubscription, not neither DataReturned nor DataChanged events.

I then started playing with tags.  The following is successful:

  * TESTDBCMD.Trigger (base type = typOutput)

Here's where it starts to fall apart:

  * TESTDBCMDARRAY[1].Trigger (base type = typOutput)

My other data subscriber (a simple PLC heartbeat) works a few times and then stops.

Scott

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: EthernetIPforCLXCom and Nested UDTs
« Reply #2 on: January 22, 2015, 07:30:45 PM »
The driver cannot process UDT arrays. What it will do is process it as if the array element was at the very of the address. This will be a future capability.

thirdeye73

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: EthernetIPforCLXCom and Nested UDTs
« Reply #3 on: January 22, 2015, 10:32:26 PM »
Any time frame yet on when that feature might be added?  So far I'm loving your software, so I'm certainly not complaining, but that would definitely be useful.

I have the luxury of reworking the PLC data structures however I want, so I can set it up to have an individual UDT-typed tag per command.  I would still like to use nested UDTs though, so would I be able to have a tag reference that looks like this:  DBCommand.O.Trigger, where DBCommand is a UDT that contains another UDT O, which in turn contains (a DINT or BOOL) field Trigger?

In the scenario above I would set up a data subscriber on the trigger tag, and in the data changed event I would read any other required data (other fields in the O sub-structure).  After the database returns the requested data I would write to one or more fields in the I sub-structure.

There is one other situation where I will be getting a fairly large amount of data from the database.  My original plan was again to use an array of UDTs.  I can restructure the data so that I populate an array for each column of data.  What data types are supported for array read/writes?  I have seen some posts that mention only integer types are supported, but that may have been for earlier versions?  I will have a mix of DINT, REAL, STRING, and BOOL arrays in this data.

Thanks,
Scott

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: EthernetIPforCLXCom and Nested UDTs
« Reply #4 on: January 23, 2015, 08:30:13 AM »
I don't really have a good time frame. This week I will be working on a big ControlLogix project, so I will have an opportunity to start looking at it.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: EthernetIPforCLXCom and Nested UDTs
« Reply #5 on: January 23, 2015, 08:46:04 PM »
This may have been easier than I originally thought.

Download and extract this patch, then replace the file in AdvancedHMIDrivers/Support