Documentation

Intended use

Simple Data Logger (SDL) writes data received from a connected device to a file (CSV) and optionally adds the date and time to each line of data. SDL can either log all printable characters or extract a number (typically a measurement value) from the received data.

Supported connections and protocols

SDL supports connections made through a COM port (RS232, USB virtual COM port, Bluetooth SPP) or over TCP/IP (Raw TCP). Data sent by your device must be in ASCII format.

Configuring Simple Data Logger

SDL is organized in tabs. The start tab is shown when SDL is launched. To configure SDL, go to the device and file tabs before pressing the start button.

Device tab

Device tab in SDL 0.4

Choose your device from the list. Currently supported devices:

Many further device profiles will be added soon. If your device is included in the list, select it and press the set default parameters for device button. If you’ve selected a generic device, please enter the interface parameters manually.

Optional: Customize the regular expression used to match and capture data

SDL uses a regular expression to match and capture the data you want to record. You can edit it by clicking on the customize button:

Capture net weight using custom regular expression

SDL always captures the data matched by the first subexpression. You must therefore include a subexpression (in parentheses) in your regular expression.

You can find application examples in our blog.

COM port or TCP/IP

Choose between a COM port (RS232, USB VCP, Bluetooth SPP) or a TCP/IP connection by selecting the appropriate radio button. Note: For TCP/IP connections, we currently only support the “Raw TCP” format (used by Ohaus scales and balances as well as many RS-232-to-Ethernet converters like the Moxa NPort series).

Make sure that all settings match those of your device. If you’re not sure which COM port your device is connected to, open the device manager in Windows and consult the “Ports (COM & LPT)” section. When you plug in and unplug a USB VCP device, you should see a COM port appear or disappear.

Windows Device Manager / Ports (COM &LPT)
Ohaus scale with USB interface appearing as COM4

Terminator or timeout

The terminator is the very last character in each line of data sent by your device. If your device is included in the device list and you’ve pressed the set default parameters for device button, the terminator will be set automatically. You can also select one of the values from the combo box or enter any ASCII code as a decimal value.

Terminator example from a user manual
Terminator example from a user manual

In the example above, the very last character is “line feed” (ASCII code 10), therefore choose “10” as the terminator in SDL.

As an alternative to using a terminator, SDL also supports using a timeout: If no additional data has been received in the specified time, SDL assumes that the line of data is complete. Enter the timeout in milliseconds (100 ms is usually a good starting point) and leave the terminator field empty (you can also use both at the same time, but this is usually not what you want).

Tip: If you don’t know which terminator your device uses, leave the terminator field empty and try entering a timeout of 100 ms. Then, transfer some data from your device and have a look at the event log in the start tab. You’ll usually be able to identify the terminator (10 in the example below) and can now specify it in the device tab. Don’t forget to delete the timeout as it is no longer needed.

Event log in Simple Data Logger
The last character in each line is the terminator (ASCII code 10)

File tab

File tab in simple data logger

Choose a file to which you want to log data. If it does not exist yet, SDL will create if for you. If it already exists, data will be appended. Using the CSV file extension is recommended, but you can also use the TXT extension (which will open the import assistant when you open the file in Microsoft Excel) or any other extension.Please note that changing the file extensions does not change the file format, SDL always saves ASCII text files.

Select or enter a date and time format or choose “None” from the list if you do not want to record the date or time. Select a decimal separator (for numeric values) and value separator (character used to separate values from each other).Generally, if you want your numbers to have a a dot as decimal separator, you should use “Comma” as the value separator (e.g. in the US). If you use a comma as the decimal separator, select “Semicolon” as the value separator (e.g in Germany). Never set the same character as the decimal separator and value separator!

Logging data

Start tab

Start tab in Simple Data Logger

Return to the start tab and confirm that your device and file settings are correct. Then, press the start button. Data received from your device will be shown in the event log and will be written to the chosen file.

Error and status messages will also appear in the event log.

Start tab with received data shown in event log

To stop data logging and close the file, press the stop button.

Further processing

Open the file in the application of your choice, e.g. spreadsheet software like Microsoft Excel, LibreOffice / OpenOffice Calc or Google Sheets (shown below).

File generated by Simple Data Logger opened in Google Docs Sheet
Date, time and weight