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.
Solved! Go to Solution.
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.
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?
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,