LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sound card acquisition

Hi,

I am using my sound card to aquire a modulated waveform from a VCO. My goal is to measure the frequency of the waveform at each 5ms (the frequency is suppose to be constant for 4ms). I used stereo mode to have 2 channel of acquisition: channel 1 for triggering and channel 2 the modulated waveform. But it's not working properly. I don't know why, the 2 channels display the same waveform and I am always detecting a trigger signal. For a better understanding, I have attached my .vi and a .jpg file to show the time domain signal.

Thank you for your help

Francois

Download All
0 Kudos
Message 1 of 6
(3,850 Views)

One thing that I noticed about the VI is that you have your trigger VI with no value for the trigger level. Is this what you intended? Another thing to keep in mind is that the values that you are retrieving are dependant of the sound card driver that you are using. Do you know the values that you are retrieving, and do they resemble the wave in the pic you posted. If this is true then you need to set the trigger level appropriate to the level of the signal you are getting in. Let us know the info and if you are still have trouble I can try to help you the best I can. Good Luck!

Tyler H.

National Instruments

0 Kudos
Message 2 of 6
(3,826 Views)
Hi Tyler,

You are right, I forgot the trigger level!!! But I have try my programm and it's still impossible to get 2 channel at the same time??? I can see the 2 signals at the end of the stereo plug (center and end) with a scope. I've tried to see if it was my sound card by trying my program with another sound card....It was the same,  I can't see the center signal (Trigger or waveform depend of the wiring) with both sound card. Another problem, Even if I use only one signal (mono), The frequency are always the same frequency (fc on the picture) Do you think it's because the loop is too fast (4ms)?

Thank you for your help

Francois

0 Kudos
Message 3 of 6
(3,823 Views)

hi there

the two loops are not synchronized, so the data in "signal" may not be consistent with "trigger". i'd suggest to place the code of the analysis loop inside the DAQ-loop or to implement  some kind of synchronisation.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 4 of 6
(3,817 Views)
Have you tried to look at the signals that are bing returned from the sound acquire. That way you can see the two independant signals, before triggering. This is something that you should consider doing, before trying any sort of post acquistion triggering. Let me know what the signals look like and I can help. Thanks
 
Tyler H.
National Instruments
0 Kudos
Message 5 of 6
(3,806 Views)
HI Tyler,
 
As I said to you, the output of acquire sound is the same (for both channel) even if each channel is different at the stereo plug. I have tried my vi with 3 differents sound cards and it is always the same.  The center signal of the stereo plug do not appear at any channel output of the vi acquire sound. In other words, if I plug the trigger signal through the center part of the stereo plug, I can see this signal. I've attached a figure to explain (Sorry for my english)
 
Francois
0 Kudos
Message 6 of 6
(3,796 Views)