Jump to content
smithd

sparse digital graph

Recommended Posts

Hey all,

I'm looking to make a user interface for digital triggers and I want to display a chart where each trigger is displayed vs the others on the same time scale.

The problem is that I have a potentially very long time scale, so to get a reasonable resolution (say a 10 ns trigger displayed against a 100 ms period) I need a lot of samples per channel. I may have N channels, and that difference in period may vary wildly. However each channel will only likely have something on the order of 2-100 transitions, so I'd like to store the information in this sparse form (even my initial 'sparse' form ran out of memory the first time, since I included the main oscillator :/)

My initial solution would be to just use the digital graph (because thats what I want it to look like anyway) but that appears to require a point for every value, even those which don't change. An XY graph plots the signals on top of each other, and thats tough to visualize. I could offset each signal by 1.5*ch#, but then I end up with a super scrunched graph (I'd like to be able to scroll up and down). I looked at the mixed signal plot because I have XY data and I have groups of triggers which belong to the same subsystem...but there appears to be no way to dynamically add or remove groups. 

So, does anyone have any thoughts on how to accomplish this?

Share this post


Link to post
Share on other sites

That's a very interesting need. If you represent your data sparsely, such that you store transitions and timestamps only, then you're unlikely to find a plotting tool that handles this data format. It might worth looking for a .NET control that exists already for this and interfacing with that. But I would prefer a pure LabVIEW solution if possible.

My immediate thought is that you're going to need to create your own graphing tools. If you want to look at the entire signal then you'll need to reinterpret the sparse data in order to use it on a traditional LabVIEW graph, but then you have memory limitations (as you already experienced). The next option, and it might be possible since you're talking about simple rectangular digital signals, would be to draw your own lines with the picture tools and build up your own graph image. You can then re-interpret the sparse data as instructions for plotting a line. It's a little work, but not a great deal.

My ambition then would be to wrap this up as an XControl, including horizontal and vertical scrollbars, so that one can pan through the image (it might need to be redrawn on the fly as the user moves a scrollbar), and zoom in and out (changing the range of values to include in the plotting functions). You won't want to recreate all the functionality of the LabVIEW native graphing tools, but the basics mentioned above wouldn't be too difficult.

  • Like 1

Share this post


Link to post
Share on other sites

I'm not sure I'm understanding correctly. But could you not put all the data into a sqlite database and query using "group by" for display?

Share this post


Link to post
Share on other sites

A quick VI that creates sparse representations of digital data, and plots them. The plot supports multiple waveforms and includes a horizontal scrollbar to scroll through the time axis.
It needs axes plotting adding, and support for zoom (just need to capture a user event, such as mouse scroll, to change x axis range and replot).

This any use?

sparse_digital_waveform_plot.png

Sparse_Digital_Plot_Multiple_Example.vi

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, Thoric said:

A quick VI that creates sparse representations of digital data, and plots them. The plot supports multiple waveforms and includes a horizontal scrollbar to scroll through the time axis.
It needs axes plotting adding, and support for zoom (just need to capture a user event, such as mouse scroll, to change x axis range and replot).

This any use?

Sparse_Digital_Plot_Multiple_Example.vi

Wow that is really nice looking and exactly what I'm looking for. Doing it all custom sounded like a big pain but you've made it look a lot easier than I thought :)

The other advantage this provides is I had a request to be able to visualize the dTs for selected channels. Originally I had a separate tab where users would just have to select two channels, but if drawing it manually it probably wouldn't be too hard to overlay a dT.

Thanks a lot!

8 hours ago, ShaunR said:

I'm not sure I'm understanding correctly. But could you not put all the data into a sqlite database and query using "group by" for display?

I don't totally comprehend -- I have all the data I need and I can easily generate data for a digital waveform or xy chart, the challenge is plotting it in a nice way. Thoric's sample looks just like what I wanted to accomplish.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.