Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

synchron AI and AO with adjustable frequency

Hi, i´ve got a problem, any help is welcome.

 

I´m trying to create a continious (SinusVoltage) synchronized AI and AO with Labview 8.5.1. The Frequency should be adjustable and the phases of both signals should be compared during runtime.

I  tried it like shown in the posted vi, but its not really working. sorry if its a little bit confusing.

 

Program : LabView 8.5.1

Chassis : NI cDAQ 9172

AI : NI 9215

AO : NI9263

 

thanks, Andi

Message Edited by andinew on 07-22-2009 06:23 AM
0 Kudos
Message 1 of 5
(3,737 Views)

Hey Andi,

 

To synchronize AI and AO you will need to share the timebase. You also mentioned that you want to have a adjustable frequency. 

I assume you don't want to change the sample clocks timebase and that you just want to adjust the frequency of the generated sinewave.

In that case you simply need to synchronize AI with AO in sharing the timebase (see example Multi-Function-Synch AI-AO.vi) and set the output frequency via the corresponding property node (see example Cont Gen Voltage Wfm-Int Clk-Variable Rate.vi). You will find theese examples using the LabVIEW Example Finder.

 

If this is not the case and you want to change the sample clock, you will need to use a Counter Task generating the Sample Clock. Because you are using cDAQ you will need an extra DIO Module to make an external connection to share the timebase to the AI and AO module.

 

Hope this helps,

Christian

0 Kudos
Message 2 of 5
(3,713 Views)
Thanks Christian, I will try it out and post my results as soon as i get some
0 Kudos
Message 3 of 5
(3,691 Views)

Ah, ok i already tried that, but couldnt get it to work. I put both, writing and reading in one while loop and synchronized both before the loop like in the examples you mentioned. i also used an external onboard clock to synchronize them, but i always got changing phase differences.

 

Could be, the problem is, im comparing the signal before writing. How could i extract the waveform after the writing vi?

Another thing is, someone mentioned 2 while loops connected with each other, but he didnt told me, what he meant exactly. Do you have an idea, what he meant?

 

Could you please explain to me, if its important to change the sample clock with the frequency? Im new to LabView and couldnt find any good explanation for that.

mfg, Andi
0 Kudos
Message 4 of 5
(3,687 Views)
Please, is someone here who can help me ??
0 Kudos
Message 5 of 5
(3,657 Views)