Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB 6000 series pretrigger

Hello Community, please help me for this problems.

 

I am having NI USB 6008 and 6009 and 6001 to do data acquistion on my lab as final project on undergraduate program. I am mechanical engineer and it is a little bit hard for me to make new programs because I found no spesific example on the internet.

 

My final project is like this:

As we know that cheap NI USB 6000 series:

- Do not support Analog Trigger.

- Do not support Reference Trigger VIs, so we can not do PRETRIGGERING (acquire some data before the trigger occur).

 

As a solution, actually we can use ANALOG SOFTWARE PRETRIGGER, as mentioned in https://forums.ni.com/t5/Multifunction-DAQ/How-to-use-a-pretrigger-to-obtain-data-on-three-channels-...

or spesifically here in the NIDAQmx Example: Analog Software Trigger with Pretrigger (I attach in Visual C# project, you can read the ReadMe files and .exe files on ContAcqVoltageSamples_IntClk_SWTrigger\CS\bin\Debug.

 

BUT, the program work like this:

The acquired signal or data from Analog Input is checked one by one, if the value is above Trigger Level, so the "trigger will occur" and the data recording begins.

SADLY, those depends on the sampling rate. I mean, if the sampling rate is 1 ms, so it will capture the data in analog input like 1 ms, next one is 1 ms (so capture on 2 ms), next one is 1 ms also (so capture on 3 ms), next on 4 ms, next on the 5 ms, and so on.

WHAT IF THE TRIGGER ACTUALLY OCCURRED in the 1.5 ms time? or 2.5 ms time (not integer of sampling time)? while the data is captured only on 1 ms, 2 ms, 3 ms, 4 ms, and so on.

That is a problem (and of course the main topic for my final project).

 

So, I make an alternative solution:

1. Input the data to Analog Input NI USB 6000 series.

2. The NI USB will wait for PFI0 to get Trigger Signal, while still receiving the data in Analog Input. It a parallel process.

Please keep in note that, in NI USB 6000 series, I should not use Trigger VIs for this case, because it starts the reading, or roughly say, can not read any data before the trigger occured. I want to read and wait the trigger in parallel, right?

3. If the memory of NI USB 6000 series is full, so it will delete the data from the Analog Input (FIFO, Circular Buffer System). 

4. If the PFI0 get trigger signal, it will INTERRUPT the data receiving and say "Okay, now we record the data because our user need the data, capture some pretrigger samples and posttrigger as main data, all from the Analog Input!"

 

So:

Is it possible to buffer data in Analog Input while waiting trigger from PFI0 in NI USB 6008? I need to buffer the data because I want to record also some samples before the trigger in PFI0 really occur.

 

Thanks a lot and so much, greetings from Indonesia Smiley Happy

0 Kudos
Message 1 of 3
(752 Views)

Or simply my question is:

 

Hello!

 

Is it possible to read or buffer data in Analog Input while waiting trigger from PFI0 in NI USB 6008?

I need to buffer the data because I want to record also some samples before the trigger in PFI0 really occur.

 

Maybe as solution, I can use Counter in PFI0 other than Trigger VI.

 

Is it still possible tread or buffer data in Analog Input while counting PFI0 in NI USB 6008?

 

Is there any example.

 

Is it hard for me to make new programs because my background is mechanical engineering, not that software based.

 

Also, the NI USB 6000 series do not support pretriggering and reference trigger to save data before pretrigger.

Thanks a lot!

0 Kudos
Message 2 of 3
(744 Views)

Is it possible to read or buffer data in Analog Input while waiting trigger from PFI0 in NI USB 6008?

I need to buffer the data because I want to record also some samples before the trigger in PFI0 really occur.


No, this is not possible.   Even if it were possible, the trigger would still latch on the next sample clock edge since the task would already be running, so you'd have the same problem you described in your post above when you stated:

 


I mean, if the sampling rate is 1 ms, so it will capture the data in analog input like 1 ms, next one is 1 ms (so capture on 2 ms), next one is 1 ms also (so capture on 3 ms), next on 4 ms, next on the 5 ms, and so on.

WHAT IF THE TRIGGER ACTUALLY OCCURRED in the 1.5 ms time?


It sounds like you have the logic implemented to check if each sample higher than your threshold, and that gives you a triggering resolution equal to your sample clock.  What you need to use is a function that can return the fractional index where a threshold was crossed.  In LabVIEW, there's the Threshold 1D Array VI, which does exactly that.  In Visual Studio, you'll have to see if such a function exists.  If not, you may have to write it yourself.  It could be as simple as a linear interpolation between points if that's accurate enough for your needs.  If it isn't, you'll probably need to be more familiar with digital signal processing to implement a smoothing filter or spline fit or something fancy like that.

0 Kudos
Message 3 of 3
(729 Views)