# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Eliminating narrow pulses from digital waveform

Hi,

I'm doing a digital waveform comparison of some signals that I acquired using the PXIe-6545.  I used the Digital Comparison.vi and it correctly outputs the difference between the 2 input waveforms.  Because of some expected delays, the 2 input signals are not exactly the same.  What I'd like to do now is to disregard the difference pulses that are less than 50ns.  Below is a screenshot of the diff waveform diagram.  What is a good way to eliminate those pulses?

Thanks,

Message 1 of 8
(1,693 Views)

## Re: Eliminating narrow pulses from digital waveform

I don't know of a vi specifically for doing something like this.

You could however do it fairly easily as a for loop.  Just get the "Y" component of your digital waveform.  Look for transition from F -> T - then count the number of T before the T -> F transition.  If n * dT < 50ns replace array subset of your Y with F.  Otherwise leave it.

Message 2 of 8
(1,688 Views)
Solution
Accepted by topic author agriffith

## Re: Eliminating narrow pulses from digital waveform

One algorithm:

1. Scan waveform.  Wherever there is a transition, note the index, creating an array of indices.
2. Take first differences of the array of indices.  Compare these differences with your delta-t criterion (you expressed it in ns -- convert this to "samples" by multiplying by the sampling frequency).
3. Whereever you see a "True", this shows a "too narrow" pulse.  Using the two indices that define the beginning and end of this pulse, go back to your Waveform and negate the (boolean) values between these points.

Bob Schor

Message 3 of 8
(1,674 Views)

<Deleted>

Message 4 of 8
(1,625 Views)

## Re: Eliminating narrow pulses from digital waveform

I think the ways listed to eliminate the pulses are valid and you can certainly pursue them, but it might not be all that difficult to eliminate them altogether so that post-processing is unnecessary. It's pretty common practice to loop the clock line to the compare strobe line at the DUT interface board on HSDIO cards, effectively delaying the compare strobe (sample clock) by the same amount of time as your data. You can also tweak the data delay directly on the PXIe-6545 to account for propagation delay. If this isn't feasible for some reason or another I understand, but I wanted to make sure to mention this is a common use case. I've seen the loopback method work very well before and it's typically very easy to implement.

Alex W.
Message 5 of 8
(1,623 Views)

## Re: Eliminating narrow pulses from digital waveform

Hi Alex,

I was hoping that there would be another way besides post-processing.  Can you elaborate more when you say "You can also tweak the data delay directly on the PXIe-6545"?  How can I do that?

Thanks,

Alexandra

Message 6 of 8
(1,617 Views)

## Re: Eliminating narrow pulses from digital waveform

Hi Alexandra,

Most of our HSDIO devices have a data delay feature built in. This White Paper discusses the use of data delay and provides an example of how it is implemented in LabVIEW.

Advanced Features of High-Speed Digital I/O devices: Data Delay

http://www.ni.com/white-paper/7280/en/

Are you able to physically loop the clock to the compare strobe line? As I mentioned, this typically gets you very close to the correct delay.

Thanks,

Alex W.
Message 7 of 8
(1,593 Views)

## Re: Eliminating narrow pulses from digital waveform

I was able to connect the clock output to the strobe but it was not enough for me.  My EUT are two different ICs with different timing and that's why it was easier to discard pulses less than 50ns.  However, it seems that there might be a bug on the DTbl  Invert Digital Subvi.  After scanning the rising and falling edges and using this indexes in the subVI, it'd give me an error.  It seems that it was written with the default of (-1) number of signals in mind.  I rewired that section and then it worked.

Thanks for the help.

Message 8 of 8
(1,561 Views)