LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Histogram does not display correctly

I've come up with a VI to display a histogram with fixed interval of 3. The input data ranges from 0 to 48 and hence there are only 16 intervals. However, the output is not what I expected. It seems that the values are not plotted exactly in the middle of each interval. A bug in the program is suspected. Attached is the VI and the data file. I would appreicate if anyone could rectify the problem I am facing. Thank you.
Download All
0 Kudos
Message 1 of 3
(2,725 Views)
1) Histogram works correcly - but the value that you supplies as max_DGD is 45.18 instead of 48 (this is why you have incorrect center values)
2) Something looks strange. The data file supplied is not intended to be used with your program. Also, I doesn't understand why you use a for loop in your vi...
Message 2 of 3
(2,725 Views)
Set max_DGD to 48 on the front panel and set to default. (If it is always 48, just use a diagram constant instead).

Your diagram is way too complicated for this simple task. See attached cleaned_up example for some hints (set the data filename accordingly, I have it set to your sample file).
Message 3 of 3
(2,725 Views)