LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom spectrogram time scale

Solved!
Go to solution

Hello,

 

I have a spectrogram (intensity chart) display that I'm using as a Time vs Frequency vs Amplitude waterfall plot. This display is receiving realtime incoming data from hardware and performing DSP (using spectral measurements toolkit) to return a single FFT frame or update to the display. My spectrogram is configured to have 100 updates on the display at one time and I have a buffer behind the scenes containing a total of 5000 FFT frame updates. Essentially I'm drawing a scrolling waterfall display with the ability to go back in time and look at the data.

 

Due to the nature of running DSP on live incoming data (too high of a sample rate for fully realtime processing), on a windows machine, and only grabbing packets of data when DSP is ready for more -- my time scale updates are not exact. I use the most recent t0 from an incoming packet of data as the spectrogram Y-Scale offset and then set the multiplier to whatever the (operator controlled) update rate value is. The update rate just controls the number of FFT frames that are averaged before a single update is published to the display/buffer.

 

So, after a lengthy explanation my question is: Would it be possible to have a custom time scale for my spectrogram so that the times would be accurate all throughout the entire history buffer? Currently, if the update rate is changed that will change the time scale multiplier and all old data on the display will have incorrect time values. 

 

I guess I'm looking for a way to hold an array of 5000 timestamps along with my 5000 updates and publish the newest 100 timestamps/updates to the display based on the update rate. I've seen the Y-scale -> Marker Values[] property. Would this be something that I could set 100 timestamps on my display?

 

Thanks,


Tim Sileo



Tim Sileo
RF Applications Engineer
National Instruments



You don’t stop running because you get old. You get old because you stop running. -Jack Kirk, From "Born to Run" by Christopher McDougall.
0 Kudos
Message 1 of 6
(2,985 Views)

Hi Tim,

 

Are you using the 3D Waterfall Graph from the 3D Palette to display this spectrogram?  I see the Y Scale » Marker Values [ ] property available for a Waveform Chart, but not for the waterfall graph.  Could you just parse the timestamp data from the 5000 updates and build an array from that data, then pull out 100 of those at a time when they are needed?  Thanks!

Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 6
(2,956 Views)

Hi Taylor,

 

I am using an Intensity Graph and doing the history buffer myself since I couldn't get an intensity chart to scroll the way I needed it to. My circular buffer is just 5000 "lines" or updates to the display in which each are averaged FFT frames. For every update to the display I read the 100 most recent display updates from my buffer and display them on the intensity graph. I currently don't have a buffer for the time values that correspond to those updates but I was just wondering if I could write those 100 most recent time values to the display Y-axis at the same time I'm writing the 100 FFT frames. So, I wouldn't need to parse anything it would just be keeping track of my read pointer in the buffers, of which there is a 1-1 correlation between the timestamp buffer and the data buffer.

 

The Y Scale >> Marker Values [] is present in the property node for the intensity graph when I look at it. I suppose this is an easy thing to test by writing incremented timestamps to the Y-axis of an intensity graph in a different VI but I was curious as to whether or not anyone could confirm it before I tried.

 

Thank you,

 

Tim S.



Tim Sileo
RF Applications Engineer
National Instruments



You don’t stop running because you get old. You get old because you stop running. -Jack Kirk, From "Born to Run" by Christopher McDougall.
0 Kudos
Message 3 of 6
(2,948 Views)
Solution
Accepted by topic author TimS.

Hi Tim,

 

I have attached a sample VI displaying the functionality of the Marker Values property for an axis.  If you have the data lined up with the correct timestamp in your arrays, you should be able to choose which time stamps to display with this property node.  Hope this helps! 

Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 4 of 6
(2,933 Views)

Hi Taylor,

 

Based on your example I now think that the Marker Values property can be used to do what I was hoping to do. Thank for the help!

 

Regards,

 

Tim Sileo



Tim Sileo
RF Applications Engineer
National Instruments



You don’t stop running because you get old. You get old because you stop running. -Jack Kirk, From "Born to Run" by Christopher McDougall.
0 Kudos
Message 5 of 6
(2,925 Views)

Glad I could help, Tim.  Have a good one!

Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 6 of 6
(2,917 Views)