LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing Element in an array

I'm trying to insert a number into an array and keep track of the number as long as the loop is going and I used the replace array function to keep the number updated and set the initial value for the array as 0. Every time the case structure is changed the array is being reset back into 0. Mind giving me a suggestion of doing this or maybe is there anything to be added/moved (inside/outside the loop) so the array is not being reset into 0. Please explain in the way that a beginner could understand. Thank You.

0 Kudos
Message 1 of 4
(237 Views)
  1. Your code is messy.  I hate that.  Clean it up before asking for help.
  2. Your code makes no sense.
    1. Loops that iterate one time only.
    2. Uninitialized shift registers and an uninitialized feedback node.
    3. Lots of replication of indicators.
  3. You mention "the replace array function" being in a loop, but the only array function that is present is "Insert into Array", and it is not in a loop.
  4. I can't make sense of your description; I really don't know what you are trying to do.
0 Kudos
Message 2 of 4
(209 Views)

As has been said, your VI makes no sense at all.

 

  • If this is a toplevel VI, there is no toplevel while loop. Why?
  • If you show the digital display of your gauges, you would only need half the indicator terminals.
  • You have a tab control and a stack of cases with basically identical code. I think you only need one set of indicators, no tab control, and a small inner case structure that varies the data according to one of three state. (1: A and B random, 2: A random, B zero, 3: A zero, B random) 
0 Kudos
Message 3 of 4
(189 Views)

See if this can give you some ideas.....

 

altenbach_0-1709517790640.png

 

Message 4 of 4
(174 Views)