Hi,
I am not sure I understand your requirements completely. Do you need to generate a new histogram of the circular buffer everytime there is a new sample? If this is the case you can use the point-bypoint queue to store the values and calculate the histogram on that data.
I am attaching a couple of examples here. One of them generates a running histogram based on what I mantioned before and the second one applies a running histogram over a waveform.
Please let me know if you have any further questions.
Regards,
Juan Carlos
N.I.