Documentation

The documentation matches the latest version of our software (1.1.0). Please update your software if it looks different than the screenshots below.

  1. Intended use
  2. Supported connections and protocols
  3. Configuring Simple Data Logger
  4. Logging data
  5. Further processing

*SDL Plus feature

Intended use

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

The Plus version also supports polling: A command is sent to the device to prompt it to send data. Further processing functions are also available.

SDL was originally developed for use with scales and balances but also works with other measuring instruments and more generally with devices sending data in ASCII format.

Supported connections and protocols

SDL supports connections made through a COM port (RS232, USB virtual COM port, Bluetooth Serial Port Profile, etc.) or over TCP/IP (Ethernet, WLAN; SDL act as TCP client on a persistent connection). 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, please go to the Input and Output tabs (or click on the corresponding buttons at the top of the Start tab). Advanced features and settings can be found in the Control and Process tabs. License keys can be entered and managed in the License tab.

Input tab

Here you’ll make settings for the device from which you want to receive data.

Input tab

Choose your device from the list. Currently supported devices:

  • Generic measuring instrument: SDL will capture the first number unless you modify the regular expression.
  • Generic text device: SDL will capture all alphanumeric characters.
  • A&D scales and balances: all of them use the same data format, you might have to change the data transmission mode to suit your application.
  • Adam Equipment CBK, *GBK, GFK (GK indicator): set “C8 LAb” to “off” in the menu of your scale, particularly if you’re using continuous transmission mode “Ct StA” oder “Ct AnY”).
  • Adam Equipment CPWplus: set the scale to “trn 2” for continuous transmission or to “trn 3” to use polling or the print button on the scale (port is set to “trn 1” and therefore disabled by default).
  • Adam Equipment GBC, GFC (GC counting indicator): you can choose to capture the weight or the number of pieces.
  • Kern DE series scales: default settings of the scale work with polling (or by pressing the print button), but you can also set it to transmit automatically or continuously.
  • Ohaus scales and balances
  • Ohaus Scout Pro (SPU), Traveller (TA), Navigator (NV) scales: default settings of these scales work with polling (or by pressing the print button), but you can also set it to transmit automatically or continuously.

If you’re a manufacturer and would like us to to include your instruments, please contact us.

If your device is included in the list, select it and press the Set default parameters for device button. If your device is not included, select either “generic measuring instrument” or “generic text device” (e.g. for bar code readers) and 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:

Customize regular expression

Note: 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 persistent connections where SDL acts as the TCP client and connects to a device acting as the TCP server. Data has to be sent a “raw TCP” (used by Ohaus scales and balances as well as many RS-232-to-Ethernet converters like the Moxa NPort series) with no higher-level application protocol.

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:

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

Terminator or timeout

The terminator (a.k.a delimiter) 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

In the example above, the very last character is “line feed” (ASCII code 10).

As an alternative to using a terminator, SDL also supports 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 Input tab. Don’t forget to delete the timeout as it is no longer needed.

Timeout used to find terminator

Flow control (handshaking)

Simple Data Logger supports XON/XOFF software flow control and RTS/CTS hardware flow control for COM ports (and a rarely used mode that uses both). In addition to these methods, you can also enable the “data terminal ready” (DTR) and “request to send” (RTS) control signals for the duration of the connection by clicking on the corresponding button:
Flow control and handshakingPlease note that you cannot manually set the RTS signal when using RTS flow control.

We recommend settings flow control to “None” and only enabling it if required by your serial device.

Control tab

This tab contains all settings for sending commands to the device.

Polling (SDL Plus feature)

Control tab: Polling and auto stopEnable polling if you want to send a command to your device that triggers a response. Example: Many scales and balances will send the current weight after receiving a corresponding command.

The command has to be entered as a 2 hexadecimal characters per byte, separated by a blank space. The ASCII text is shown for reference purposes. In the screenshot above, “49 50  0D 0A” results in “IP” followed by carriage control and line feed.

If the Set default command button is active, you can press it to set the default polling command for the selected device. Otherwise, please consult the manual of your device to and use tools like asciitohex.com for the conversion.

When you select timer, SDL will repeat the command at the entered interval (in milliseconds, ms). The command will be repeated whether or not an answer form your device has been received.

Alternatively, you can use a synchronized polling mode by selecting delay. The delay you enter is the time that SDL waits after receiving a reply and before repeating the command. If you want to poll your device as fast as possible, set the delay to zero.

Important: When using this “as fast as possible” mode, it is important to know how many lines (defined by the terminator) are sent as a response. If your device sends multiple lines, you should use the ignore and combine settings in the Process tab to prevent SDL from replying to each line with a new command.

You should set a write timeout if you’ve chosen a flow control mode (handshaking) in the Input tab. To set the write timeout to indefinite, enter “-1” (not recommended as the port could be blocked indefinitely).

Stop automatically (SDL Plus feature)

If you want SDL to stop data logging automatically, enter the time as HH:MM:SS. The effect is the same as pressing the Stop button in the Start tab.

Process tab

This tab contains settings which relate to how the data received from your device is processed.

Process received data

Ignore received lines consisting only of white-space characters

If your device sends “empty” lines which only contain white-space characters like carriage return and line feed, SDL will ignore these lines if you leave the first checkbox enabled (default setting). This means that further processing will be skipped and these lines will not be written to the file. This can be useful when dealing with output formats originally meant for printers which contain many line feeds.

Note: This setting only ignores lines which were received empty. If nothing has been captured from the data sent by your device, this setting has no effect.

Note: If you’re using synchronized polling with a delay, ignored lines will not be considered to be a reply from the device and will not trigger SDL to repeat the polling command.

Enable editing (SDL Plus feature)

Enable editing if you want to remove characters from the data received from your device.

This is usually only necessary under special circumstances. Most devices available in SDL are numeric devices and will only capture (decimal) numbers (the only exception is the generic text device).

However, as shown above, you can modify the regular expression used to capture data. If you do this and include characters which are not numbers, use the remove characters function to remove them so that SDL can correctly process the number.

Real-world example:

The screenshot below shows the weight received from an legal for trade (verified) A&D EK-6100i-EC precision scale. The last digit of the weight is enclosed in parentheses. By default, SDL ignores this digit (it’s not shown in blue):

Differentiated digit on EK-6100i-EC scale (verified, legal for trade)

To capture it, replace the default regular expression with:

([-+]+[0-9]*[\.,]?[0-9]*\[[0-9]*\]+)

Then, enter the square brackets “[” and “]” in the process tab to ensure that SDL removes them before writing the weight to a file.

Combine received lines into one row (SDL Plus feature)

This setting allows you to perform a very useful conversion if the data sent by your device consists of multiple, distinct values like in the example below:
Multiple lines received from counting scale

The values were sent by a counting scale: The first line contains the number of pieces (count), the second one the net weight and the third one the average piece weight (APW). The last empty line is ignored.

Normally, they would also be written in separate lines by SDL. The CSV would look as follows when opened in a spreadsheet application:
3 separate rows

This format is not ideal for further processing. By combining 3 received lines into one row, the data will appear in separate columns:
3 lines combined into one row

Note: When using synchronized polling with a delay, the combined lines will count as one reply from the device.

Output tab

Choose a file

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.
Output tab: Choose file for data logging

Formats

You can automatically set the default formats for your language and region by pressing the Set values button. The text of the button will correspond to your current settings in Windows and the formats set automatically will be the “short date” and “long time” formats defined in your operating system:

Region formats in Windows

You can manually 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. The decimal symbol (for numeric values) and value separator (character used to separate values from each other) will also be set automatically if you use the Set values button. However, if you want to later open the CSV file on a system with different language or region settings, you might have to change these settings manually.

If you want your numbers to have a dot as decimal symbol, 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 symbol and value separator!

Leave use invariant culture checked unless you want to use localized long day and month names (e.g. “Freitag, 21. September 2018“).

Add additional information (SDL Plus feature)

Enable the check boxes to add automatically generated line numbers and a comment (e.g. the project or sample name) to each line:
Line numbers and comment

Line numbers start from 1 each time the Start button is pressed. Together with the comment, this can help identify captured values in a large file.

Settings tab

The Settings tab currently allows you to configure the behavior of the event log and to reload or restore user settings:

Settings tab

Un-check show received data and show sent data if you only want status and error messages to appear (but no data received from or sent to the connected device). This can be useful if data is sent at a very high rate.

The screenshot below shows received (captured) and sent data (both checkboxes enabled):
Event log with sent data

Disable auto scroll if you want to prevent SDL from automatically scrolling to the latest entry in the event log.

The number of lines before the event log is restarted (overwritten) can be set from 10 to 1000. This only affects the event log displayed in SDL and not the data logged to a file.

Press the Reload button to restore the last saved user settings (settings are saved automatically when the application is closed). This is useful if you want to undo changes that you’ve made in the current session. The Reset button will reset all user settings to their default values (as if you’d just installed SDL).

Logging data

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 (unless configured otherwise) and will be written to the chosen file.

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

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

Stop data logging

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