LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pulse measurement

Hello All 

I need some advise regarding measurement of pulse amplitude & pulse width time - using DAQ AI channel.

Problem is that VI is missing the pulse on some occasions & unable to measure .DAQmx timing is set as sample rate 500 &  250 samples. Even tried increasing the sample rate to 2000 & no of samples to 1000.Test for this signal is initiated by activating a relay ( acts as a switch ) which enables power to circuit which generates a pulse, requirement is to measure a pulse amplitude & pulse width which is approx 300msec width ( circuit generates a single pulse). Tests are run in Teststand, in one step the relay is activated to close the switch and next step is measurement of pulse. 

I am enclosing the image of  VI used , as two circuits are tested simultaneously the enclosed image shows two waveforms.

 

Vinod

 

  
0 Kudos
Message 1 of 8
(3,803 Views)

Hi Vinod,

 

Do you have a trigger configured for your DAQmx task?  If so, the task needs to be started before the trigger is sent so it is ready to receive the trigger.

 

It sounds like you mignt not be using any trigger at all, in which case it would make sense that the timing of the acquisition would be inconsistent (i.e. software-timed).  I'm not really sure what options you have available since you have not mentioned what DAQ device you are using, but you might want to look into using an Analog Reference Trigger if possible.

 

Changing between (250 samples / 500 Hz) and (1000 samples / 2000 Hz) still yields .5 seconds of data--if the pulse does not occur in this window you will miss it regardless of what your sample rate is.  The best way to guarantee you acquire at the proper time is to use some sort of trigger.

 

 

Best Regards,

John

John Passiak
0 Kudos
Message 2 of 8
(3,781 Views)

Hi John

 

Thanks for response.

 

I am using USB DAQ 6015 & have not defined trigger , enclosing the task config VI which is run prior to switch activation. DAQmx read is done just after relay is switched ON. Can you pl. suggest how I can define analog trigger? One option I am thinking of using the DAQ DO line used for relay / switch activation as a means to synchronise DAQmx read by feeding it back to DI line. But there is no spare digital line left.

 

Regards Vinod

 

 

 

0 Kudos
Message 3 of 8
(3,761 Views)
Just out of curiosity,  Is there a good reason to use the AI instead of the counter-timer function.  If you really do want positive pulse width it is a simple matter to set a DAQmx counter task to make this measurment

"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(3,750 Views)

Hi , I also need to measure pulse amplitude. Pulse width timing can be measured using counter.

 

Thanks

0 Kudos
Message 5 of 8
(3,741 Views)

Vinod,

You can set up a reference trigger using the DAQmx Trigger VI, and selecting the Reference>>Digital Edge instance.  You will have to have a spare digital line to use for the trigger.  The pretrigger samples input specifies how many samples to acquire before the trigger, and the posttrigger samples will be equal to the samples to read per channel (set in the DAQmx Timing VI) minus the pretrigger samples. 

Without using a trigger, I would recommend ensuring that you are starting the the analog input task before the pulse is being sent, and then reading continuously until after you receive the pulse. 

 

-Christina

0 Kudos
Message 6 of 8
(3,721 Views)

Christina

 

Thanks for response.

 

I could not find - where to define Pre-trigger & post trigger samples input. Can you pl. attach a VI or jpg image for clarity.

 

Or else just write steps.

 

 

Thanks Vinod

 

 

0 Kudos
Message 7 of 8
(3,705 Views)

Hi Vinod,

 

With DAQmx you actually set the samples per channel as well as the pre-trigger samples per channel.  The amount of post-trigger samples is the difference between the two.  Here's an image showing where to set each parameter in the DAQmx LabVIEW API:

 

 

Samples.PNG

 

Best Regards,

John

John Passiak
Message 8 of 8
(3,684 Views)