Pointing or cycling through a Concept array

D

Thread Starter

Dean Nederveld

I have an application that I would like to cycle through or point to a different part of an array with each scan. I can send an example PDF that depicts the logic I am testing.

Is there a way to derive, infer, or otherwise manipulate the number in the brackets [#] of an array used in the logic?

In other words, I would like the logic to use the first array entry -- LOGIC[1], ENABLE[1], FAULT[1], etc. -- on the first scan. On the second scan I would like the logic to use the second array entry -- LOGIC[2], ENABLE[2], FAULT[2], etc. -- and follow the same pattern for the third scan and so on. When the number of scans reach the last array entry I would start over at [1].

Dean Nederveld
Lakeland, FL
 
Dean,

Create a variable called INDEX, (or something similar). Then in your code use the variable INDEX inside of the array element brackets.

Array[INDEX]. This way you can increment the value of INDEX at the end of each scan and it will automatically shift the array pointer to the desired element each scan.
 
Top