Array size in panelbuilder 32

Join Date
Apr 2002
Location
Just a bit northeast of nowhere
Posts
1,117
When editing tags in Panelbuilder 32, I have never used an array for anything. Now I'm looking at a screen ap where the author used a couple of "1" in the array size and I'm trying to figure out why he did that. To my mind, an array size of "1" is still a single element. Am I wrong?

I read up on using arrays with ascii characters and bit arrays, but he used them with timer presets and unsigned integers, and otherwise just confused me.

Any ideas?

Thanks!

TM
 
Tim,

Yes a 1-dimensional array dimensioned for 1 will have only 1 element.

I haven't used arrays in PLC programming, but from my IBM 360 programming days, arrays are most useful not in 1-dimensional single-column arrays (say array A(10), but in multiple row and column arrays. For example you could have an array of 10 rows x 10 columns, A(10,10). Now you can identify any of these 100 numbers by calling the array address, for example the number located at A(5,8) would be the value at row 5 and column 8.

You can have as many dimensions in the array as needed to completey define a group of values. 3-dimensional and 4-dimesnisonal arrays are not uncommon. The values in an array could be used to keep up with parts or products. For example a 4-dimensional array with size A(100,100,100,100) could be used to track 4 values for each of 100 products: serial number, model, location, status. For example, A(10,0,0,0) = Product 10 Serial Number. A(10,10,0,0) = #10 Model. A(10,0,10,0) = #10 Location. A(10,0,0,10) = #10 Status.
 
I have noticed this too in the tag editor in Panelbuilder32. I have changed some of them from one to zero and it did not appear to make a difference.

I think, when tags are created on the fly using the Tag Form, they are sometimes given an array size of 1 by default.

The only time I ever used an actual array (more than 1 element!) in Panelbuilder is the character array to do ascii entry/display.
 

Similar Topics

Does RSLogix5 have an instruction that outputs the overall size (elements) of an array? I am looking for a SIZE instruction equivalent in...
Replies
2
Views
1,210
I have 150 tags to move between two plc’s and was wondering what is the largest amount of an array allowable. I would like to create 100 reals...
Replies
6
Views
2,582
When using Panel Builder 32 I am adding a tag and the array size seems to default to 0 on floats and integers. I am wondering if this will...
Replies
2
Views
1,145
I'm running into an issue with a few Add-Ons within my rungs, I will add some pictures for a description of what is happening, I know I'm missing...
Replies
14
Views
3,279
Hi all! I have a controller (L38-ERM) where I had a one dimensional array of strings with 1028 elements in it. I expanded this to 2048 because I...
Replies
23
Views
7,514
Back
Top Bottom