S7-300 Arrays

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
jmsmoreira
Posts: 28
Joined: Mon Apr 23, 2012 7:03 am

S7-300 Arrays

Post 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?

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

Re: S7-300 Arrays

Post 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 10905 times
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

jmsmoreira
Posts: 28
Joined: Mon Apr 23, 2012 7:03 am

Re: S7-300 Arrays

Post 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...

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

Re: S7-300 Arrays

Post 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;
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply