Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cannot acquire the stated DAQmx pretrigger samples

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

 

CLD - Labview Certified Developer
0 Kudos
Message 1 of 7
(4,007 Views)

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

 

0 Kudos
Message 2 of 7
(3,993 Views)
Ciao Alessio,
first of all thanks for your reply.
Yes, I did exactly what you described and everything works fine in many cases but not always: that's the problem. I cannot understand why (as shown in the picture) sometimes the pretrigger acquired seems longer (>500ms).
 
I am monitoring a signal that can take not always the same time to rise up but that shouldn't affect the trigger capture.
 
I read that reference trigger <<Configures the task to stop the acquisition when the device acquires all pretrigger samples..>> and that <<pretrigger samples per channel specifies the minimum number of samples>>...maybe this the problem?
Can it happen that the pretrigger samples were more than what specified as input (in my case 1000) ??
 
regards
 
 
 
CLD - Labview Certified Developer
0 Kudos
Message 3 of 7
(3,992 Views)

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?

 

0 Kudos
Message 4 of 7
(3,988 Views)
Right!
I got always 3000 samples with more than 1000 as pretrigger.
I cannot figure out why....
 
CLD - Labview Certified Developer
0 Kudos
Message 5 of 7
(3,985 Views)
Are you sure you are looking at data the right way?
I would test the board with a Digital Trigger and see if the pretrigger samples number is right or not.
This is easy to check. I just need to attach a digital pulse signal (a push button for instance) to the Dig Trig Line and route it also to an Analog Channel so that you can see in your acquisition both the analog signal and the trigger and compare trigger positions.
 
0 Kudos
Message 6 of 7
(3,973 Views)

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

CLD - Labview Certified Developer
0 Kudos
Message 7 of 7
(3,947 Views)