Advanced Serial Data Logger

Trust In Confidence!

For Windows 2000 - Windows 10 (2019) (incl. Server, x86 and x64). Latest version: 4.5.1 build 807. .

Logging and parsing data from an intellectual pressure measuring device

Pressure data logger

We require software, which can log data from an intellectual pressure measuring device from Paroscientific Inc into our data acquisition system. Paroscientific is the leader in the field of precision pressure measurement, resolution of better than 0.0001% and typical accuracy of 0.01% are achieved even under difficult environmental conditions.

When the Advanced Serial Data Logger receives the information from the serial port, he adds a date and time stamp.

We are using the Digiquartz ® pressure instrumentation. A RS-232 interface user manual for intelligent pressure devices exists on a corporate web-site.

Short hardware overview

Digiquartz ® Intelligent Transmitters, Portable Pressure Standards, Intelligent Depth Sensors, MET stations, and Water Stage Sensors consist of a standard Paroscientific pressure transducer and a digital interface board in an integral package. The digital interface boards are also available separately for customer systems where separate packaging of the transducer and interface board is desired.

Programming and operation are the same in all configurations. The digital board has a microprocessor-controlled counter and RS-232 port. The microprocessor operating program is stored in permanent memory (EPROM). User controllable parameters are stored in user writable memory (EEPROM). The user interacts with the unit via the two-way RS-232 interface.

The microprocessor monitors incoming commands from the computer. When a sampling command is received, the microprocessor selects the appropriate frequency signal source and makes a period measurement using a 14.74 MHz timebase counter. The counter integration time is user selectable. Some commands require measurements of both temperature and pressure signals. In that case, the temperature period is measured first, followed by the pressure period. When the period measurement is completed, the microprocessor makes the appropriate calculations and loads the data onto the RS-232 bus.

Short protocol overview

All commands have the form: *ddsscc__<cr><lf>

  1. Data framing is 8 data bits, no parity, with one stop bit or 7 data bits with even or odd parity, one stop bit. Set by command PT.
  2. Each line starts with an asterisk (*).
  3. The next 2 digits, dd are the destination for the command (00-99). The controller (IBM PC, etc.) is address 00, and the transmitters can be 01 through 98. Address 99 is for "global". A transmitter responds only to its own address or 99.
  4. 3. The next 2 digits, ss, are the source of the message (00-98).
  5. 4. The next 2 characters, cc, specify the type of message, and may be followed by more characters in some messages. Characters must be upper case. Reply messages may substitute data for the cc characters.
  6. 5. Each message line is terminated by a carriage return <cr> and a line feed <lf> .
  7. 6. Undefined commands are absorbed.
  8. 7. A command arriving before a previous command is completed cancels the previous command.

A typical message from the PC to transmitter #1 asking for pressure: *0100P3 <cr> <lf>

A typical reply from the transmitter to the PC: *000114.573 <cr> <lf>


It is assumed that:

You know and can configure communication parameters (baud rate, number of data bits, flow control etc) in ASDL.


Thanks to Paroscientific for a detailed description of RS-232 protocol. The description above shows, that a data flow contains non-printable characters (CR and LF). If you want to look it, please, set following options. The option in the pos.3 allows you to identify request, which the logger will send to a device.

Pressure data logger. Serial data view setup

Fig.1. Pressure data logger. Serial data view setup

Now, click the "OK" button and try to receive a data from a serial port. Nothing? Sure, the protocol specification says, that a pressure device requires a request from a PC side. Ok. It's simple. We should configure additional modules. First, please, select the "ASCII data parser and query" plug-in from two drop-down lists (fig.2a, pos. 1 and 2). Then, enable a parsing option for data received (fig.2a, pos. 3) and select necessary data export plug-ins. The DDE server (fig.2b, pos. 3) will help to check the accuracy of the parser's configuration. The "Local database" plug-in (fig.2b, pos. 4) will create Microsoft Excel files.

Pressure data logger. Data query and parser plug-ins setup

Fig.2a. Pressure data logger. Data query and parser plug-ins.

Pressure data logger. Data export plug-ins

Fig.2b. Pressure data logger. Data export plug-ins.

Now, please, open the ASCII query configuration window (click the "Setup" button near a first drop-down box on pic.2a, pos.1). The dialog window will appear on the desktop (fig.3).

Pressure data logger. Data query.

Fig.3. Pressure data logger. Data query.

The window allows you to add one or more requests at the same time. All available requests (fig.3, pos.1) are listed in the requests list (fig.3, pos.4). The each request has a number of properties: the request data (fig.3, pos.2) and the request interval (fig.3, pos.3). You may edit a request by double-clicking over the request in the list.

Any new requests may be added by clicking the "Add request" button (fig.3, pos. 5). The new dialog window will appear over the previous window (fig.4)

Pressure data logger. Data query parameters

Fig.4. Pressure data logger. Data query parameters.

Each request has a number of properties:

  1. Request string (fig.4, pos.1) - simple type the request string from the specification above and add hexadecimal codes of termination characters CR and LF at the end of the request. Each hexadecimal code should contain the "#" prefix character;
  2. Poll interval (fig.4, pos.2). - the module will send a new request after a specified interval. In this example the module will poll our pressure measuring device every second for a new value;
  3. At specified time - you should specify a time of a day, when the program will send the request;
  4. Wait response - the program will not send a new request until a response received within this interval.

Click the "OK" button in this dialog window. The module will add a new item to the requests list (fig. 3, pos.1).

Note: You can add a byte with any code to a request. For example, if you want to send byte with the 0x02 hexadecimal code to a device, then type the #02 string. If you want to send the "#" character, then you should type it twice.

Please, open the next page (fig.5) by clicking the "Parser" button. Then click the "Data packet" button.

Pressure data logger. Parser configuration window

Fig.5. Pressure data logger. Parser configuration window.

On this page you should type framing characters of a data packet. The field #1 is the start of the data packet ("*" in this example) and the field #2 is the end of the data packet (#0D#0A in this example, same as in the request above). In the field #3 you should specify a timeout value, which will be used if the module will not receive ending characters in the specified interval. Also, you can easily add a datetime stamp to an each data packet, that the parser will be process. Just enable the "Add date/time stamp" option in the pos.4.

The next page (fig.6) is a very important part of the parser configuration. The data parser uses this information for data extraction from the data packet. The data packet from this example contains one data item only, which should be placed to one variable. Later, this variable (a pressure value) will be used in a data export module and will be placed to a column of a database.

Pressure data logger. Parser items

Fig.6. Pressure data logger. The parser item.

Any new items may be added by clicking the "Add item" button (pic.6, pos. 7). Before adding an item the program will ask you about an item description. You can type any characters here, which will help you to remember a variable's content. For this example one variable with a corresponding description has been added.

Each parser item has a number of properties:

  1. Item name - this name will be bound to a column in the data export plug-in. It is a limited text description and cannot contain spaces and a few other characters;
  2. Parser's type - is a method, which the program will use for data extraction. Our parser has a few methods from simple to most powerful. In this example, where data is being placed in fixed place, we can use the simple method - fixed position. This method allows the extraction of any number of characters from any fixed position of the data block;
  3. Data type - is the data type of the characters extracted. You can specify several data types. The data will be converted from the "String" data type to the conversion type. In this example, the "Pressure" item has the "Float" data type;
  4. Default value - the value specified here is to be used when data cannot be extracted from a data block;
  5. Fixed position - is the position of the first variable's character in our data block. The minimum value is 1;
  6. Fixed length - is the number of characters, which will be transferred to a variable. The minimum value is 1.

Other options (on other pages) are unnecessary in our case, because we don't need to filter our records and our data type doesn't require additional format options.

We are now ready for configuring of the data query and the data parser modules. Click the "OK" button in the configuration window. Connect your device and power it on if necessary. You should get something like the image below.

Pressure data logger. Data received

Fig.7. Pressure data logger. Data received.

It's another view of the received data. All non-printable characters have been replaced with their code like #0A or #0D. All requests have been highlighted by the yellow color.

If the parser has been configured correctly, then in the DDE server window you'll see our variables' names and their values (fig.8).

Pressure data logger. DDE server window

Fig.8. Pressure data logger. DDE server window.

All parser items are now ready for export to any database, Microsoft Excel or Microsoft Access.

Related articles: