LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

feedback node to maintain state information

Hi all- very new to labview here

 

I've written a vi (image below) with the intent of generating a poisson distributed set of random data, and displaying it on a histogram. So far, it seems to work for one loop iteration, however, I would like to vi to continually add data points to my histogram. I think a feedback node might help with this, but I'm not sure how to implement. All suggestions are welcome (also welcome are suggestions about how my vi so far might be poorly assembled).

0 Kudos
Message 1 of 5
(1,992 Views)

Try this. (Download the png file and drag it to the block diagram.)

snip.png

 

 

mcduff

0 Kudos
Message 2 of 5
(1,962 Views)

@jamesrickaroo wrote:

Hi all- very new to labview here

 

I've written a vi (image below) with the intent of generating a poisson distributed set of random data, and displaying it on a histogram. So far, it seems to work for one loop iteration, however, I would like to vi to continually add data points to my histogram. I think a feedback node might help with this, but I'm not sure how to implement. All suggestions are welcome (also welcome are suggestions about how my vi so far might be poorly assembled).


Using Shift register to store previous data Points and use the same to update in the Current loop count.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 5
(1,956 Views)

I'd probably end up with something like this. Conceptually, I'd wrap thing in a class.

Histogram2.png

 

This doesn't answer the question. However, continuously adding data to an array, and then calculating a histogram will not last. The array will keep growing, memory and CPU will eventually run out.

 

There's a PtByPt Histogram.vi that does what you want, but only on a finite sample length. So not a perfect solution, IMHO.

0 Kudos
Message 4 of 5
(1,934 Views)

So don't torture us by making us look at a picture of a Block Diagram (which is, I presume, what you posted, which I haven't, and won't, look at).  Attach your actual VI.  This lets us "move wires", make it "look pretty" (so that we can understand it better), and maybe do some editing and say "How about this?".

 

If you are truly generating points in a Poisson Distribution, then I would naively think that if your algorithm is correct, generating 200 points should be the same as generating 100 points, another 100 points, and concatenating (or even randomly mixing them) together.

 

Bob Schor

0 Kudos
Message 5 of 5
(1,911 Views)