LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing resolution of bins in Histogram VI.

Solved!
Go to solution

Hello Everybody,

 

I have been trying to plot a histogram for my photon counting experiment. I am using the histogram.vi, it is working perfectly fine. I would like to add one feature to the histogram that I am plotting, which is changing resolution of bins. In the example code that I have attached, I have used random number generator (generates 1 to 100) to check the histogram which has 100 bins each with a resolution of one, suppose I want to use 50 bins each with a resolution of 2 or 25 bins with each bin holding 4 values, how can I do this?

 

Also, once the program terminates, How can clear the histogram memory, so that a fresh polt will be poltted? 

 

Thanks for any help

Pradeep.

0 Kudos
Message 1 of 3
(2,926 Views)
Solution
Accepted by topic author pradeepK

Hi pradeep,

 

you wired a constant "100" to the Histogram function and now you wonder how to change the number of bins? Don't use a constant here! Doh…

 

You don't wnat to clear the histogram, but you want to clear your data buffer. Just initialize the Feedback node!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,917 Views)

thanks GerdW, Insted of using histo.vi I used general histgrom.vi which has the option of binning. 

Have a nice day. Smiley Happy

0 Kudos
Message 3 of 3
(2,912 Views)