LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add custom graphical features to cursors in Waveform Graphs

Hi all:
I´ve starting a project in LabView, in which I need to synchronise some events with a sound track.
To do this, I tought that LabView would be the tool of choice, but now that I´m working on it, I
found my self faced with some serious problems.
What I want to do, is to represent a .wav sound file in a Waveform graph, and then use the cursors
to mark some points in the desired places where I want things to happen, but, these events are
going to be on during some period of time.
So, it will be natural that some consecutive events might overlap in time, and I need to have
some control on this.
The best solution would be to have a rectangular strip attached to the cursors, with a lenght
representing the exact time duration of the event.
But this is only possible on my dreams, because I dont see any tools on LabView that aloud us to implement
any extra graphical features on the cursors.
But as I learned more about LabView, I found that a user can program blocks of software in C, to implement
things that LabView does´nt do by default.
And now I´m wondering if this could be the solution for my problem.
Is it possible to add new custom features such as the one that I need?
If yes, how?

I have atached an image to give a clear ideia of what I need.

I´ll apretiate any help.
Thanks
0 Kudos
Message 1 of 3
(2,680 Views)
No, you can't modify the cursors with either the native or C code. But I'm wondering if you can't get what you want with an XY graph instead of a regular graph. You can have multiple separate plots and some of them can be thick horizontal lines. I've attached a file with just some constants wired to an XY graph to show what I mean. Obviously, you'd have to calculate the values for the x and y arrays in your real situation. If you have to use a regular graph to display the .wav file, you could also overlay a transparent XY Graph on top. The other possiblity is to use a picture control to display your data. There's a couple of shipping examples (i.e. Waveform and XY Plots, XY Multi Plot) that show how data can be represented and Pen Attributes and Sub setting shows how you can draw lines of different widths.
Message 2 of 3
(2,669 Views)
Hi Dennis
Thanks alot for your help.
Take a look at what I´ve done on a Waveform graph, based on your ideias.
But now, another problem arised.
I need to create these cursor+bar groups in a programaticaly way.
On the example, two groups of cursor+bar are shown, but I had to wire each
one by hand.
What I want is to add new cursor+bars everytime I´ll press a button.
Do you know of any way to do this?
0 Kudos
Message 3 of 3
(2,653 Views)