DASYLab Techniques
Saving DASYLab data to an ASCII (text) readable fileUpdated to reflect changes in DASYLab 2020 (V15.0)
The DASYLab Getting Started Guide (Manual.pdf is included on the CD and in the Windows Start menu) provides
examples for storing data using the DASYLab binary data format. Many applications require data to be stored tofiles that will be used by programs that do not understand the DASYLab format. Or, you simply wish to store in afile that can be read by a text editing application, such as Notepad or WordPad.
This short tutorial will create a worksheet to store data as ASCII readable text, optimized for Microsoft Excel. See
the Notes on working with Excel at the end of this document.

A Basic ASCII Data Logger
The example uses the Measurement Computing driver. If you are using other hardware, the method for creating
the Analog Input will vary.
Start DASYLab to create a simple data logger application. This data logger will read data from one channel,
display the data in a strip chart type display, and then store the data in readable ASCII format on the hard drive.
You will accomplish these tasks using three DASYLab modules.
Start DASYLab. First bring the data into DASYLab; to do this, use an ANALOG INPUT module. The ANALOG INPUT
module is located in the Module browser: MCC-DRV→Driver→Analog Input. 1 Once selected, your pointershould change to the place pointer, click anywhere on the worksheet to place the Analog Input Icon. After
placing the icon, the worksheet should look like this:

1 Choose the appropriate hardware Analog Input, depending on your driver. For example, for Measurement Computing devices, use theModule Browser, Input/Output→MCC-DRV→Analog Input and select your channels from the selection dialog box.

DASYLab Techniques – Saving DASYLab data to an ASCII (text) readable file

Page 2 of 8

Now connect the analog input to the display. For this example, display the data on a strip chart type display.
Select the Chart Recorder, found under Modules→Display→Chart Recorder. Put the module on the worksheet
to the right of the Analog input. The two modules can now be connected together. To accomplish this, click anddrag the Chart Recorder module next to the analog input module so that the 0 on the analog input touches the 0on the Chart Recorder icon, then release. If done properly, a wire will now connect the two modules.

A feature of many modules is the ability to allow data to pass through. This allows you to connect many
modules in a daisy chain and keep the worksheet neat and uncluttered. To enable this pass through, double clickon the Chart Recorder module and click the Copy inputs in the lower right hand corner. Click OK to save thesettings.

Next, configure the worksheet to save the data to the hard drive. The module required to save data to the hard
drive is found under Modules→Files→Write Data. Place this module on the worksheet next to the ChartRecorder. Now connect the Chart Recorder to the Write Data module. Use the method discussed earlier toDASYLab Techniques – Saving DASYLab data to an ASCII (text) readable file

Page 3 of 8

bump the two modules together, or click on the output of the Chart Recorder, which should change the pointerinto the wiring control, and then click the input of the Write Data module to connect the wire.
When completed the worksheet should look as follows:

Double click on the Write Data module to access the module’s properties. You can change the file format, filename and path. The property dialog looks as follows:

Choose the ASCII (CSV) File Format from the drop down menu on the left of the dialog box. When you do this,the default file name changes from DEFWRITE.DDF to DEFWRITE.CSV.

DASYLab Techniques – Saving DASYLab data to an ASCII (text) readable file

Page 4 of 8

The Write Data module will prompt you. Click Yes to accept these settings.

There are several options for the ASCII (Excel CSV Preset) File Format. Click on the Options button. You can seethat DASYLab offers Tab, Semicolon or Comma separator characters. The Excel CSV preset has configured theComma as the separator.
Decide how you want the first column, the Time column, to appear. Change the Time Format to Date+Time[hh:mm:ss] to put the full date and actual time in the first column. This will look like:
9/12/2016,13:30:20,4.00

DASYLab Techniques – Saving DASYLab data to an ASCII (text) readable filePage 5 of 8None of the other options need to be adjusted at this time. Click OK to close the dialog box. You will return tothe main dialog box. Click File Name and enter a file name for the stored data. Click OK.
For data security, you may want to select the Append to Existing File or Write Protection options to ensure thatthe data file is not accidentally overwritten. You can click the Multifile button configure a multi-file series. Click
OK to close the Write Data properties.
Bring the display window up to visibility. There are four buttons designed to show and hide displays.

The first set hides (makes invisible) and unhides (makes visible) all display windows. The second set of buttons
function minimizes the display windows to small windows at the bottom of the display and restores the display
windows to their previous size and location.
To bring the Chart Recorder display up and make it visible; click the Restore All Windows button (Up arrow).
Click the start Worksheet button to start the worksheet.

The Chart Recorder display will graph the data. You may need to adjust the Y-axis, as show below. The default is-5 to 5, but the USB-TC is reading temperature in the 50 to 80°F range. To change it, click on the Axes menu, andselect the Y-axis. Change it to reflect the range of your data.

DASYLab Techniques – Saving DASYLab data to an ASCII (text) readable file

Page 6 of 8

Stop the Measurement. Save this worksheet so that you can use it later. Click on File, then Save As. Select alocation and name for the file.

DASYLab Techniques – Saving DASYLab data to an ASCII (text) readable file

Page 7 of 8A final note on this technique
If you will always be saving data to an ASCII file, you can configure DASYLab to use the current Write Datamodule settings as the default settings.
Right-click over the Write Data module on the work area and select the Default Module Settings selection.

In the dialog box that opens, click Set to define the defaults. To remove the defaults, click the Reset button.

DASYLab Techniques – Saving DASYLab data to an ASCII (text) readable file

Page 8 of 8

Working with Excel:
••

•

•
•
•
•
•

•

DASYLab 2016 offers three extensions for the ASCII file type. You can select from .ASC, .TXT and .CSV fileextensions.
DASYLab supports CSV (comma separated values) files, TAB or semicolon as the separator in ASCII files.
o DASYLab 12 and earlier versions do not support CSV files.
o CSV defaults to the comma as the separator
o TXT and ASC default to the semicolon as the separator
Excel interprets TAB characters as data separators in the US and many other locales where the decimal
is a periodo The comma separator forces the Excel import wizard or Excel just reads the entire file into one
column. Use the “Text to Columns” feature to fix this.
o In Germany, and other locales where the decimal is a comma, Excel uses the semicolon as theCSV separatoro In the US, use TAB as the separator. In Germany, use the TAB or semicolon.
Data stored to the ASCII file format must be synchronized; all channels must have the exact same timing
characteristics (time stamp, block size, sample rate). In other words, every row is time stamped, andeach column of that row must have a value.
Microsoft Excel 2003 and earlier, or newer releases in Compatibility mode, only supports 65,536 rows ineach worksheet. Longer files will be truncated. You can still open them, but Excel will not display thedata or allow you to process it.
Microsoft Excel 2007 and later support larger data sets, and up to 1,048,576 rows per table.
Microsoft Excel may not be able to correctly display the time, especially if the sample distance is in
milliseconds.
Excel can be configured to use a time format with three decimals, but not more. This is sufficient for1000 samples/second (0.001 milliseconds), but not for faster sample rates, where the fractions of asecond will require 4 or more decimals. It is recommended that you look at the file with a text editor toconfirm that the correct time stamp has been stored.
For example, the time does not display correctly in this file. To fix it, right click on the cell or column,
select Format Cells, select Custom from the categories. Scroll down on the ‘Type:’ list and select“hh:mm:ss”. Edit this to be hh:mm:ss.000 to give 3 digits to the right of the decimal point. You can add
date formatting as well.

•Actual Data file as displayed in a text editor:

Data file as opened and formatted by Excel 2003