03-26-2012 03:41 AM
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.
03-27-2012 05:24 AM
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
03-27-2012 05:42 AM
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!
03-27-2012 05:46 AM
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.
03-27-2012 06:27 AM - edited 03-27-2012 06:30 AM
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
03-27-2012 10:33 PM
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
03-28-2012 05:31 AM
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.
04-11-2012 07:24 AM
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?