Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Load Mic (or Spkr) Cal File
This button is only enabled for lines with calibrated attenuators.
Click this button to load a calibration file for the current User Line. The standard Windows Open dialog will appear, showing the available .CAL files. You may use the file type selector drop-down control to show all available .FRD files. When you have selected a file, this button will be shown depressed and the button label will change to the name of the file.
To remove the .CAL or .FRD file assignment for the line, either so you can replace it with another or to allow use of the Units/Volt and Units name controls, click on the filename button. You will be prompted to confirm removal. This won't affect the file itself; it will just be unloaded so it no longer applies to this line.
When no file is loaded, the button will be labeled 'Load Mic Cal File' for input lines, or 'Load Spkr Cal File' for output lines. If you have some other type of transducer just consider that 'Mic' means 'Input' and 'Spkr' means 'Output'.
There is a fundamental difference in how Mic and Spkr (or Input and Output) calibration files are applied. Consider a file that shows a flat response except for a peak centered at 2 kHz. If it is a Mic calibration file, that means that the mic puts out a larger signal at 2 kHz, so to compensate for that Daqarta will reduce the observed response accordingly; the overall system will behave as though the mic had a flat response.
Now suppose that same file is used for a Spkr. That same peak means that the speaker puts out more sound at 2 kHz. So if you are driving that speaker with the Daqarta Generator and want to see what the output of the speaker looks like, Daqarta has to boost the spectrum display of the raw output to make it match the real acoustic output.
But there is another use for a Spkr .CAL file: You can use it as above for an output, then measure a system response to that stimulus on an input line. Assuming that the system responds linearly to the stimulus, it would show a peak corresponding to the peak in the output. If you select Use Speaker Cal File on the input line, the peak will be reduced to show what the response would be with a perfect speaker.
Note that when Use Speaker Cal File is active on an input line, it disables the corresponding speaker file button on the output line so it can't be changed.
Use the same UserMicLoad command for loading either Mic or Spkr .CAL or .FRD files, depending on the User Line selected.
If the relevant User Line dialog is open, UserMicLoad= without a name will open the File Open dialog showing all .CAL files, but with no default name. You can use the file type selector drop-down control to see all .FRD files. You must select a file manually and hit Enter or the Open button.
UserMicLoad="MyFile" will open the File Open dialog with the default name set to MyFile. (Note that quotes are needed around all filenames in macros.) If you accept this by hitting Enter or the Open button in that dialog, Daqarta will assume you want to open a file named MyFile.CAL and will fail if that file is not found.
After either of the above commands that invokes a File Open dialog, you may use IF.Posn?f=0 to see if the user has hit Cancel to exit without choosing a file name. This allows your macro to exit gracefully or take other action.
A.UserMicLoad="MyFile" will open MyFile.CAL directly, without any File Open dialog. Note that this will replace any existing file for that line. To load an .FRD file directly, use A.UserMicLoad="MyFile.FRD"
UserMicLoad can use string variables and expressions. For example, UserMicLoad=Field1 will use the contents of Field1 as the default file name, and A.UserMicLoad=Field1 will load a file with that name directly.
Similarly, if the Macro Variable Var0 holds a value of 12, then UserMicLoad="Test"+Var0 will set a default file name of Test12. If you expect to use a large series of files, you can use UserMicLoad="Test"+Var0(3) (for example) to set the decimal format to 3 integer places to get Test012. This will allow proper sorting by file name.
However, it is usually more useful for a macro to load calibration files directly, without the User Line dialog open. This requires that you specify which line the macro refers to. This is done via Uxx. prefixes before the macro command, as in A.U0L.UserMicLoad="MyFile".
Prefixes U0L. through U7R. specify Input lines 0-7 and the Left or Right channel of each.
If your card has only Master Input lines, UIL. or UIR. prefixes will specify them here.
If your card has only Master Output lines, specify them with UOL. or UOR. prefixes.
Otherwise, UWL. and UWR. prefixes specify Wave Out lines.
If a data file is open, UIL. and UIR. prefixes specify Left and Right Input lines, while UOL. and UOR. specify Output lines.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2021 by Interstellar Research
All rights reserved