LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to link indicator data into array from separate tabs

Solved!
Go to solution

That as well changes the value I am trying to obtain.

0 Kudos
Message 11 of 14
(495 Views)

@Jwells93 wrote:

From, what I have understood, from there use build array into the Array.


You have understood incorrectly.

Here is a more complete example for you to look at (note that I have used FOR loops instead of WHILE loops, but the same principle applies)

 

Frozen_0-1655744501362.png

 

Notice how the "build array" function adds another dimension to the original array.

 


@Jwells93 wrote:

 

How do I keep it from filling the entire array and taking only one slot.

 


This question makes no sense.

 

"keep it from filling the entire array"

The loop is filling the array. If you want to see the array "filling up" try putting the indicator inside the loop. Of course, you will need to keep the array contents in a shift register for that to work.

 

"taking only one slot"

Are you asking how to retrieve one element of the array? or are you asking why the array is "full"?

 

Sounds like you really could benefit from some basic LabVIEW training. (See the links at the top of the forms.)

 

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 12 of 14
(476 Views)

Thank you all,

I appreciate the help.

 

I have a decent understanding of LabVIEW.  I am trying to add a few things to a VI I was handed down that from both my perspective and those here is in shambles.  Adding basic things to this VI that seemed to normally work but just get me overly confused to where I seem like a noob with LabVIEW, and I have no idea how to explain the situation in the correct terms.

 

My issue seems very simple but I am very lost on how to fix.  I am running a test using this VI to accumulate MAX force values.  It records one Value at a time, and all I am attempting to do is put that data into an Array.  I keep running into the issue of it recording, but only taking up the first slot in the array and continuing to record over itself.

LabVIEW1.PNG

The other issue, using info from this chat, the entire Array fills with the same value.

LabVIEW2.PNG

 

What I am attempting is for it to take one data point and add it into the array, and take another piece of data and add that into the array.

LabVIEW3.PNG

 

The VI is in shambles and hard to understand but I will post it.

I am asking someone to maybe help me with a small example or any other push in the right direction?

 

Thanks again for everyone's help, this will be my last ask on this page.

0 Kudos
Message 13 of 14
(467 Views)
Solution
Accepted by Jwells93

That code is a mess. I highly recommend that you look at some examples of basic state machines. Hint, state machines will use a case structure, not event structures. Event structures are for processing FP activity. Also, it is not a very good idea to nest event structures. In addition, this code does not demonstrate that the author has a basic understanding of LabVIEW. You should not need all of the local variables scattered throughout the code. You should be using shift registers to transfer your data through the code. Never use "Use default if unwired" for anything that is a reference such as your DAQ task. If you execute any case that does not have it wired you will lose your reference to the DAQ task you created before entering the loop.

 

My advice for this would be to scrap this code, start over using a basic state machine architecture. Before doing that you should write down the basic flow chart for what you want your application to do. Then implement that flow chart in code. I also think you would benefit going through the core LabVIEW training. You can find links to these at the top of the forum.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 14 of 14
(463 Views)