- Intended use
- Supported connections and protocols
- Configuring Simple Data Logger
- Logging data
- Further processing
Simple Data Logger (SDL) writes data received from a connected device to a file (CSV format) 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 Serial Port Profile, etc.) 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:
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.
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:
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.
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:
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.
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 Device tab. Don’t forget to delete the timeout as it is no longer needed.
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:
Please 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.
Enable 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.
Please note: Synchronized polling currently assumes your device sends a single line of data (defined by the terminator) as a response. If your device sends several lines, synchronized polling will send more commands than expected.
You should set a write timeout if you’ve chosen a flow control mode (handshaking) in the device tab. To set the write timeout to indefinite, enter “-1” (not recommended as the port could be blocked indefinitely).
Enable processing if you want to remove characters from the data received from your device (before writing it to a file).
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.
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):
To capture it, replace the default regular expression with:
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:
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 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!
Un-check show received data if you only want status and error messages to appear (but no data received from the connected device). This can be useful if data is sent at a very high rate.
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).
Error and status messages will also appear in the event log.
To stop data logging and close the file, press the stop button:
Open the file in the application of your choice, e.g. spreadsheet software like Microsoft Excel, LibreOffice / OpenOffice Calc or Google Sheets (shown below):