Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Waiting before analog input

Solved!
Go to solution

Hello, I have a NI 9263 that outputs an analog signal (long story short) to a sample and a NI 9401 that inputs the response of the sample. I need to wait 10 ms (with precision) after the completion of the writing data before acquiring the data. I don't know how to do this.

 

I present the two unsuccessful trials:

 

1- In "Wait_before_reading_instantaneous" I simply wire the error of the stop task of the write channel to the read DAQmx, which forces the analog input to wait for the analog output. But I don't know how to control the time.

 

2- In "Wait_before_reading_10milisecond" I wait 10 ms in a flat sequence frame. However the real time that passes from frame to frame in Labview is way larger than this 10 ms: I have an uncertainty of +-20ms and a minimum threshold of approx.150 ms (checked with an oscilloscope.)

 

I think the solution is around the 1- approach.  I thank in advance for the help.

 

 

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

With Windows, you are not going to get a precise timing.  If you really need this as accurate as possible, I would get a cRIO and program this up in the FPGA.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(3,748 Views)
Solution
Accepted by rpicazof

Hi,

 

I agree with crossrulz on the account that Windows does not support exact timing so you need a Real-Time or even FPGA device (like cRIOs) to accomplish that task.

In your scenario I was wondering if you could just start both generation and acquisition at the same time and just throw away a certain number of samples on the acquisition. Since you probably know the number of analog output samples and the generation sample rate, you could calculate the number of samples of the acquisition task that have to be removed.

Just start both tasks with a digital start trigger and you can be sure that both task run simultaneously.

Would taht work for you?

Best regards,
Christoph

 

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
Message 3 of 4
(3,721 Views)

Dear Christroph, 

 

I think your conceptually easy idea might just do the trick! Right now I am only connecting the error wires, however I don't know how to measure the deviation from "instantaneous" that this yields, if some time passes I need to know this to subtract the correct number of samples. Maybe this Digital Trigger can help me, I'll have to research it, currently I don't know about it.

 

Thank you deeply,

Román

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