Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure time between two analog signals

Hello All,
 
I am using cDAQ-9172 & MSVC++ for my setup.
AI: NI 9215
AO: NI 9263
DIO: NI 9401
 
I tried some counter examples and it gave me an understanding of how an input and output counter works, in general.  But I'm still quite lost on how to apply the two-signal edge separation to time measurement between AI & AO from the MultiFunctionSyncAIAO_DigStart example.  I am not even sure if this is the right approach.
 
From this example, I want to measure the time between the output channel start generation and the input channel acquisition.  As a summary, I want to measure the time for the targeted test module to respond to certain input. 
 
I prefer hardware time measurement than using Microsoft timer or similar function.
 
Any ideas???
 
Thanks a bunch,
A
0 Kudos
Message 1 of 3
(3,002 Views)
Hi angelmcdoggie, welcome back 🙂

I'm a bit confused what you want to measure. From your description, I can see two different measurements. First, I read that you want to measure the difference in start times of the synchronized AI and AO tasks ("the time between the output channel start generation and the input channel acquisition"). Second, I read that you want to measure how long it takes AI to reach AO ("the time for the targeted test module to respond to certain input"). In other words, if you send a pulse into AI, how long will it take for it to reach AO.

I think you want to measure the first from your other thread [1]. If you're using the same start trigger for both tasks, they will start at the same time since the hardware paths are routed to do so. If you also use the same sample clock, then samples will be taken/output at the same time as well [2]. You're welcome to measure the difference in start times, but I don't think you'll need to. Counters do provide some great flexibility to analog tasks, and there some fairly interesting measurements you can make when you combine them [3].

[1] synchronized ai ao
http://forums.ni.com/ni/board/message?board.id=250&message.id=39350#M39350

[2] Simultaneous Analog Input and Output
http://zone.ni.com/devzone/cda/tut/p/id/2903

[3] Using Counters with Analog I/O
http://zone.ni.com/devzone/cda/tut/p/id/4524
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 2 of 3
(2,986 Views)
Hello Joe F,
 
Sorry for the confusion  Smiley Wink.  I only meant one thing, I want to measure the time for the targeted test module to respond to a certain input. 
I will read through these materials and feedback what will I come up to. 
 
Thanks a bunch,
A
0 Kudos
Message 3 of 3
(2,983 Views)