LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build Array out of Experimental Points

Solved!
Go to solution

What I am doing with labview, is using an output module to control a ball valve, and ultimately the flow rate throug a pipe.  I'm trying to set up a loop that will incrementally open the valve, and at each stop point record the valve position and flow rate (flow rate from a meter with 4-20 output).  Then using the array of data, I should be able to plot a line inbetween each pair of points and use my line segments to define the flow curve. 

 

Then in operation I should be able to ask for a flow rate, and using the initialization data, labview can send the right position signal to the valve.

 

I'm stuck on building this array however. Also, at this point I am simulating the signals, positions and flow rates based on some arbitrary relationships.

 

For now I would like to record the points to the array based on the click of a button.  In te future I will automate.

 

 

0 Kudos
Message 1 of 15
(3,591 Views)
So I intend to post an image of the vi.  Unfortunatly I am having technical difficulties getting the image to upload.
0 Kudos
Message 2 of 15
(3,588 Views)

to biuld an array you can use the build array.vi or a for loop...

 

can you maybe post an example of what you are having a problem with?

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 15
(3,585 Views)

I am using that, with a feedback loop, so that all the points end up in the same array.  The problem is the random zeros that come in whenever I am not adding to the array, creating a spikey looking graph, where each added point connects to zero, and then back out to the next point.

 

Also, if it continuously updates, rather than on a button click say, the array will plot a curve that is incorrect.

 

I am working on uploading.  Unfortunatly my company internet is rather restrictive on uploads, so it might be a little while.

0 Kudos
Message 4 of 15
(3,582 Views)

Hi krwlz101,

 

"The problem is the random zeros that come in whenever I am not adding to the array"

 

Did you encapsulate the "build array" node in a case structure? So only adding "real" measurement values?

Oh wait... There are zeroes added when you don't add to the array??? I really like to see that vi Smiley Wink

Message Edited by GerdW on 10-13-2009 10:10 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 15
(3,578 Views)

OK,

 

So I'm feeling like a moron here, but being new to labview, I will ask...

 

So I put the build array into a case structure.  How do I access the array during a false case (where I am not adding values)?

0 Kudos
Message 6 of 15
(3,573 Views)

Hi kwlz,

 

in one case you add a value to the array, in the other case you simply wire it through...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 15
(3,567 Views)

But I don't need the data stream during the false case.  I need the array of whatever values I've recorded.  Your VI gives me the result of the build array during true, and the values I don't care about during false.

 

Right?

0 Kudos
Message 8 of 15
(3,563 Views)
This is the VI as of now. (if my internet will allow it to get there)
0 Kudos
Message 9 of 15
(3,553 Views)

Hi krwlz,

 

it seems you really need to add an attachment here - a picture is worth a 1000 words...

Edited: don't have LV2009 installed at home...

 

You said "How do I access the array when not adding values?" and now you say "the values I don't care about during false"...

So what is it that you want? Access the array or not? Add only real values when needed or not?

The "array" is kept in the shift register. Values ("0") are only added in true case (when you get new measurement data). In false case you can access older data...

Message Edited by GerdW on 10-13-2009 10:31 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 15
(3,552 Views)