10-10-2018 08:02 PM
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).
10-10-2018 11:27 PM
Try this. (Download the png file and drag it to the block diagram.)
mcduff
10-11-2018 12:10 AM
@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.
10-11-2018 03:43 AM
I'd probably end up with something like this. Conceptually, I'd wrap thing in a class.
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.
LabVIEW Programming ((make LV more popular, read this)
10-11-2018 04:37 PM
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