Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to immediately stop finite sampling and TTL signal?

Hello I am new to DAQ programming and I'm looking for the right direction upon which I should go.

My rig is PCI-6120 multisampling card + BNC connector and a brand new PC.

 

What I need from DAQ:

 

1. Simultaneous AI (finite) sampling of 4 channels using external clock source (up to 500kHz).

2. DAQ should be outputting TTL +5V while simultaneous sampling is acquiring.

3. Also DAQ should be comparing one of the AI signals if it reaches threshold for example 500mV it should immediately stop sending TTL signal and stop acquisition after that it should read out all the AI samples before the threshold was reached. (also if immediate stop is not possible it would be possible to send a stop trigger to my external electronics box and then stopping the TTL trigger and acquisition).

 

What I managed to do till now is to start Simultaneous AI (finite) sampling. And to form TTL +5V signal which also runs from the same external source as a finite sample array filled with "1".

But I don't know how to stop TTL signal and simultaneous AI sampling if one of AI signals reaches the threshold.

 

Could you point me to the right direction how should I approach this problem?

zzzz.png

 

 

0 Kudos
Message 1 of 4
(3,439 Views)

Kila,

As a starting point, you may want to look into using an analog reference trigger. I've included a link below which shows an overview of the different types of triggers we can use in LabVIEW.

 

Tips and Techniques in Data Acquisition Triggering - NI-DAQmx
http://www.ni.com/white-paper/4329/en/

 

0 Kudos
Message 2 of 4
(3,416 Views)

And how does this reference trigger work, because from your link I couldn't understand. Still I tried to implement reference trigger to my project and I think it didint helped me.

I simulated TTL signals for testing:

1. "Sample signals" always start when TTL signal from DAQ is provided.

2. "Reference trigger" this signal starts after 3 samples.

So as I understood after 3 samples when reference trigger is enabled it should read 2 post trigger samples and end the task. But with same strange magic it still reads all 8 samples.

2013-08-03 12.46.36.jpg

 

Same thing happens when I specify to acquire 100 finite samples and "Reference trigger" signal starts after 3 samples. Why does it still reads all those samples after trigger?

zzzz.png

zz.png

0 Kudos
Message 3 of 4
(3,404 Views)

Can you give me some more information about your specific application and your timing requirements. Additionally, here is a link to an example which uses reference triggers.

 

NI-DAQmx: Continuous Digital Acquire with Start and Stop Triggers
http://zone.ni.com/devzone/cda/epd/p/id/5016

0 Kudos
Message 4 of 4
(3,369 Views)