LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to re-Initialize an array with new values in run time ?

Solved!
Go to solution

Hi,

In this particluar application I want to modify value of a particular index (Ex: 4th Psoition in a 1-D array ) and store the modified value (Inremented) in the same index location.

I have written a program , Can anybody tell what am I doing wrong ?

 

Labview Verison : 8.6

Kindly update screen shot instead of .vi

 

0 Kudos
Message 1 of 4
(2,882 Views)

I cant open the vi, but to replace a number in an array, there is Replace Array Element. Just wire the current array, which index to change and the new number.

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 4
(2,858 Views)
Solution
Accepted by topic author dakudiv

Two things.

First:

    You need to initialize the array (via the feedback loop).

    Right click the array wire and create constant.  Move the index to element 99.  Initialize the element to 0.  Wire this up to the bottom section of the feedback node.

Second:

    You are using an Insert Into Array VI but this does not describe what you are trying to do.  While it does place an element in the indicated position is also increases the size of the array.

    Change this to a Replace Array Subset VI.

Message 3 of 4
(2,851 Views)

@dakudiv wrote:

Hi,

In this particluar application I want to modify value of a particular index (Ex: 4th Psoition in a 1-D array ) and store the modified value (Inremented) in the same index location.


Replace the Insert Into Array with Replace Array Subset.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 4
(2,846 Views)