AdvancedHMI Software
General Category => Support Questions => Topic started by: thirdeye73 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
-
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
-
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.
-
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
-
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.
-
This may have been easier than I originally thought.
Download and extract this patch, then replace the file in AdvancedHMIDrivers/Support