04-10-2006 10:35 PM
Hi Stefo,
NIDAQ is very helpful. I believe you can setup arbitrarily large buffers - which NIDAQ maintains in the PCs RAM (through DMA transfers between the MIO16s memory and RAM.) But you're still responsible for emptying the buffer fast enough. It sounds like the rates you need to acquire at are pretty low so this shouldn't be a problem but one thing to consider is how much memory is on the MIO16, and how fast NIDAQ will need to unload it. If your program demands the PCs memory bus for too long (while you empty the buffer) NIDAQ can run out of memory on the MIO16 and throw an error.
I agree with Steven, your board should be capable of acquiring two channels at 50KHz "without breaking a sweat." Whether your PC has enough horsepower to service the buffer is another question. I'd try setting-up 5-seconds worth of buffer, and unload 25Kscans every 1/2 second.(assuming scan-rate = 50KHz.)
There ought to be lots of great cont-acquisition examples - pick one and let us know what happens.![]()
Cheers.
04-14-2006 01:17 AM
Ok, I will paste an example what I need to realize. I hope that now it will be clearly.
I want to ask too, how can i realize triggered data acquisition after rising edge is detected on TRIG1 or TRIG2 (both should be use - trigger function like TRIG1 v TRIG2), but i need to know, which TRIG occurred too. Example will be the most useful.
Thanks,
Martin
04-14-2006 01:24 AM
Sorry, i forgot paste the file ![]()
04-14-2006 08:15 AM
04-14-2006 03:28 PM
Hi Steven,
Do you think there's any possibility of using the counters in implementing an either/or trigger? I seem to remember** some trigger possibilities using counters and gates. Of course, these would be TTL-level inputs...
**my memory is very poor!
04-14-2006 03:50 PM
Dynamik,
The counter is the only task that is truely retriggerable. This can be used to generate a clock to make pseudo retriggerable analog input. The only other way, that I know of, to do multiple start triggers is to rout the signals into a digital board that can do change detection and generate a single pulse for each trigger to the MIO Board to use as a trigger.
Maybe you could elaborate on how you think it would work.
Steven T
04-14-2006 04:33 PM - edited 04-14-2006 04:33 PM
Hi Steven,
I think Stefo's goal [at this point] is not multiple triggers, but one trigger based on either of two inputs.
IF he had an external OR, he could tie Trig0 and Trig1 to the external ORs inputs, and use the output to trigger MIO16 simply. Of course it would be nice to accomplish the same triggering without external hardware - using the resources available on the MIO 16. Hence the counters idea. If I knew specifically how to do this, I wouldn't have asked you! But I'll give a for-instance: IF the MIO16 counters could be configured to output a pulse when Either of two gate inputs went high, then that counter-output could be used as an input for a DAQ trigger - effectively implementing the OR described above. I think this technique (if achievable) would introduce a trigger latency of, like, 50ns - probably negligible in this case. ![]()
If the trigger-lines are also Analog INs, then, as you said, once the DAQ is triggered, Stefo could determine which occurred first by examining the analog data.
(?)
@steven T wrote:
Dynamik,
The counter is the only task that is truely retriggerable. This can be used to generate a clock to make pseudo retriggerable analog input. The only other way, that I know of, to do multiple start triggers is to rout the signals into a digital board that can do change detection and generate a single pulse for each trigger to the MIO Board to use as a trigger.
Maybe you could elaborate on how you think it would work.
Steven T
Message Edited by Dynamik on 04-14-2006 04:34 PM
Message Edited by Dynamik on 04-14-2006 04:36 PM
04-17-2006 05:24 PM
Hi Dynamik,
Thank you for the input and suggestions. However, in order to trigger off of multiple sources, you need to use a board which supports change detection: Which NI DIO Devices Support Change Detection? This way, whenever one of the lines changed state, the acquisition could be triggered. Unfortunately, the PCI-MIO-16E-1 does not support this feature so Stefo could not add this into his program directly. However, he could use external circuitry such as an "or" or an "xor" circuit to incorporate this functionality into program.
Regards,
Hal L.
04-17-2006 10:52 PM - edited 04-17-2006 10:52 PM
Hi Hal,
The idea is that CTR 1 OUT would be the input to the DAQ Trigger. No need for multi-channel "edge detection".
Lets say counters 0 and 1 are chained 0 OUT to 1 SRC. It seems possible for either of two GATE inputs to disable a pulse-train, but can the sources/gates be configured so CTR 1 OUT produces an edge or edges when either of Stefo's "Trig1" or "Trig2" transitions low-to-high?
Hey, I admit an old/poor working-knowledge of counters, and a fool (consistently 1st-place) can ask more questions than a wise applications-engineer can answer - but is this really a foolish question? ![]()
Message Edited by Dynamik on 04-17-2006 10:52 PM
04-19-2006 02:23 AM
You can select any analog input channel to drive the PGIA. The PGIA amplifies the signal as determined by the input mode and the input polarity and range. The output of the PGIA then drives the analog trigger detection circuit. By using the PGIA, you can trigger on very small voltage changes in the input signal.
When the DAQ device is waiting for an analog trigger with a AI channel as the source, the AI muxes should not route different AI channels to the PGIA. If a different channel is routed to the PGIA, the trigger condition on the desired channel could be missed. The other channels could also generate false triggers.