08-23-2010 04:49 PM
Hello all!
I have a NI USB-6210 DAQ and I'd like to know if with it I can do this:
I have an analog pulse signal (let's say, each pulse separated by 100 ms) and I want to use those pulses as the triggers for my acquistions.
I've been through some examples and it seems that they allow you to detect an analog trigger and from that trigger you start your acquisition.
What I really want is somewhat different. I want to:
- detect an analog trigger
- acquire N samples
- detect the next trigger
- acquire N samples
- detect the next trigger
- acquire N samples
...
...
...
Is it possible?
Any help would be greatly appreciated.
Thank you very much in advance.
Best regards,
Filipe Magalhães
08-24-2010 10:43 AM
No one is able to give me some input on my question? I don't believe that...
Or is it too simple that no one even bother to answer this? 😉
08-24-2010 10:51 AM - edited 08-24-2010 10:52 AM
It does not seem you have really read the descriptions of the examples since there a couple that would seem to do exactly what you want. Look at Cont Acq&Graph Voltage-Int Clk-Analog Start and Acq&Graph Voltage-Int Clk-HW Trig Restarts.
edit - the digital trigger examples should also be looked at. It is simple to change them to an analog trigger.
08-24-2010 11:27 AM - edited 08-24-2010 11:28 AM
While the examples Dennis mentioned with the digital trigger will work, the 6210 does not support an analog trigger - so the HW won't support that part. You're options are:
1. Use external circuitry to turn your analog level into a TTL trigger
2. Acquire all the data and process the chunks you want in SW
3. Upgrade to a different device - the USB-6351 would do this natively
Hope this helps,
Andrew S
09-01-2010 05:30 AM
Hi,
i have around the same problem. My problem that i exactly am trying to do is this:
note: software that i'm using is MATLAB 2009a, hardware is NI USB-6218
p/s: below is not the coding, just a block diagram of the flow.
start(ai)
wait dio input
single scan %let's visualize the data is saved in hardware buffer here. data(1,1)
wait dio input %daq stop/pause/hold acquisition
single scan %data(2,1)
wait dio input
single scan %data(3,1)
stop(ai)
getdata %transfer all data to PC after N number of scan(this example is 3) ---> data = [1;2;3;....N;]
i have tried the examples,
ContAcqTriggerStart_UI = starts acquisition when i triggered pfi0(the triggering start is what i want), but continuous acquisition is not what i want.
FiniteAcqTriggerStartAndRef_UI = this is mostly what i want, even though the Reference part is not what i wanted, but i can just neglect pre-triggered data. there's 2 problem with this one, the data is not saved in a buffer, each trigger transfer the data to PC(i dont desire this), another problem it's a gui.
FiniteAcqTriggerStart.m = this is a coding (non gui) example. this probably is the key to solve most of my problem. unfortunately, it cannot be use.
the syntax to run the code is (i followed the guideline):
[data, time, initial_time, timed_out] = FiniteAcqTriggerStart ('dev2/ai0',-10,10,100,1000,'pfi0',0,10)
Warning: LabVIEW MEX-File Error - Parameter 1: Failed to load some
MEX-function DLLs installed by The MathWorks, Inc. MATLAB(R). These DLLs
include libmx.dll and libmex.dll. They should be installed when MATLAB(R) is
installed. Make sure they are in the system's path.
??? One or more output arguments not assigned during call to
"AcqTriggerStart_nonUI".
Error in ==> FiniteAcqTriggerStart at 146
[data, time, initial_time, code, source, status] =
AcqTriggerStart_nonUI(Physical_Channel, Minimum_Value, Maximum_Value,
Samples_per_Channel, Sample_Rate_Hz, Trigger_Source, Edge, Timeout);
the gui can run even though it also give the same warning.
Please help me, thank you in advance. Please also advice me how to do the buffering method that i want as i described above.
Thank you.
09-01-2010 10:13 AM
Hi miskoL,
unfortunatelly, I'm not able to answer your question, sorry.
I'd like to know one more thing. In the time between two TTL pulses (triggers) I'd like to perform some tasks in my labview code but until now I've not been able to detect the occurence of such a trigger. I've tried to use DAQmx property node with the Trigger class but couldn't find anything suitable for what I need.Of course, I don't want the tasks I perform between triggers to slow down the process of triggered acquisition. My TTL pulses have a frequency of 60Hz...
Any hint/help on this?
Thank you very much in advance!
Best regards.