Showing posts with label UDA. Show all posts
Showing posts with label UDA. Show all posts

Wednesday, April 4, 2012

How-To: Resize an Array UDA in Application Server

Wonderware Application Server allows the creation of 1-dimensional array User-Defined Attributes (UDA) in automation objects. These array UDAs are configured with a pre-defined number of elements that can vary from 1 to 32767 in size, as well as default values for each element.

You can modify the number of elements of the array on runtime by modifying the Dimension1 property of the UDA. The Dimension1 property is not user writeable, so a script is needed to modify the property. If you resize an array up to more elements, the new added elements will have the default value of the corresponding data type (e.g. 0 for numbers, false for Booleans, and "" for strings); on the other hand, if you resize the array down to a smaller dimension, the values of the "deleted" elements will be lost.

Find a small example after the break.