06-06-2006 10:38 AM
Hi,
I have a PXI-DAQ 6251
I have connected an analog signal to APFI0 trigger input.
Fc= 2000Hz
Duration = 3s
Pretrigger samples = 1000 => Pretrigger duration = 500ms
Trigger level =-1.4 (rising)
I have to acquire a signal starting from an analog trigger: my problem is that "sometimes" I cannot capture the exact number of pretrigger samples.
I have tryed both the following examples of NI:
1. this example use Start Trigger option: the result waveform always start from the trigger point (without pretrigger points)
NI-DAQmx: Acquire Analog Input Data Using a Hardware Analog Trigger <http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=05627E7F73FA5C5EE0440003BA7CCD71&p_node=201214&p_source=external>
2. this example use Reference Trigger: sometimes it works but sometimes I get a trigger point "shifted" after 500ms (??? see attached picture)
NI-DAQmx: Acquire N Scans Using an Analog Reference Trigger http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=06A56C48EF990A19E0440003BA7CCD71&p_...
What is wrong??
Thank you
regards
06-07-2006 12:50 AM
The picture you attached needs to be commented.
If what you want to do is to acquire N=3000 samples at 2000 Samples/second with 1000 pretrigger samples, then the right track is to use a reference triggered finite acquisition.
When the VI in the example is started, it begins acquiring in the background data in continuous mode. As soon as the reference trigger condition happens, the driver will return 1000 samples prior to the trigger time and 2000 samples after that, for a total acquisition of 3000 Samples over 1.5 Seconds.
The resulting data will be an array of 3000 samples (1.5 seconds) where 1000 samples (500ms) are coming from a pretrigger situation and 2000 samples (1 sec) have been sampled right after the trigger.
Also, remember what you find on the M Series User Manual when looking for Analog triggering through the APFI lines:
When you use either APFI <0..1> terminal as an analog trigger, you should drive the terminal with a low-impedance signal source (less than 1 kΩ source impedance). If APFI <0..1> are left unconnected, they are susceptible to crosstalk from adjacent terminals, which can cause false triggering.
AlessioD
06-07-2006 02:00 AM
06-07-2006 02:33 AM
I think I understand what you mean.
All in all, how many samples do you get at the end of the acquisition?
The array you get from DAQmx Read should contain 3000 Samples. Is this true?
If, as I expect, the output array is made up of 3000 samples, then if you have more than 1000 pretrigger samples, you should also have less than 2000 post trigger samples, right?
06-07-2006 02:49 AM
06-08-2006 12:31 AM
06-14-2006 06:40 AM
Hi,
at last a colleague of mine found the way to solve it. He applied an RC filter at the APFI0 input trigger signal and everything works.
Even if we acquired the same signal from an AI input probably we didn't be able to see a spike that started the trigger before the expected event.
However thanks again for the help.
Bye