LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview capacitor ESR with sound card and DMM

Hello,

 

I bought som low priced capacitors from china (ebay). I have a little old but fine multimeter Kethley 196 DMM, Iam very begginer of labview. I decided that measuring serial resistance of these capacitors with sound card and DMM could be a very good excercise.

 

First I developed in labview function generator with sound card capable to generate sinusoid signal about 20 Hz - 20 kHz. The program gradually increases frequency from 0 Hz to 22050 Hz in choosed steps (usually 10Hz) in while loop. After this I connected my Kethley multimeter and I put reading voltage values into while loop. But at this point I ran into a problem:

 

In the while loop when I read values from multimeter (is little slow) the program stops generating sinus signal from sound card and it mess up the measurement. When I connecting speaker to the sound card I hear quenched pipipipipipii sound instead of piiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii. Wihtout reading from multimeter is evrything is fine and the sound (of sinus) is constanty piiiiiiiiiiiiiiiiii.

 

Can anybody help me how can I solve this problem? Thank You.

Also the program logs the data into a file but now it isnt important. I attach .vi file from project and driver for multimeter.

Download All
0 Kudos
Message 1 of 7
(3,746 Views)

If I understand your problem correctly it could be that your multimeter input impedance is too low and you are loading the circuit down.

Glad to answer questions. Thanks for any KUDOS or marked solutions 😉
0 Kudos
Message 2 of 7
(3,734 Views)

No..

 

The problem is: when the while cycle reads from VISA port (Keythley 196 DMM) its not doing anything else (maybe its only waiting), and not generating sine signal from soundcard.

 

Like this in pseude code (very simplified):

while{

generate_sine_signal;        //there is signal from soudcard

read_from_multimeter;         //no signal from soundcard, maybe ist only waiting

save_to_log_file;

}

 

Because of this from speakers (when I connect speakers) I hear bibibibibibibibib, Istead of biiiiiiiiiiiiiiii.

 

I need to modify sound.vi to no stop generating sine signal when the while cycle reads VISA port.

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

Hi Woodwax,

 

I was taking a look at your code, and I think it might be worth using parallel loops - one that controls the wave generation and output, and another to control the VISA communication.  This may resolve the issue for you.

 

I would also highly suggest that you take a look through the examples that ship with LabVIEW (if you haven't already).  To get to them, go to Help > Find Examples.  

 

Regards,

 

G-IV

0 Kudos
Message 4 of 7
(3,656 Views)

Hello

 

Thank you for the aswer, this is a good idea, tomorrow I try it.

0 Kudos
Message 5 of 7
(3,642 Views)

I trying to paralize into two while loops. But now its executing only while loop 2 (see sound.vi).

 

while loop 1 is going after stopping while loop 2.

 

Where is the problem how can I paralize these two loops?

0 Kudos
Message 6 of 7
(3,620 Views)

Hi Woowax,

 

This is an issue with data flow and code execution.  To understand what is going on here, I suggest you study our LabVIEW basics tutorials that you can access online.  

 

Introduction to LabVIEW (I have this set to open in a new page)

 

For a tutorial that specifically addresses this, I suggest watching our Graphical Programming tutorial videos, while keeping in mind how the While Loop 2 in the Sound VI has an output running into While Loop 1.  

 

For passing data between while loops, it would be worth taking the time to study up on Queues.  The first link I think you should look at is: What Is a Queue? - A broad overview of what a queue is.  The second link I would suggest taking a looking at is an example of a pair of while loops running in parallel that are using a queue to pass data from one loop to another: Using Variants to Pass Multiple Data Types Through a Single Queue (I have this link set up to open in a new page).

 

Also, I cannot stress enough how helpful the examples that ship with LabVIEW can be - especially when you are first starting out.  Here is a link that shows how to access those examples: Finding Examples for LabVIEW (I have this link set up to open in a new page).

 

Regards,

 

G-IV

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