How to display array tag values in a field ?

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
Nicolas2121
Posts: 19
Joined: Fri Apr 12, 2013 11:00 am

How to display array tag values in a field ?

Post by Nicolas2121 »

I have created an array tag. My example is : Name = array_tag, dataType = FLOAT, Size = 1, ArraySize = 6, GlobalDataType = FLOAT.
I affect its values in a script module :

Globals.Tags.array_tag[0].Value = 1;
Globals.Tags.array_tag[1].Value = 2;
Globals.Tags.array_tag[2].Value = 3;
Globals.Tags.array_tag[3].Value = 4;
Globals.Tags.array_tag[4].Value = 5;
Globals.Tags.array_tag[5].Value = 6;

I have read in help that array tags can be used to edit charts, but in my application, I want to parameter a series of coefficients which are used in a calculation.

I want to display a tag’s value in a field in an HMI view (Globals.Tags.array_tag[0].Value as an example).


Is it possible to display array tag values in a field ? If it is, could you tell me how to do that ?

Thanks a lot,

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: How to display array tag values in a field ?

Post by mark.monroe »

You would have to use script to set the value of the AnalogNumericBox:

Code: Select all

this.AnalogNumeric1.Value = Globals.Tags.Tag1[0].Value;
However, you can not use the same method to get the value that is in the AnalogNumericBox. Rather, you would have to use the tag associated with the AnalogNumericBox to get the value that is in the box.

Code: Select all

//The below will not work
Globals.Tags.Tag3.Value = this.AnalogNumeric1.Value;
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply