Showing results for 
Search instead for 
Did you mean: 

Two dimensional histogram; choosing a particular time and background subtraction

In my data acquisition program, I am plotting a 2D histogram with the help of a 2D histogam sub vi given by one of my colleage (attached here). It keeps on updating while running. My output data consists of X values, Y values and corresponding time. X and Y values are fed to the 2D to plot the XY histogram(2D histogram). I want to choose the histogram at a particular time, let us say, at 6 microsecond(the program runs for several cycles; each cycle duration is 12 microsecond). Then plot the XY histogram only at 6 microsecond by subtracting the XY histogram during 0-5 and 7-12 microseconds. The sample data is also attached. In the data, each cycles are numbered as 'injection number'. In the 'Data' file first column is X, second Y and third time.

Download All
0 Kudos
Message 1 of 2

Hello aneps,


So from what I understand, you are trying to read in your data file and filter it by time. Using the filtered data, you want to create a histogram with the X data as the bin, and the Y data as your bar height.


Is this correct?


If so, a way to filter the array would be to search through the time column, using Search 1D Array. With the index value outputs, you can programmatically extract the data from the larger array.  This new array can most likely be passed into your 2D histogram VI.  Some modification might be required.


I also noticed that your data file contains multiple data sets for some injections, such as #12, and no data sets for other injects, such as #80.  Is this expected behavior?



Thomas C.
FlexRIO Product Support Engineer
National Instruments
0 Kudos
Message 2 of 2