Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I achieve precise Timing and Synchronization with labview and DAQmx using M series PXI-6251

My task is to measure the time for a Unit-Under-Test to respond to an excitation by an analog signal generated from a Multifunction DAQ card (PXI-6251).  See attached sketches.  In TEST1 the response is a digital level change and TEST2 its an analog response.

 

I need to use the timing and synch features of the hardware to achive this accurately - some tests require resolution of 10us.  I have achieved this measurenment (TEST1) to a certain extent but there is an inherent error of approx 120us which I suspect is due to NOT simultaneously reading/sampling the DI chan the instant the analogue excitation starts. See attached VI based on NI Example.

 

For the simulation I am using to validate my code, I am sending a digital pulse 'response' of pulse width 1ms (through a triggered signal source) 3ms after the analog signal is generated.  However I read back approx 3.122ms (varies slightly with every run).  See indicator "RespTime 1" in VI.  The pulse width is accurately measured.  When I send the digital 'response' pulse after 300ms, I measure 300.122ms showing a fairly constant error.  Pulse width is always accurated measured.

 

I am having trouble altering the code to utilise a triggering function.  Please advise or suggest alternative approach. Note: I am using a 20MHz timebase (50ns resolution) and detecting signal peak changes which I use to calculate the response time.  I am not using counters since the DAQ cards' counters are already in use for other tests.

 

 

Many thanks in advance

 

Kenoss

0 Kudos
Message 1 of 2
(3,600 Views)

Hello Kenoss,

 

I have looked into your post and the attached VI with PDF diagram.  I have managed to get your VI running on my computer.  As I understand, you are having an issue with synchronizing your Digital Input with your Analog Output.  From looking at the block diagram, I believe that you should be using a DAQmx Timing Property Node, and synchronizing your input with the Internal Digital Start Trigger of your Analog Output. 

 

Furthermore, you have also mentioned that 'Test 2' will involve Analog Input.  Looking at your VI, it looks like that is a step you will be including next, as at the moment you are performing no Analog Input.

 

An example of synchronizing Analog Output and Input using the Internal Start Trigger is available within LabVIEW. 

In LabVIEW 8.6, on the Main Menu, please navigate to the 'Help' menu -> 'Find Examples' -> 'Browse' Tab.

Please browse to 'Hardware Input and Output' -> 'DAQmx' -> 'Multi-Function' -> 'Multi-Function-Synch AI-AO.vi'. 

 

Please try using this example and extend it to your application, and reply with how it goes.  Please also confirm your version of LabVIEW and Operating System.

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 2 of 2
(3,576 Views)