07-04-2008 09:07 AM
07-08-2008 10:18 AM
Hi
I have just been looking at your code and I wondered how often do you get this delay and how big is the delay?
I have just run the code a few times on another M-series DAQ card (the PCI-6289) as I do not have a 6211 available and I have not seen any delay yet.
There is also an example in the NI example finder that you can try. If you go to Help>>Find Examples, this will bring up the example finder. Then navigate to Hardware Input and Output>>DAQmx>>synchronization>>Multifunction>>Multi-function-Sync AI-AO.vi. This vi should be useful.
Regards
07-08-2008 11:20 AM - last edited on 01-03-2013 12:50 PM by JordanG
Hi,
I have solved the problem in order to synchronise the analog output and the analog input on my DAQ NI USB-6211 (see the Vi in the link at the end).
I can also answer to your question about my previous Vi versions (which were not working properly).
"How often do you get this delay and how big is the delay?" >>> If you run one of the two VIs continiously (Project_V14 with trigger no always correct.vi), sometimes a delay can appears, but I don't know why. The delay was quite considerable because it was not always the same : 0 or 0.002 or 0.004 seconds... And it was a problem for my application because I want to compare the analog Output signal and the Input signal with exactly the time.
In order to build my first VI, I have use the example of Labview : Output>>DAQmx>>synchronization>>Multifunction>>Multi-function-Sync AI-AO.vi.
That is why I did not understand why I had the problem... And why it was not working like this... However, it seems to work in the example (why).
In order to find the solution, I have watched the following tutorial on the NI website :
https://admin.na3.acrobat.com/_a56821929/p22277351/
It was very usefull and very interesting.
That allows me to solve my problem with the synchonisation by sharing the same sample clock for the ouput and the input task.
I have linked my VI which have now the synchonisation between the analog output and the input.
BUT I still have a problem... If you run the VI (Project_V15.vi), and if the CPU of your computer is busy at the same time (by running an other big application), if you run the VI continiously, we can have a small delay which appears one time (but it is in the extrem conditions)
So this is my VI which still have a small delay corresponding to the period of the sample rate of the signal (but it is constant, so it is ok)....
Sebastien