10-23-2009 03:26 AM
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
10-23-2009 04:29 PM
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
10-25-2009 05:36 AM
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
10-25-2009 11:30 AM
10-25-2009 03:28 PM
Hi , I also need to measure pulse amplitude. Pulse width timing can be measured using counter.
Thanks
10-26-2009 04:08 PM
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
10-28-2009 04:55 AM
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
10-28-2009 07:11 PM
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:
Best Regards,
John