DiskWriter

The Disk writer sink stores measured data directly to disk. Data from one or more sources can be stored. Both 'normal' oscilloscope measurements and streaming measurements can be stored. When streaming measurements are stored, the newly arriving data will be appended to the previous data, forming one large block of data per stream. Data can be written in several common file formats. For more information about recording or logging data to disk, see the page about data logging.

Warning: The Disk writer sink can store streaming data directly. Do not store streaming data that is collected in a Data collector I/O using a Disk writer. Each time the Data collector receives new data, this will be signaled to the Disk writer, which will then add the complete Data collector content to the file, not just the new data.

Properties and actions

To control the behavior of the Disk writer sink, several properties are available. These can be accessed through a settings window, as shown below and through the popup menu that is shown when the Disk writer sink is right clicked in the object tree.

When the first source is connected to the writer, a settings window as depicted in the figure below will show. The settings window is also shown when clicking Show settings window in the popup menu of the Disk writer.

Disk writer

Filenames starting with

In most cases multiple files are used to save the data. The name of the files is a base filename with optional numbers appended. The base filename can be entered in the top edit box on the settings window of the Disk writer, by clicking the file open button next to it and selecting the proper directory and file name in the file dialog that appears.

Serial number

When multiple files are saved, optionally a Serial number can be added to the base filename. Serial numbers starting with 0 are used. This property is default on and can only be switched off when another file identification such as a time stamp is added.

Date and time

When Date and time is checked, the date and time in millisecond precision will be added to the file name in the following format:

YYYYMMDD_HHMMSS-mmm

File type

The Disk writer sink can store the data in files of common File types. The File type can be set through the settings window and through the popup menu. The following file types are available:

All sources in one file

When the property All sources in one file is checked, the data of all sources connected to the Disk writer are written to one file. Otherwise, a separate file is created for each source. When All sources in one file is off, the source number XX starting from 1 is added to the file name. When the selected file type does not support multiple sources in one file, this property is ignored.

All streams in one file

When the property All streams in one file is checked, the sequential streams are written to one file. Otherwise, a separate file is created for each stream or data block. When All streams in one file is off, the stream number YYY starting from 0 is added to the file name. When the selected file type does not support multiple streams in one file, this property is ignored.

When the option All streams in one file is on, but for some reason a new file is started, another number is appended to the base filename. The filename will then look like this:

D:\TestA_XX.mat

where A is the file number, starting from 1. A new file may be started for different reasons:

  • the previous file has reached the file size limit and was closed
  • the user has clicked Close file(s) in the menu of the Disk writer.

Limit file size to

By default the maximum file size is limited to 4 GiB. Because most current applications have problems handling such big files, the Disk writer has an option to limit the file size to an arbitrary number of bytes. You can set a file size limit by choosing Limit file size to in the menu of the Disk writer. When the limit is reached, the current file is closed and a new file is opened, with a new serial number and/or time stamp.

On FAT32 file systems, the maximum allowed file size is 4 GiB. On NTFS file systems, the files may be as big as the disk.

Store one of every...

By default all measurements are written to disk. It is also possible to change this behavior, such that one of every N measurements is written and the other measurements are skipped. This is done using the Store one of every... property.

Hint: To write the average of several measurements to disk, create an Average I/O and connect it to a Disk writer sink. Set the both the Averaging count and the Disk writer's Store one of every... properties to the same number. Disable the Running average setting of the Average I/O.

Close file(s)

When performing measurements and All streams in one file is switched on, the Disk writer keeps the file on disk open. Other applications can not open or copy the file then. The Close file(s) action closes all open files of the Disk writer. External applications can now access the files. When new data arrives at the Disk writer, a new file will be created.

Common properties and actions

Related information

Average

The Average I/O averages successive measurements and outputs the average of these measurements.