Soundcard Help

  • Thread starter Labview project
  • Start date
L

Thread Starter

Labview project

We are doing a project involving instrumentation with the help of Labview.

We need help with acquiring data such as voltage, temperature, light (for the purpose of measurement), through the sound card. Does anybody know how to do it?
 
W
Check out the Labview Developer Zone at http://www.ni.com/

You might want to try something other than the soundcard of your PC, though.

NI makes some decent data acquisition cards for PCs, both desktop and laptop type, and a single DAQ card shouldn't be too expensive. I suspect you all are students, right?

You can also use a Lego Mindstorms NXT system to get that stuff into Labview, since Labview is the software behind the robots.

Good luck,

Walt Boyes
Editor in Chief
Control magazine
www.controlglobal.com
blog:Sound OFF!! http://www.controlglobal.com/soundoff
_________________

Putman Media Inc.
555 W. Pierce Rd. Suite 301
Itasca, IL 60143
630-467-1301 x368
[email protected]
 
T

Thong Phat Co., Ltd.

Hi,

I do not think sound card is suitable for this application: it is very hard to calibrate, poor repeatable, static DC signal may not input into the sound card due to capacitor filter, etc.

Regards,

Hung
 
R

Robert Scott

I agree with Walt that you should not use a soundcard. Another reason is that soundcards are, well, for sound - not DC signals. They would be very bad at conveying temperature, which is slow moving. You would first have to frequency or amplitude modulate a carrier that can pass through the soundcard in order to convey DC signals. Then there is the problem that a soundcard is 1 or 2 channels (if stereo). You wanted more. A real DAQ card will give you at least 8 and maybe 16 or more channels from DC up to the sampling rate of the card.

Robert Scott
Real-Time Specialties
Embedded Systems Consulting
 
L

LabVIEW project

Thank you all.

I know the DAQ cards would perhaps be more helpful for acquiring voltage, temperature, etc. However our Project Guide insists we use a sound card as it has an inbuilt A/D converter.

Our basic project involves giving an AC voltage input to the sound card and processing the same in Labview. We need more help in the same, sya how much voltage input can be given to the Line in terminal etc

We hope you can help us. Thank you
 
W
Well, not having the specs for the sound card, we are not going to be able
to tell you what voltage max you can use. You need to dig and find the
soundcard's documentation. This will give you practice finding the lost
manuals when you get out into the real world of plant automation (grin).

Walt Boyes
Editor in Chief
Control magazine
www.controlglobal.com
blog:Sound OFF!! http://www.controlglobal.com/soundoff
_________________

Putman Media Inc.
555 W. Pierce Rd. Suite 301
Itasca, IL 60143
630-467-1301 x368
[email protected]
 
C

Curt Wuollet

It isn't often I agree with Walt, but sound cards tend to be the most complex, almost totally undocumented entity sold in the millions.

Using one for purposes other than audio is still a valuable exercise in demonstrating that A/D conversion, sampling, filtering and the related concepts must be well understood before your readings really mean anything. Especially as you are pondering what 5.1 surround with Carnegie Hall simulation and synthesized reverb does for your waveforms and readings :^).

Regards
cww
 
L

LabVIEW Project

Dear Sir,

Thank you for your help. We have settled down to using the DAQ card finally. We inserted the card in the PCI slot of the computer. Also installed the software via CD. The problem is when the PC starts up it detects the hardware but in trying to install it completely the PC restarts and the next time again it goes to the 'install new hardware' window. Due to this each time the hardware does not get installed. We have tried many times. The PC was just formatted the previous day so chances of virus are hardly there. We are unable to figure out why the PC restarts everytime during installation. Can you suggest possible reasons?

Thank you.
 
M

Michael Griffin

The hardware is installed (plugged in). I think you are trying to tell us you are having problems trying to install the driver for the board. You said you are using Labview.

Check to see if there is a newer version of the driver available from the board vendor. Is the version of MS-Windows you have compatible with the driver you are using (or have available)? You might have to install a different version of MS-Windows (look at the "service pack" number, not just the major version number). Newer versions of MS-Windows have a lot of compatibility problems with data acquisition systems.
 
L

LabVIEW project

Respected Sir,

We have used the advantech card in LabVIEW. Currently we have made use of the TDM file format. I read about this from the two pages 'Introduction to LabVIEW Data Storage vi's' and 'LabVIEW data storage vi's Application Exercise' from ni.com. We have used the storage vi's namely open, write, read and close. I have some questions regarding the same:

1. We are able to write the file but in reading the file the graph shows all the accumulated values so it's like the graph goes on getting compressed as the values accumulate. How can it be possible to change this format? We want the values to appear steadily showing the time below (not the absolute time). Is this possible?

2. If we try to write the file for, say, 10 seconds and read it after that, the graph does not show anything. Why does this happen? This is important to us as we might require to reuse the data after long intervals of time.

3. What is the difference between using this TDM file format and using NI signal express? which one will be suitable for us? We require to store data like voltage, temperature data etc and use it again.

Thanking you,
Abhilasha Kamath
 
M

Michael Griffin

The Labview TDM file is a header file in XML format. The actual data is in a separate the binary data. The TDM file just defines the data format. Have you defined the format correctly, and are you using the correct XML file? Have a look at this explanation: http://zone.ni.com/devzone/cda/tut/p/id/3542

For details on how the NI software works, I would suggest reading up on it using the information on the NI web site. It is not really possible for me to answer such open ended questions in an e-mail.

As for TDM versus Signal Express, one is a file format while the other is a software package. They are not really comparable. If you wish to compare Signal Express to anything, you should be comparing it to LabView. Signal Express is intended to be interactive software, while LabView is programmable.

I don't know your application in detail or the environment you are trying to use it in. My own experience has been that software such as LabView works fine provided that what you are trying to do is a close fit to the way that software wants to work. Fairly often you have to adapt your objectives to the capability of that software. It sometimes takes some very convoluted logic to get LabView to do something it wasn't meant to. I have had better luck writing test applications in C, Basic, or Python because then I can make the application do exactly what is required without any compromises. However, the applications that I have written were required to run 24 hours a day year after year on production lines, so any extra effort was justified by the efficiency gains.

When it comes to automatically logging production test data for long term storage, I usually prefer to use an ASCII CSV (comma separated value) format. I start a new file every hour or every few hours, and include the time stamp as part of the file name in order to generate the file name. This way we know that the data can be easily imported into just about any spreadsheet or database (or even summarised using AWK scripts) years later. If however you are just doing some lab tests and wish to analyse the data off-line before discarding it, then long term readability may not be a consideration.

Normally, in a continuous test displaying a graph and logging the data are two different things. One copy of the data point or data set goes to the graph, while the other copy goes to the log. If the graph is a strip chart, then you need to add data to the right hand side while discarding it from the left (a strip chart control can normally do this automatically). If the graph is just a data set displayed after the test is done, then you need to reset (erase) the graph before displaying the new data set.

I don't know if the above is of any help to you, but this is the best I can do with what you have told us.
 
Top