TAGS inside RSlogix5000

sunnyvaleplc

Member
Join Date
Sep 2009
Location
sunnyvale
Posts
12
Hi All,

I have an array of REAL[125]. I need to break that up into several smaller Arrays of 40, without re-writing the whole code. IS there an easy method of using the Alias or Base tag feature to be able to break that up into smaller arrays of 40?

for Example:

Big_Array[125]

Small_Array1[40] -- References the first 40 elements of Big_Array
Small_Array2[40] -- References the second 40 elements of Big_Array
.. and so on

Thanks,

Sunnyvaleplc
 
Use COP or CPS to move the values from your big array to the smaller ones.
You can't alias a partial array, alias tags can only be single elements (even if that element is a UDT, it can't be arrayed).
 
Are you trying to solve an array indexing problem?
You can use an expression inside array brackets.

MyArray[index]
MyArray[40+index]
MyArray[80+index]

Just make sure you aren't going to index past the end of the array.

ETA:
You can use also expressions to use two indexes to address a single dimension array as though it was two dimension array. If Index_1 is 0..2 and index_2 is 0..39, then My__1D_Array[(40*index_1)+index_2] is equivalent to My_2D_Array[Index_1][Index_2]. (Thats what the compiler actually does behind the scenes with multi-dimensioned arrays). Hope that helps.
 
Last edited:

Similar Topics

Using: RSLogix5000 v20 RSLinx Classic RSLogix Emulator FactoryTalk View 7.0 I am looking for code to move PLC tags directly into VBA variables...
Replies
0
Views
4,848
Hello, I need help on changing tags inside an object. I have an object that uses the visibility and appearances under animations. An external tag...
Replies
0
Views
2,118
Afternoon all, I'm working on setting up a large excel recipe table for porting updates through the Linx Gateway RTD/DDE function into my recipe...
Replies
2
Views
89
Greetings I have a problem, my system is the following: wincc v8.0 (demo), logo8.3, abb m2m analyzer. I created some pages to display the...
Replies
0
Views
48
Hi All, we've recently upgraded from FTView SE v10 to v12. Since the upgrade we've been having a problem where the HMI is slow to update tags in...
Replies
0
Views
85
Back
Top Bottom