Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6211 Problem of trigger for Analog Output and Analog Input synchronization

Hello,
 
I have a problem with the trigger in my Labview application for Analog Output and Analog Input synchronization.
 
I am using a new data acquisition card " NI USB-6211 " with Labview 8.20.
 
I would like to send one analog signal (Output 1) and to record one other analog signal (Input 1) in exactly the same time... So I have to use a trigger in order to make the synchronization.
 
For the moment, with my DAQ, I have connected the Output directly on my Input in order to see if the trigger was correct or not.
 
BUT it is not correct (sometimes yes and sometimes no).
 
I use a CSV file which contained a simple SINUS wavefrom for the OUTPUT in order to check everything (sample rate = 10000Hz).
 
In fact, with the following VI, sometimes it works and sometimes it doesn't work (no trigger, so no signal) :
 
See the file : Project_V14 with trigger but dont work all the time.vi
 
And I have change some things and with the new file, it  works always, but sometimes the acquisition signal is late compared to the output signal... and I don't know why (problem of trigger).
 
See the file : Project_V14 with trigger but dont work all the time.vi
 
If you need more precisions or other explications about my VI or the goal... do not hesitate.
 
Thank you very much for your help.
 
Sebastien
 
(see attached file please)
 
0 Kudos
Message 1 of 3
(4,413 Views)

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

Beejal S
NI UK & Ireland
0 Kudos
Message 2 of 3
(4,375 Views)
 

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



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