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?
S7-300 Arrays
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: S7-300 Arrays
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.
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.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
-
- Posts: 28
- Joined: Mon Apr 23, 2012 7:03 am
Re: S7-300 Arrays
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...
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: S7-300 Arrays
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.
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
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer