Page 1 of 1

S7-300 Arrays

Posted: Mon Jul 30, 2012 11:52 am
by jmsmoreira
Hi,

I'm using an S7-300 CPU, with an array of lets say 10 bool elements.
Is it possible to define it on the tags of a T10A?

Re: S7-300 Arrays

Posted: Mon Jul 30, 2012 12:04 pm
by mark.monroe
Yes, but only in iX 2.0. The following limitation applies:

When using controllers with named variables and accessing individual bits
with the syntax VariableName.BitNo, array tags of data type BOOLwith bit
addressing, are only supported for 16-bits tags.
Snap 2012-07-30 at 12.02.39.png
Snap 2012-07-30 at 12.02.39.png (36.97 KiB) Viewed 10901 times

Re: S7-300 Arrays

Posted: Tue Jul 31, 2012 1:51 am
by jmsmoreira
I sucefully declared the array, but now if I want to set one of the bits in a button, the tag does not show up on the list...

Re: S7-300 Arrays

Posted: Tue Jul 31, 2012 7:56 am
by mark.monroe
You can not use many of the functions in iX on arrays. If you want to use arrays, then you need to write script code to interact with them. Charts are one of the few components that are designed to work with arrays.

Here is how you access an array in script. Tag1 is an array of bools.

Code: Select all

Globals.Tags.Tag1[0].Value = true;
this.AnalogNumeric1.Value = Globals.Tags.Tag1[0].Value;