bg

ASCII data query and parser plugin for Data Loggers

Latest version: 5.0.1 build 313. March 20, 2025.

This plugin adds ASCII parsing and query capabilities to our data logging software. It receives data from a data source and extracts variables. If it is necessary, the plugin can send commands to a device and poll it. Use the plugin when you collect measurements, log events, or control instruments. The plugin includes advanced parsers for fixed-format, delimited, or pattern-based data using regular expressions. It also handles binary and hex fragments when needed.

Download  | PDF manual

Key capabilities

  1. Send ASCII requests to a device, including hex bytes in #XX format (for example, "#02INIT#03"). Define request timing: once at startup, at regular polling intervals, or at specified times (e.g., "08:00:00").
  2. Wait for device responses with configurable timeouts.
  3. Split incoming stream into packets by begin/end markers or by timeout.
  4. Extract variables by fixed position, by order (enumeration), or by regular expression. You can also set defaults or create empty variables when needed.
  5. Translate or remove unwanted characters before parsing (for example, strip nonprintable control bytes).
  6. Filter packets to ignore or process only specific messages using text matches or regular expressions.
  7. Add timestamp and data source name fields to each parsed packet for traceability.

Typical examples

Example 1 - fixed-position record:

223       741  09127 15:53:30 00:05:28 O **********************************
  • Set parsing to Fixed position.
  • Define variables: subscriber (chars 1-3), called number (cols 11-13), time (cols 26-33), and duration (cols 34-41).
  • Mark types for time and integers to export correctly.

Example 2 - delimited data:

TEMP,25.4,2025-11-28 08:00:00
  • Use the comma as a separator.
  • Map fields to variables: type, value, and timestamp.
  • Convert the timestamp format to the "Date" data type to store data in databases.

Example 3 - Barcode reader data

Setup: A barcode reader sends scanned codes over a serial port. You can use Advanced Serial Data Logger (ASDL) to collect, display, and export records.

Incoming stream example (each scan arrives on a new line):

BC1234567890
Recommended configuration:
  • Packet splitting: use line ending ASCII characters as packet terminator (for example, #0D#0A) or enable timeout-based splitting if terminators vary.
  • Parsing type: Fixed position - the parser should extract a barcode from column 1 and interpret it as a string.
  • Filtering: add a rule to ignore empty scans or to process only codes matching a pattern like ^BC\d{10}$.
  • Requests: If the reader supports polling, create a request sent by ASDL every 5 seconds to trigger a read. Configure timeout to wait for the response before the next request.

Example of combining query and parsing:

  • ASDL sends a poll string "#02READ#03" every 5 seconds.
  • The reader returns: BC1234567890#0D#0A
  • The parser splits the packet on #0D#0A, enumerates fields, validates the barcode pattern, adds DATE_TIME_STAMP if needed, and passes data to other filter and export plugins.

Practical tips

  1. When packet markers use nonprinting characters, specify them as #XX in configuration (for example, #0D#0A).
  2. To detect packet start when its first fields vary (like a timestamp), use a small regular expression for the beginning marker, for example, \d{4}\-\d{2}\-\d{2} to match "2025-11-28".
  3. Use character translation to drop carriage returns or control bytes before parsing.
  4. Control packet length when your device always sends fixed-length frames. Set the length to ignore malformed packets.
  5. Test filters with sample data. Create both Ignore and Parse rules to prevent unwanted data from being exported.