Measurement Computing   Easy to Use | Easy to Integrate | Easy to Support catalog banner

Measurement Computing Data Acquisition Knowledgebase

Welcome Guest ( )

WebDAQ .wdd File Format

Expand / Collapse
 

WebDAQ .wdd File Format


The WebDAQ binary data file format stores time-domain data from the WebDAQ device. This document provides a description of the file format so that it may be easily read for conversion or direct use. All values are in the format are little-endian.

The data file starts with a simple fixed-size binary header:

 Binary Header
 Field Name   Data Type  Size (bytes)  Description
 version  unsigned 32 bit integer  4   The binary format file version (currently version 2)
 size  unsigned 32 bit integer  4  The size of the binary and JSON headers combined (564 + json_header_size)
 channel_count  unsigned 32 bit integer   4  The number of channels in this file
 actual_scan_rate   IEEE-754 double  8  The per-channel hardware scan rate for the data in this file
 start_time_sec  unsigned 64 bit integer   8  The start time of the scan in seconds since Unit Epoch (00:00:00 UTC Thursday 1, January 1970)
tm_gmtoff  32 bit integer   4  The time zone offset for the start time, in seconds East of UTC
 tm_zone  char[16]  16   The time zone abbreviation, null-terminated
 Reserved bytes  512  Reserved for later use (this was added for version 2 of .wdd file format only)
 json_header_size  unsigned 32 bit integer  4  The size of the JSON header that follows this section












This is followed by a JSON header of varying size. More information about the JSON format can be found at http://www.json.org/. The size of the JSON header is supplied in the binary header. The JSON header contains additional scan information including channel names, units, and device information. It consists of two objects, jobDescriptor and systemInfo.

The systemInfo object contains information about the hardware which ran the acquisition. This includes the device name, product name, serial number, MAC address. See the systemInfo object in the JSON Header Example below.

The jobDescriptor object describes the job which created the file. The schema for this object is available on the WebDAQ, and can be accessed by entering the address (in a web browser) “<webdaq_address>/api/v1.0/jobs/schema” where <webdaq_address> is the IP address or hostname of your device. Note that the schema varies by device model. See the jobDescriptor object in the JSON Header Example below. More information about JSON schema can be found at http://json-schema.org/.

After the header information, the data is arranged as tightly packed IEEE-754 double values. The data is interlaced, such that a single point per channel is written at a time.

JSON Header Example
{
    "jobDescriptor": {
        "acquisition": {
            "sample": {
                "autoZeroMode": "everySample", 
                "rate": 50
            }, 
            "startTrigger": {
                "type": "immediate"
            }, 
            "stopTrigger": {
                "sampleCount": 1000, 
                "type": "sampleCount"
            }
        }, 
        "alarms": [], 
        "channels": [
            {
                "customScaling": {
                    "linear": {
                        "multiplier": 1, 
                        "offset": 0
                    }, 
                    "type": "none"
                }, 
                "name": "Thermocouple 0", 
                "number": 0, 
                "range": "\u00b178.125mV", 
                "tcType": "J", 
                "type": "thermocouple", 
                "unit": "C", 
                "www": {
                    "color": "#DD3222", 
                    "dashboardScalar": true, 
                    "dashboardStripChart": true
                }
            }, 
            {
                "customScaling": {
                    "linear": {
                        "multiplier": 1, 
                        "offset": 0
                    }, 
                    "type": "none"
                }, 
                "name": "Voltage 1", 
                "number": 1, 
                "range": "\u00b178.125mV", 
                "type": "voltage", 
                "unit": "V", 
                "www": {
                    "color": "#FFC000", 
                    "dashboardScalar": true, 
                    "dashboardStripChart": true
                }
            }
        ], 
        "logging": {
            "enable": true, 
            "logFile": {
                "appendTime": true, 
                "name": "MultiChannel", 
                "path": "/storage/data/"
            }, 
            "note": ""
        }, 
        "name": "MultiChannel", 
        "productId": 314, 
        "type": "job", 
        "version": 1, 
        "www": {
            "iterationIndex": 0, 
            "status": 1, 
            "statusText": "Queued"
        }
    }, 
    "systemInfo": {
        "MAC": "00:80:2F:AA:AA:AA", 
        "SerialNo": "01C176C5", 
        "name": "webdaq-demo", 
        "productName": "WebDAQ-316"
    }
}




Rate this Article:
Tags:

Add Your Comments


For comments email TechSupport@mccdaq.com.

Details
Article ID: 50726

Last Modified:8/15/2018 11:53:53 AM

Article has been viewed 1,024 times.

Options