LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pulse measurements vi that returns all pulse measurements

I need to analyze all of the pulses in a fast realtime process.  For some reason the Pulse Measurements vi only returns a single specified pulse measurement.  This means you have to iterate through all pulses (in my case hundreds).  It seems that under the hood (a dll, too bad)  it must be at least doing edge detect and search for the nth pulse so it is computing alot of the information for each pulse on its way to number n.  I was hoping thst perhaps someone had figured out a way to do this type of analysis optimized to return ALL pulse measurements in a waveform.

0 Kudos
Message 1 of 9
(3,572 Views)

I think you're trying to mix two different things. Your counter is a hardware triggered counter that doesn't give you the raw digital values, it just counts up for you can can achieve much higher sample rates than the other channel types. If you want the raw data, you need to configure a digital input task and read in the digital signal that way. You will be limited by your device's top sample rate.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 9
(3,552 Views)

I'm sorry I was refering to the Pulse Measurements.vi from the Signal Processing Palette.

0 Kudos
Message 3 of 9
(3,535 Views)

Oops, I misread.

 

What is the size of your dataset and how many pulses will it contain?

The more pulses the longer it takes. I can run this code with 10Hz pulses, 1kHz data, 100k datapoints in ~730ms.

If you can split the signal in to parallel loops, you can speed it up quite a bit, too.

 

I've got a pulse!.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 9
(3,524 Views)

Thanks for your reply.  I will have 32 waveforms sampled at 100kHz for 1s.  Each waveform will contain 500 pulses.  I would like to be able to do this in real time but I am not even close.  I am looking into the wavelet peak detection as well as the edge detection vi's from the jitter toolkit and b both are an order of mangitude faster than the pulse measurement vi.  

0 Kudos
Message 5 of 9
(3,510 Views)

100k samples of 100kHz data with 500Hz pulses is a lot of data. You're not going to get through that super fast and you can't dive in to the Pulse Measurements VI to get all pulses becuase it's a library call. The best optimization I can suggest is to use parallelism for your waveforms themselves. This takes about 2300ms with your data size:

I've got a 100kHz pulse!.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 6 of 9
(3,483 Views)

Crosspost where I posted a VI that I wrote for processing analog signals looking at all transitions.

Message 7 of 9
(3,477 Views)

Your VI doesn't give info about each pulse, but OP could adapt your code to fit his needs faster than the Pulse Meas VI maybe. The key is the conversion for analog to digital and then iterating through that data.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 8 of 9
(3,469 Views)