Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How quickly can I get to know that trigger occured

I'll need to synchronize the start of my measurement that uses DAQ card (one channel acquired) with reading from another device connected via RS232.


The Analog DAQ will be started by a TTL trigger. No problem here. I need to know now how quickly will the status of the digital line reflect the trigger occurence so I could start saving the data coming over the rs232. To rephrase it: if the trigger happens how quickly will the driver be capable of returning this information in LabVIEW?

Can I get the information about the trigger occurence in less than 0.1 sec?
LV 2011, Win7
0 Kudos
Message 1 of 8
(3,803 Views)

Hello,

 

The delay from the trigger depends of the type of board that you have.

However, it shouldn't be more than 2-3 ticks of AI baseclock.

 

On the next link you can read more information about it:

http://digital.ni.com/public.nsf/allkb/4F5347018DBA372B862575210051EF1D

 

Kind regards,

Ion Rosca

0 Kudos
Message 2 of 8
(3,792 Views)

Hi Ion, thanks for the answer but this is not what I asked. My question is how quickly will the driver will be able to report the status of the line!

LV 2011, Win7
0 Kudos
Message 3 of 8
(3,790 Views)

Dear Ceties,

 

Than I don't understand your question. What do you mean when will it report?

 

Basically if it takes 3 ticks to acquire the first sample, that means in 3 ticks, driver send the acknowledgement that there is a trigger and also the AD makes the conversion from analog to digital .

So I guess if your goal si 0.1 s, for sure it is achieved.

 

Kind regads,

Ion R.

0 Kudos
Message 4 of 8
(3,788 Views)

What is in the article is what happens on the hardware level. My interest is in NI USB-4431. I don't know what its AI Timebase clock is but lets assume that it is 10MS (the oscillator frequency). Then you would expect to get the status of the line in 3*1/10M=0.3us. What I need to know is when NiDAQmx will be able to report (to LabVIEW) that the trigger already happened. No way that it could be in range of microseconds given the USB speed, the driver under-the-hood-operations and Windows itself will add some overhead.

 

I hope I am clear now

Either way thanks for your insight

LV 2011, Win7
0 Kudos
Message 5 of 8
(3,785 Views)

I cannot answer your question, but I do understand what you are asking.

 

The OS latencies are the major issue. The OS handles the USB and the RS-232 communications and passes the results to LV.  If those are handled in different threads and different OS tasks, which seems likely, you could see latencies on the order of 10s of milliseconds.  Further, it is likely that the latencies will not always be the same.

 

Is there any way that you could create a common signal which is measured by both devices?  I have found that to be an effective way to synchronize data sets in cases like yours where the instruments themselves are not reliably synchronized.

 

Lynn

0 Kudos
Message 6 of 8
(3,774 Views)

Thanks Lynn. If it is less than 100msec I should be fine even if it is different each time. We will do some testing with reference signal and I will post here how we ended up. I just needed to know the range to know if I should consider some backup plan.

LV 2011, Win7
0 Kudos
Message 7 of 8
(3,765 Views)

Hi I have one additional question. What is the fastest way to check if trigger occured. Right now the only way I can think of is to poll the number of samples acquired on the AI channel (that is triggered). Is there any faster way?

LV 2011, Win7
0 Kudos
Message 8 of 8
(3,749 Views)