ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

build a replace array subset

Solved!
Go to solution

Hello

I want to build a replace array subset but I can't.

I tried defferent methods to create it with no success. My question is where to put it in my program, what to insert as an n-dimension array and how to connect the index and my new elements in the true and the false case.

The size of the array i want to be 1x24, the index comes from a counter, the new elements are a result from a for loop in a case structure. They are all enclose in a while loop. The case structure for the for loop and the counter become true every 2 minutes.

Here is a photo of my program.

Regards

array.jpg

 

0 Kudos
Message 1 of 4
(3,069 Views)

hi zaxos,

  "I want to build a replace array subset but i can't"..This sentence i am unable to understand... :smileysad:...But i can tell you that ifyou want to use the replace array subset .then you should have an initialised array.This initialise array can be done using initialise arry with input as 0 and length as some 500...

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 4
(3,059 Views)

Hello srikrishnaNF

I tried that method with no success, i put the initialized array outside the while loop but every time that a new element insert the array is initializg again except the index of the last time, the photo is for that case. I hope you understand what is my problem. Do you have any idea where to put the initialized array to avoid this situation?

Regards

array2.jpg

0 Kudos
Message 3 of 4
(3,047 Views)
Solution
Accepted by topic author Zaxos

That's a common problem. Every time you loop you start with the same array, thus getting the behaviour you describe. To fix it, change the Initialized arrays connection to the loop to a Shift Register and feed the replaced array to the output side of the SR. The SR feeds the newly changed array to the next loop, which i bet is what you want. 😉

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 4
(3,036 Views)