LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Placing the trigger 'dot' on a time waveform

Solved!
Go to solution

I have successfully placed the 'red' dot at the lead end of an XY orbit plot, but am at a loss for placing the 'trigger' dot on the time waveforms.  Obviously, the trigger happens once per revolution, so if I place four full sine waves on the screen, there should be four 'dots' marking the trigger positions.

0 Kudos
Message 1 of 35
(3,500 Views)

I'm not quite sure what you mean by trigger 'dot' on a waveform. Could you clarify. What are you trying to achieve here?

Certified LabVIEW Developer

0 Kudos
Message 2 of 35
(3,474 Views)

I have a trigger pulse that is equivalent to a 5% duty cycle square wave.  I want to represent the peak of that trigger pulse on the two time waveforms that are collected at the same time.  See the plots included:

 

0 Kudos
Message 3 of 35
(3,467 Views)

@Coryman wrote:

I have a trigger pulse that is equivalent to a 5% duty cycle square wave.  I want to represent the peak of that trigger pulse on the two time waveforms that are collected at the same time.  See the plots included: 


I'm not sure what you mean by the "peak of a 5% duty cycle square wave".  If you plot the square wave itself, you will definitely see its rising and falling edges.  In fact, you can use this to make something similar to what you are talking about.  The code below generates two waveforms (from the Waveform Generation sub-Palette).  The first is a Sinusoid, the second a Square Wave of the same frequency.  It's been given a 1% Duty Cycle (so it is very brief), been offset by 0.1 (so it sits just above the sinusoid peak), and has a phase of -85 (to more-or-less center the 1% peak over the sinusoid -- this needs to be adjusted for the sampling time).  The Sine Wave has been plotted as a line, the Square Wave as Dots. 

Peak Peek.png

Peak Peek BD.png

Try coding this up and see how it works without the sub-VI "Secret Sauce".  You'll see there are a lot of points at 0.1 that aren't showing on this plot.  What did Secret Sauce do to them?  [Hint -- what does not get plotted on a Graph or Chart?]

 

The point here is that you can, in principle, generate a Waveform that has most of its points "invisible" and selected points (at times and Y magnitudes of your choosing) plottable, so you can put "dots" where you want.

 

Bob Schor

 

0 Kudos
Message 4 of 35
(3,458 Views)

Bob,

That is real close to what I want.  I need to take that red dot and have it coincide with the sine wave, be part of it.  I know there are routines to strip out dt and y, so I need to merge those dots so that the y values are the same, then the dots would overlay on the sine wave.  Yes?

0 Kudos
Message 5 of 35
(3,455 Views)

What about adding another waveform to your sinwave chart? Change the properties of this waveform to only show black points and no line between them.

The data set for this new waveform by default would fall outside of your sine wave chart so that you don't see anything if there is no trigger (autoscale for Y will need to be off). And then when your trigger occurs, replace your new waveform default (x,y) value with your current sinewave y value and your trigger point x value. 

  

Let me know if this makes any sense to you.

 

- S

 

p.s. You would need to create a new waveform for each sinewave you have

 

Certified LabVIEW Developer

0 Kudos
Message 6 of 35
(3,447 Views)

I put the Red Dots above the sinusoid by setting the offset to 0.1.  If I leave it at 0, it sits on top.

 

Bob Schor

0 Kudos
Message 7 of 35
(3,434 Views)

Bob,

Sorry.  Obviously I was involved with too much stuff when I looked at your solution.  I will implement it today and let you know.

Thanks!

Ron

0 Kudos
Message 8 of 35
(3,421 Views)

Bob,

Seriously?  I looked at your example and it doesn't give me any answer.  It poses a test like I was still in school.  'What's in the secret sauce?'  If I knew that, I wouldn't have posted the question in the first place!!!!  

Here is what I have so far.  Two time waveforms that are not at the same phase.  I also have a tach 1 volt peak pulse that is also not at the same time as the sine waves.  They are all at the same frequency.  So, I want to have the trigger show up on each of the ttime waveforms at the time of the trigger pulse, as a dot on each trace.  I figure the peak search routine will give me the location of each of the peaks.  So my problem is merging the plots.

0 Kudos
Message 9 of 35
(3,408 Views)

Some more detail.  I passed the trigger waveformthrough a 'peak detector', so I have an output of locations where the pulses occur.  I have multiplied those locations by 0.000488 seconds.  That is required to give the locations in seconds.  I have also broken the time waveforms apart, so there is only one sine wave and that is what I want to put the trigger 'dots' on.  So I need to merge those two into one graph.  

0 Kudos
Message 10 of 35
(3,405 Views)