Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronized ai ao

Hi,

I got a problem with a synchronized AI and AO task with a NI USB 6211. I want to output a simple sine waveform on AO and want to get this signal back on AI. In addition I'd like to change the frequency and amplitude of the sine signal during execution. I managed it to get a signal out and back in, but I don't think it's synchronized, although the sample Clock got the same rate... I searched for some examples. But I haven't found any synchronous exmaples, where you can change parameters during execution.
How can I synchronize the Input and Output with a trigger or something else? Thanks for your help in advance.

Cheers Carsten

Attached VI is written in 8.2





0 Kudos
Message 1 of 7
(3,990 Views)
Hello there,
 
I am not a labview user,  but I can refer you to a MSVC++ example:  MultiFunctionSyncAIAO_DigStart.  Check the labview counterpart of this example.  It is located in ...\Synchronization\MultiFunction\SyncAIAO_DigStart.  This program is very close or the same to what you have described.
 
Regards,
A
0 Kudos
Message 2 of 7
(3,952 Views)
Last week we tried to do continuous acquisition in combination with time-stamping. For our seismological application, we need to know the time at which an event (= earhquake/seismic wave) arrived at our sensor. For this we have a PCI GPS-card.

An easy implementation would be to start a scan of all channels at a trigger of the GPS-card at 100 Hz (our prefered sample-rate), but the GPS-card does not support this. However, it can take a timestamp given an external trigger.

So the idea is to do simultaneous AI and AO and use the AO to trigger the time-stamp-capture of the GPS-card.

So much for the introduction. We have been looking at how synchronous the AI and AO actually is. We generate a signal using the AO and feed it into the AI. First we tried starting the AI, then starting the AO. This gives a delay of about 0.25 msec between the signals.
First starting the AO and then the AI gives a delay of about 40 msec!! (this last sequence is recommend by NI)
This was not acceptable.
(Before I forget, we use NIDaqBase on a Linux workstation and the M-series 6225, sampling at 100 kHz )

starting the AI and AO tasks via an external trigger gave exact synchrone starts of acquisition. So this is probably the solution that you need.

What we saw however was that the AO and the AI use a different convert-trigger! (I would like to have a comment on this by an NI-engineer!)
every now and then, it seems that the AI trigger frequency speeds up, and then the frequenct AND phase!! of the two triggers become synchome again! This happens 4 times in this (reproducable) 1000 samples test.

I have attached to images of the same data sequence. (appologies for the poor image quality) One in which the 4 events are visible and onother image, showing the frequency-speed-up and re-phasing in detail.

We look forward to any replies!

Tim

Download All
Message 3 of 7
(3,945 Views)
ok. first of all thanks for your help! But I can't find the Labview counterpart in my example folders... Is there a labview somewhere a labview counterpart?

What external trigger do you use? Do you use a counter from the NI box or is it another one?


Message Edited by cpinkle on 04-21-2008 04:48 AM
0 Kudos
Message 4 of 7
(3,942 Views)
I am not a Labview user, but I will attach my code. (which is simple test, so there are some parts which I comment in and out. So it is not so clean.) The comments in Dutch are more or less equivalent to my post above.

hope this helps,

kind regards
Tim
0 Kudos
Message 5 of 7
(3,934 Views)
Sorry, I replied too fast.
For this test, we used a function generator for the trigger at the PFI0.
We are considering to use the AO to trigger both the GPS timestamp AND the start of the AI. Or we may use a pulse generated by the GPS card for as trigger.

Tim
0 Kudos
Message 6 of 7
(3,930 Views)

Hey Tim_,

Coincidentally, I am working on the time between the AI and AO of the SyncAIAO program.  I just started, hence no concrete program yet.  So, I am still looking for ideas how to do that.  Anyway,  I'll note of the information you just mentioned if it is the same with the cDAQ-9172.

 

Thanks.

A

0 Kudos
Message 7 of 7
(3,926 Views)