Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Open Existing Data File
The DD / Open button appears in the main toolbar whenever Generator and Input are off, and can be toggled via the ALT+D accelerator key. Either is simply an alternative to Open Existing Data File in the File menu (ALT+F, O). Toggling the button off closes the file, as an alternative to Close Data File in the File menu.
You can also open .DAT files, but since these contain raw data without headers Daqarta has no way to automatically know the format. In this case the .DAT File Format dialog appears and allows you to specify the details.
In addition, you can open special text files that contain a simple list of data values. (See Opening Text Files below.)
The Open dialog defaults to showing all valid Daqarta file types (.DQA, .WAV, and .DAT), but you can limit to a single type by using the file type selector drop-down control. That also allows selection of .TXT and .CSV text file types.
Alternatively, you can enter the full name, including extension, in the File Name control and Daqarta will open it. Wildcard characters may be used here, so you can enter *.* to see all file types, or *.BIN to see all files of type .BIN, for example.
No matter what extension the file actually has, Daqarta will first try to determine if the file holds valid .DQA or .WAV header information. If not, the file is assumed to be raw data and is handled as .DAT unless the file extension is .TXT or .CSV, in which case it is assumed to be a text file.
Daqarta can open binary (non-text) files with 1, 2, or 4 channels. Files in standard .WAV format can contain 8-bit or 16-bit data. Files in .DAT format can contain 8, 12, or 16-bit data. Daqarta's own .DQA files are always 16-bit data except for averages, which are 64-bit data. (See below for text files, which are always single-channel.)
If a .DQA, .WAV, or .DAT file contains more than 1024 samples per channel, Daqarta regards it as a DDisk file. The row of <<, <, >, >> file navigation buttons beneath the thin DDisk control dialog button will become enabled. Daqarta will show the first screen and allow you to move back and forth through the rest of the file using the navigation buttons or the DDisk Read accelerator keys. The display will be Paused, but if you unPause it the file will "play" on the screen as though it was live. (This will not produce output sound.)
If the .DQA, .WAV, or .DAT file contains less than 1024 samples, Daqarta will show an error message noting this. The file will not be displayed.
After the file is opened, its data will be displayed in the current waveform or Spectrum mode (or Sgram/PT for DDisk files). The file name will be shown on the title bar of the main Daqarta window. Additional information about the file may be found via the File Info option.
There is no need to open text files when working directly with the sound card. Daqarta can save and open its own .DQA files, which include relevant supporting information like Notes, Range, and Units data. Daqarta can also open .WAV files created by other sound card software, and (by entering relevant .DAT format information) even many binary files created with laboratory equipment. However, some equipment saves data only in text format, hence this option to open text files.
Text (.TXT or .CSV) files must contain only a single channel of data, either as a column of values, or as comma-separated values. Some equipment may store one or more additional channels, or other information such as index values or time stamps. In such cases, you must manually edit these files using a text editor to remove all data columns except the one of interest.
Daqarta allows text files with comments that are preceded by a semicolon (;). The remainder of the line will be ignored. A comment may appear after a value on the same line, or the comment may be on a separate line.
Values may have integer portions up to +/-131071, plus an arbitrary number of decimal places; Daqarta stores the decimal portion with about 9 places of resolution (30 bits).
Up to 1024 values of text data will be read; the data set is padded with zeros if less, and truncated if more.
The X axis (waveform or Spectrum) will be shown as though the 1024 samples had been collected with the current sample rate setting. If Decimate is active, the data will be shown as though the effective Decimate Rate was used. (Sample rate and Decimate can't be changed once the text file is open.)
For maximum resolution, text files opened this way are treated internally as averaged waveform values. This assumes that the values are from a normal 16-bit sound card (+/-32767 counts), but over a billion data sets (2^30 or 1073741824) have been averaged to provide the enhanced resolution implied by the decimal fraction.
By default, that uncalibrated full-scale range is shown as +/-1 volt, so a text value of 32767 will be shown as 1 volt, and 123.456 will be shown as 123.456 / 32767 or 3.768 mV. Text values of +/-131071 will be shown as +/-4 volts, requiring PgDn to reduce the display magnification.
However, if you activate User Units (ALT+U or via the Calibration menu option) then the Y axis and cursor readouts will show the same number of millivolts as the numerical file values. Thus, a file value of 123.456 will be shown as 123.456 mV. You can change the Units Name to reflect the original units, and you can change the Units/Volt factor as desired.
Note that when you save a file as .TXT from Daqarta's File menu, it includes descriptive header text, including any Notes. It always has at least 2 columns of data: The first column is the time point (or frequency, for Spectrum files), and the second is the waveform or spectrum data for that point. If there are multiple channels, they are shown as additional columns. Thus, Daqarta can not open such files directly. (You would need to open it first in a text editor and trim out all but a single column of values, as noted above.)
Also, note that when the apparently-same Open dialog is used to load Arb files, text data is handled differently: You may open text files of up to 16384 values, but all values will be rounded to the nearest integer.
When loading Play files, the text options are not available. Files other than .DQA or .WAV format will be assumed to be binary .DAT types. However, you can use the Convert Text File to .DAT option in the File menu to use text files with Play.
When you open a file as discussed above, the file is either static (for a short single-screen file), or will allow scrolling (for longer files such as DDisk). You can unPause a long file to allow it to stream through while viewing, but this will not produce sound.
To listen to and view a file while playing it normally, you don't use the Open option at all. Instead, you play it normally in Windows Media Player (or equivalent). On Vista and later systems, you then toggle Input on to see whatever is currently playing. On XP systems, your sound card must also support 'Stereo Mix' or 'What You Hear' and you'll need to select that as an Input line.
Daqarta can only open certain types of files, as noted in the Overview subtopic. In particular, it can't open .MP3 or .MID files, or .WAV files other than 16-bit. (Though you can use the WAV File Convert-to-16bit Macro to convert 8, 20, 24, or 32-bit WAV files to 16 bits.)
However, any file that can be played on your system via Windows Media Player or equivalent can be viewed while it plays, as discussed under Listening While Viewing Files, above.
You can't scroll to an arbitrary location, but you can hit Daqarta's Pause button (or ALT+P) at any time to freeze the current display. You can toggle the Paused view between waveform and Spectrum displays, and you can use the cursor readouts to examine details of the signal.
The Open macro has no effect if any File Open or Save As dialog is already active.
Open= without a name will open the File Open dialog showing all .DQA, .WAV, and .DAT files, but with no default name.
Open="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.DQA and will fail if that file is not found.
Open="MyFile.WAV" will open the File Open dialog as above, but with the specified extension, and that is the file that Daqarta will open.
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.Open="MyFile" will open MyFile.DQA directly, without any File Open dialog. Note that if there was a file already open, it will be replaced with the specified file. You can also specify the extension as above. However, .DAT files will still open the .DAT File Format Dialog.
Similarly, if the Macro Variable Var0 holds a value of 12, then Open="Test"+Var0 will set a default file name of Test12. If you expect to use a large series of files, you can use Open="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.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2017 by Interstellar Research
All rights reserved