Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate signal and receive that signal in phase but acquiring and generating at different rate

Hi,

 

I want to generate 300Hz sine wave using 10,000Hz generation rate and receive that signal with the same DAQ card at acquiring rate at 50,000Hz.

Can it be done and do the receive signal still in phase with generated signal?

 

Note: My DAQ card support 10kS/s for generating rate and acquiring rate at 250kS/s

 

 

 

 

0 Kudos
Message 1 of 13
(4,168 Views)

Hi again yusof,

 

Yes it can be done, you just need to have each task generate its own independent sample clock.  Synchronize them with a Start Trigger (see the shipping example Multi-Function-Synch AI-AO).  You can open the Example Finder from LabVIEW in the Help menu.

 

One other thing... since you can't exactly pre-define define an integer number of 300 Hz periods with a 10 kHz clock, I would consider using non-regeneration on the AO task.

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 13
(4,164 Views)

 

Hi again John,

 

I've looked at the shipping example Multi-Function-Synch AI-AO. 

 

I made some modification to put non-regeneration on the AO task like figure below.

 

 

 

Multi-Function-Synch AI-AO with Non-regenaration.JPG

 

Is this the right way to do it?

 

Thanks for your great cooperation

0 Kudos
Message 3 of 13
(4,148 Views)

Not quite--if you have non-regeneration enabled you'll need to continuously write data inside the loop.

 

Try starting with the non-regeneration example that I posted earlier.  The Simulate Signal VI keeps track of the phase of your waveform, so on each loop iteration it will pick up where it has left off in the generation.

 


Best Regards,

John Passiak
0 Kudos
Message 4 of 13
(4,126 Views)

I try to trace the phase delay using this Multi-Function-Synch AI-AO VI. I used the Extract Single Tone Information component to detect the phase. The delay is quite high at  -51 degree to -70 degree between the AO and AI but when I'm using time clock sharing synchronization instead of trigger method, the phase delay only in mili degree.

 

Why is that happen?

0 Kudos
Message 5 of 13
(4,037 Views)

Can you post your VIs with default parameters set to what you were using during the testing? 

 

Also, can you confirm that you're using a 6024E?  It's the only board I can think of offhand that fits the sample rate specs that you mentioned earlier.

 

 

Best Regards,

John Passiak
0 Kudos
Message 6 of 13
(4,008 Views)

Here the pic that confirm I'm using the PCI6024E

 

PCI6024E.JPG

 

and here the pic of default parameters that I set.

AIAO start trigger.JPG

 

My target system:

 

Generate frequency around 200-400 Hz sine wave and receive the signal at sampling rate 50kHz. Untill now, I'm not so sure what number of samples I need to set for both transmitter and receiver in order to have a good sine wave signal at the intended frequency. I try to set several number of samples but still don't get it.

0 Kudos
Message 7 of 13
(3,990 Views)

I'd like to see the actual VI, you can attach it to a post using the "Attachments" section.

 

 

Best Regards,

John Passiak
0 Kudos
Message 8 of 13
(3,973 Views)

Here I attached the actual VI

0 Kudos
Message 9 of 13
(3,960 Views)

With the parameters you have set, your AO signal actually looks something like this when zoomed in:

 

    2011-01-06_183111.png

 

This is because you are trying to generate a 200 Hz signal with only a 1 kHz update rate.  If you increase the update rate the phase offset will be much lower.

 

 

You'll notice that the first sample acquired is actually the previous sample of AO.  If you don't want this, you would need time to allow time for AO to settle if you want to sample the current voltage update rather than the previous voltage.

 

However, this isn't actually all that relevant.  The way you are currently measuring phase, you will be be off by half of an output period even accounting for settling time.  Looking at the above graph, you can see that the best-fit sine wave would have a phase of 0 about halfway between AO updates.  With the numbers from your screenshot, this works out to be 1/10th of the period of your signal, or 36 degrees.

 

 

Maybe we should take a step back and figure out what you are really trying to do.  I don't understand the purpose of measuring the "phase" of an undersampled sine wave in this manner.

 

 

 

Best Regards,

John Passiak
0 Kudos
Message 10 of 13
(3,936 Views)