@sixclear/labjack-ljm-acquisition
LabJack LJM Acquisition v1.0.0

Overview

The LabJack LJM Acquisition plugin acquires data from one or more channels spanning with options to display, log, and publish data. Currently supported channel types include analog and digital channels. All of the core data acquisition features are exposed including channel definition, sampling, buffer control, triggering, logging, and more.

This version also includes the ability to decimate the display data to enhance performance, especially for high speed acquisitions. Data can be published with an averaging or last value strategy, and several key points of sampling information are provided as variables to build up the desired publish data object. Publishing can of course be disabled if, for example, logging the data to disk (ex. TDMS) is all that is required.

Custom DAQmx scales are also supported. DAQmx scales transform the raw, acquired data according to the scale definition. For example, analog input voltage acquisition may have a scale applied to transform the acquired voltages into some other physical units, such as temperature. The scaled values are the values displayed and logged. All current DAQmx scale types are supported: Linear, Range Map, Polynomial, and Table.

Furthermore, this version allows explicitly defining TDMS file formats with a acquisition.logging.fileNameFormat option, and allows adding custom properties to those TDMS files at the file level. See the configuration documentation and the “New to Version 1.2” sections below, and/or the example editor for further details.

The published data is configurable and may contain any the following:

{
    "publishTime": 12348761.12345667,
    "dataTimestamp": 12348760.12345667,
    "data": [0.5, 0.75],
    "totalSamplesSoFar": 1000,
    "acquisitionComplete": false
}

The publishTime and dataTimestamp here are defined as the number of seconds elapsed since 12:00 a.m., Friday, January 1, 1904, Universal Time [01-01-1904 00:00:00]. The data array contains the latest sample from each of the channels acquired (so the above example must be for an acquisition which has 2 channels configured). The acquisitionComplete boolean indicates whether the acquisition is complete, which will only ever be true in the case of finite acquisitions.

Changing Logging State on the Fly

You can change the logging type on the fly, say, from Off to Log, using the Logging menu as shown in the screenshot below.

Adding Multiple Axes

You may define and display up to 6 y-axis scales (3 on each side of the graph) and assign which channel plots are associated with which y-axis scales. The y-axis scales are given names Left1, Left2, Left3, Right1, Right2, and Right3, which can be assigned in the plotProperties section to a given plot.

Here’s how 3 left axes may be configured in the display.graph.yAxes option`:

"yAxes": {
    "Left1": {
        "visible": true,
        "label": "Temperature 1",
        "format": "%.2f",
        "flipped": false,
        "min": 0.0,
        "max": 10.0,
        "increment": 1.0,
        "autoscale": "on"
    },
    "Left2": {
        "visible": true,
        "label": "Temperature 2",
        "format": "%.2f",
        "flipped": false,
        "min": 0.0,
        "max": 10.0,
        "increment": 1.0,
        "autoscale": "on"
    },
    "Left3": {
        "visible": true,
        "label": "Voltage",
        "format": "%.2f",
        "flipped": false,
        "min": 0.0,
        "max": 10.0,
        "increment": 1.0,
        "autoscale": "on"
    }
}

And here’s an example of the plotProperties showing how assign channels to plot against a given y-axis scale, where the names Inner Temp, Outer Temp, and Float Temp are the names provided for acquisition channels in the acquisition.channels configuration:

"plotProperties": {
    "Inner Temp": {
        "visible": true,
        "antiAlias": false,
        "pointStyle": "none",
        "lineStyle": "solid",
        "lineWidth": "1",
        "fillTo": "none",
        "interpolation": "linear",
        "lineColor": "auto",
        "pointColor": "auto",
        "yAxis": "Left1"
    },
    "Outer Temp": {
        "visible": true,
        "antiAlias": false,
        "pointStyle": "none",
        "lineStyle": "solid",
        "lineWidth": "1",
        "fillTo": "none",
        "interpolation": "linear",
        "lineColor": "auto",
        "pointColor": "auto",
        "yAxis": "Left2"
    },
    "Float Temp": {
        "visible": true,
        "antiAlias": false,
        "pointStyle": "none",
        "lineStyle": "solid",
        "lineWidth": "1",
        "fillTo": "none",
        "interpolation": "linear",
        "lineColor": "auto",
        "pointColor": "auto",
        "yAxis": "Left3"
    }
}

User Interface

The LabJack LJM Acquisition plugin interface is simple by design with a single graph showing current data according the configured acquisition. Parameters for the x-axis and y-axis are configurable and axes can be modified in real-time as well.

labjack ljm ai

Configuration Example


Configuration Details

ROOT object
This top level object holds all configuration information for this plugin.
Required: true
Default: (not specified; see any element defaults within)
options object
Configuration options specific to this plugin.
Required: true
Default: (not specified; see any element defaults within)
options.acquisition object
An object defining the acquisition.
Required: true
Default: (not specified; see any element defaults within)
options.acquisition.task object
The device properties.
Required: true
Default: (not specified; see any element defaults within)
options.acquisition.task.name string
The task name (any name you like).
Required: true
Default: "My Data"
options.acquisition.task.simulationMode boolean
Whether to run in simulation mode.
Required: true
Default: true
options.acquisition.task.deviceType enum (string)
The device type of the task.
Required: true
Default: "LJM_dtANY"
Enum Items: "T4" | "T7" | "T8" | "LJM_dtANY"
options.acquisition.task.connectionType enum (string)
The connection type of the task.
Required: true
Default: "LJM_ctANY"
Enum Items: "USB" | "Ethernet" | "WiFi" | "LJM_ctANY"
options.acquisition.task.deviceIdentifier string
The serial number (USB) or IP address (Ethernet or WiFi) of the device.
Required: true
Default: ""
options.acquisition.channels object
An object where keys are channel names and values are channel configuration objects.
Required: true
Default:
{
    "MyAnalogInput": {
        "physicalChannel": "AIN0",
        "terminalConfiguration": "Single-Ended",
        "settings": {
            "AIN0_RANGE": 10,
            "AIN0_RESOLUTION_INDEX": 0,
            "AIN0_SETTLING_US": 0
        }
    }
}
options.acquisition.channels.{[0-9a-zA-Z_ ]+} object
An object defining a channel configuration.
Required: false
Default: (not specified; see any element defaults within)
options.acquisition.channels.{[0-9a-zA-Z_ ]+}.physicalChannel string
A valid LJM channel name.
Required: false
Default: "AIN0"
options.acquisition.channels.{[0-9a-zA-Z_ ]+}.terminalConfiguration enum (string)
Specifies the physical connection type. Differential uses two physical channels and meaures the difference between a two-wire signal which will tend to reject noise. If you specify AIN0 for the differential channel, you must use the AIN0 pin as the positive input and AIN1 pin as the negative input when connecting your two-wire signal. More generally, channel AIN(n) must use pin AIN(n) for the positive terminal and must be paired with pin AIN(n+1) for the negative terminal. Notably, LJM requires that a property be set to specifically identify this negative terminal, even though it must follow the noted pattern. This plugin sets that property for you under the hood based on your channel configuration here.
Required: false
Default: "Single-Ended"
Enum Items: "Single-Ended" | "Differential"
options.acquisition.channels.{[0-9a-zA-Z_ ]+}.settings object
Valid LJM settings for the channel.
Required: false
Default: (not specified; see any element defaults within)
options.acquisition.sampling object
The acquisition task sampling properties.
Required: true
Default:
{
    "mode": "Continuous",
    "rate": 100,
    "readSamplesPerChannel": 100,
    "displayDecimationFactor": 1
}
options.acquisition.sampling.mode enum (string)
The acquisition mode, either Continous or Finite Samples.
Required: true
Default: "Continuous"
Enum Items: "Continuous" | "Finite Samples"
options.acquisition.sampling.rate number
The sampling rate to use specified in samples/second (Hz).
Required: true
Default: 100
options.acquisition.sampling.readSamplesPerChannel integer
The number of samples to grab on each underlying loop iteration (and this value also informs the buffer size unless explicitly specified otherwise).
Required: true
Default: 100
options.acquisition.sampling.displayDecimationFactor number
The decimation factor, or divide down factor, to apply before enqueueing data for display and publishing. This is useful for high-speed acquisitions where displaying all data is either untenable from a performance standpoint or there is more data than can be displayed given the width (in pixels) of the graph. Note that this value ONLY affects the data used to handle display and publishing; this value does NOT affect the stored/logged data (all data is logged/stored).
Required: true
Default: 1
options.acquisition.sampling.streamSettings object
Any additional valid LJM stream settings.
Required: false
Default:
{
    "STREAM_SETTLING_US": 0,
    "STREAM_RESOLUTION_INDEX": 0,
    "STREAM_BUFFER_SIZE_BYTES": 0
}
options.acquisition.logging object
The acquisition task logging properties..
Required: true
Default: (not specified; see any element defaults within)
options.acquisition.logging.fileOperation enum (string)
The open/create/replace operation to perform on files generated.
Required: true
Default: "Create or Replace"
Enum Items: "Open" | "Open or Create" | "Create or Replace" | "Create"
options.acquisition.logging.folderPath string
The file folder in which to generate the data files. Symbolic paths are allowed here (see framework documentation for details). The following variables are available for use here: @VAR{instanceName}, @VAR{timestamp}, @VAR{fileCount} (starts at 0 for the first file, counts up thereafter), @AVR{actualSamplingRate}, @VAR{actualSamplingPeriod}, and @VAR{acquisition} which contains the entire acquisition object meaning you can index out individual properties such as @VAR{acquisition.sampling.readSamplesPerChannel}.
Required: true
Default: "[Desktop]\\JADE_LOGS\\@VAR{instanceName}"
options.acquisition.logging.fileNameFormat string
The file name format to use when generating new files (if `enforceMaxSamplesPerFile` is true and the `maxSamplesPerFile` is exceeded). Symbolic paths are allowed here (see framework documentation for details). The following variables are available for use here: @VAR{instanceName}, @VAR{timestamp}, and @VAR{acquisition} which contains the entire acquisition object meaning you can index out individual properties such as @VAR{acquisition.sampling.readSamplesPerChannel}.
Required: true
Default: "AnalogInputData-@VAR{fileCount}.tdms"
options.acquisition.logging.mode enum (string)
"Off" means do not log, "Log" means log to file.
Required: true
Default: "Log"
Enum Items: "Off" | "Log"
options.acquisition.logging.enforceMaxSamplesPerFile boolean
Whether to generate new files after the specified maxSamplesPerFile, or to simply store all samples in the initial file.
Required: true
Default: false
options.acquisition.logging.maxSamplesPerFile integer
This only applies if enforceMaxSamplesPerFile is true. The maximum number of samples PER CHANNEL to store in a given file. New files will be generated if this threshold is reached. New files are created with the naming convention of _####.tdms, where #### starts at 0001 and increments automatically with each new file. For example, if the file specified is C:\MyData\data.tdms, the next file name used is C:\MyData\data_0001.tdms.
Required: true
Default: 1000000
options.acquisition.logging.tdmsFileCustomProperties object
An object where keys are property names and values are file-level properties to add to the TDMS file. Note that TDMS files have an inherent hierarchical structure as: file >> groups >> channels, where properties are allowed in theory by TDMS files at each of the three levels. This configuration option writes properties to the file level and all properties are serialized / stringified before writing. To avoid extra escape slashing in types such as objects, define the types of your properties here on an individual basis. For example, including the entire `acquisition.sampling` object in a single file-level property you could enter the following as a property value here `Object:( @VAR{acquisition.sampling} )`.
Required: true
Default:
{}
options.acquisition.logging.tdmsFileCustomProperties.{^.+$} stringbooleannumberintegerarrayobject
A property to include at the file-level of the TDMS files written over the life of the corresponding plugin instance.
Required: false
Default: ""
options.display object
An object defining properties of the plugin display.
Required: true
Default: (not specified; see any element defaults within)
options.display.enable boolean
Whether to enable the display / graph.
Required: true
Default: true
options.display.graph object
An object defining properties of the graph on the interface.
Required: true
Default: (not specified; see any element defaults within)
options.display.graph.label string
The label to put at the top of the graph.
Required: true
Default: "Data Graph"
options.display.graph.xAxis object
An object defining the graph's x-axis properties. There are three `kinds` allowed here: Samples (use %d for `format`), Relative Time (use %f or another numeric for `format` here), and Absolute Time (use absolute time syntax for `format` here such as %T - see docs for additional details).
Required: true
Default:
{
    "kind": "Samples",
    "format": "%d",
    "numSamples": 100,
    "autoscale": "off"
}
options.display.graph.xAxis::{Samples} object
An object defining the graph's x-axis properties.
Required: false
Default: (not specified; see any element defaults within)
options.display.graph.xAxis::{Samples}.kind enum (string)
The x-axis kind `Samples`.
Required: true
Default: "Samples"
Enum Items: "Samples"
options.display.graph.xAxis::{Samples}.format string
A string defining the x-axis format. Usually this is simply `%d`.
Required: true
Default: "%d"
options.display.graph.xAxis::{Samples}.numSamples number
The number of samples to display on x-axis intially.
Required: true
Default: 100
options.display.graph.xAxis::{Samples}.autoscale enum (string)
Whether to autoscale the x-axis. The value "on" autoscales on every update, "off" never autoscales, and "once" autoscales just once when data is first rendered.
Required: true
Default: "on"
Enum Items: "on" | "off" | "once"
options.display.graph.xAxis::{Relative Time} object
An object defining the graph's x-axis properties.
Required: false
Default: (not specified; see any element defaults within)
options.display.graph.xAxis::{Relative Time}.kind enum (string)
The x-axis kind `Relative Time` which displays time since the acquisition started, in seconds.
Required: true
Default: "Relative Time"
Enum Items: "Relative Time"
options.display.graph.xAxis::{Relative Time}.format string
A string defining the x-axis format. Usually this is something like `%.2f`.
Required: true
Default: "%.2f"
options.display.graph.xAxis::{Relative Time}.duration number
The duration, in seconds, to display initially on the x-axis.
Required: true
Default: 100
options.display.graph.xAxis::{Relative Time}.autoscale enum (string)
Whether to autoscale the x-axis. The value "on" autoscales on every update, "off" never autoscales, and "once" autoscales just once when data is first rendered.
Required: true
Default: "on"
Enum Items: "on" | "off" | "once"
options.display.graph.xAxis::{Absolute Time} object
An object defining the graph's x-axis properties.
Required: false
Default: (not specified; see any element defaults within)
options.display.graph.xAxis::{Absolute Time}.kind enum (string)
The x-axis kind `Absolute Time` which displays the actual date/time in the specified `format`.
Required: true
Default: "Relative Time"
Enum Items: "Absolute Time"
options.display.graph.xAxis::{Absolute Time}.format string
A string defining the x-axis format for absolute time. Usually this is something like %T or another absolute time format variant - see docs for additional details.
Required: true
Default: "%<%H:%M:%S>T"
options.display.graph.xAxis::{Absolute Time}.duration number
The duration, in seconds, to display initially on the x-axis.
Required: true
Default: 100
options.display.graph.xAxis::{Absolute Time}.autoscale enum (string)
Whether to autoscale the x-axis. The value "on" autoscales on every update, "off" never autoscales, and "once" autoscales just once when data is first rendered.
Required: true
Default: "on"
Enum Items: "on" | "off" | "once"
options.display.graph.yAxes object
An object containing the definition for the Y axes, where key names indicate the axis and values are objects with configuration for that axis. Six Y axes (key names here) are available : Left1, Left2, Left3, Right1, Right2, Right3. Lower numbers correspond to axis which display closer to the graph on either side (left or right) when multiple are shown.
Required: true
Default:
{
    "Left1": {
        "visible": true,
        "label": "Amplitude",
        "format": "%f",
        "flipped": false,
        "min": 0,
        "max": 10,
        "increment": 1,
        "autoscale": "on"
    }
}
options.display.graph.yAxes.{^Left1|Left2|Left3|Right1|Right2|Right3$} object
An object defining the graph's y-axis properties.
Required: false
Default: (not specified; see any element defaults within)
options.display.graph.yAxes.{^Left1|Left2|Left3|Right1|Right2|Right3$}.visible boolean
Whether to display the Y axis or not.
Required: true
Default: true
options.display.graph.yAxes.{^Left1|Left2|Left3|Right1|Right2|Right3$}.label string
The y-axis label to display.
Required: true
Default: "Amplitude"
options.display.graph.yAxes.{^Left1|Left2|Left3|Right1|Right2|Right3$}.format string
A string defining the y-axis format.
Required: true
Default: "%f"
options.display.graph.yAxes.{^Left1|Left2|Left3|Right1|Right2|Right3$}.flipped boolean
Whether to flip the y-axis (ex. if true, instead of rendering 0 on the bottom and 10 on the top of the y-axis, it would render 0 on the top and 10 on the bottom.
Required: true
Default: false
options.display.graph.yAxes.{^Left1|Left2|Left3|Right1|Right2|Right3$}.min number
The y-axis min value. This will be overridden if autoscale is not off.
Required: true
Default: 0
options.display.graph.yAxes.{^Left1|Left2|Left3|Right1|Right2|Right3$}.max number
The y-axis max value. This will be overridden if autoscale is not off.
Required: true
Default: 10
options.display.graph.yAxes.{^Left1|Left2|Left3|Right1|Right2|Right3$}.increment number
The y-axis increment used to display y-axis tick marks.
Required: true
Default: 1
options.display.graph.yAxes.{^Left1|Left2|Left3|Right1|Right2|Right3$}.autoscale enum (string)
Whether to autoscale the y-axis. The value "on" autoscales on every update, "off" never autoscales, and "once" autoscales just once when data is first rendered.
Required: true
Default: "on"
Enum Items: "on" | "off" | "once"
options.display.graph.palette object
An object defining properties for the graph palette.
Required: true
Default: (not specified; see any element defaults within)
options.display.graph.palette.initialTool enum (string)
Sets the initial active tool for the graph palette. Valid options: `Selection Cursor`, `Panning Tool`, `Zoom to Rectangle`, `Zoom X`, `Zoom Y`, `Zoom To Fit`, `Zoom Out At Point`, and `Zoom In At Point`. The graph palette is manually accessible just above the graph, where the active tool can also be changed at any time.
Required: true
Default: "Zoom X"
Enum Items: "Selection Cursor" | "Panning Tool" | "Zoom to Rectangle" | "Zoom X" | "Zoom Y" | "Zoom To Fit" | "Zoom Out At Point" | "Zoom In At Point"
options.display.horizontalLines array
An array of horizontal line definitions.
Required: true
Default:
[]
options.display.horizontalLines[n] object
A horizontal line definition
Required: false
Default: (not specified; see any element defaults within)
options.display.horizontalLines[n].name string
The name of the horizontal line. This shows up in the plot legend on the front panel waveform chart.
Required: true
Default: "My Horizontal Line"
options.display.horizontalLines[n].yValue number
The y-value of the horizontal line.
Required: true
Default: 10
options.display.horizontalLines[n].yAxis enum (string)
The yAxis with which to associate the plot. Must be one of: Left1, Left2, Left3, Right1, Right2, Right3. Lower numbers correspond to axis which display closer to the graph on either side (left or right) when multiple are shown. If not provided, the yAxis value will default to Left1.
Required: false
Default: "Left1"
Enum Items: "Left1" | "Left2" | "Left3" | "Right1" | "Right2" | "Right3"
options.display.plotProperties object
An object where keys are plot names (form the acquisition.channels or horizontalLines definitions) and the values are objects with plot display properties.
Required: true
Default:
{}
options.display.plotProperties.{^.+$} object
An object defining the plot properties.
Required: false
Default: (not specified; see any element defaults within)
options.display.plotProperties.{^.+$}.visible boolean
Whether the plot is visible in the chart.
Required: true
Default: true
options.display.plotProperties.{^.+$}.antiAlias boolean
Whether the apply antiAliasing when rendering the plot.
Required: true
Default: true
options.display.plotProperties.{^.+$}.pointStyle enum (string)
The point style to use for the plot.
Required: true
Default: "circleFull"
Enum Items: "none" | "circleEmpty" | "circleFull" | "circleFullDot" | "circleEmptyDot" | "squareEmpty" | "squareFull" | "squareFullDot" | "squareEmptyDot" | "squareFullSmall" | "dot" | "cross" | "crossSmall" | "X" | "x" | "diamondFullDot" | "squareEmptySmall"
options.display.plotProperties.{^.+$}.lineStyle enum (string)
The line style to use for the plot.
Required: true
Default: "solid"
Enum Items: "solid" | "dash" | "dot" | "dashdot" | "dashdotdot"
options.display.plotProperties.{^.+$}.lineWidth enum (string)
The line width to use for the plot.
Required: true
Default: "1"
Enum Items: "0" | "1" | "2" | "3" | "4" | "5"
options.display.plotProperties.{^.+$}.fillTo enum (string)
The color fill approach to use for the plot. For example, "below" would apply the line color to the area below the plot in the chart.
Required: true
Default: "none"
Enum Items: "none" | "zero" | "below" | "above"
options.display.plotProperties.{^.+$}.interpolation enum (string)
The interpolation strategy to apply between points.
Required: true
Default: "none"
Enum Items: "none" | "stepwiseVertical" | "linear" | "stepwiseHorizontal" | "stepwiseHorizontalCentered" | "stepwiseVerticalCentered"
options.display.plotProperties.{^.+$}.lineColor objectstring
The color to use for the plot line specified as an RGB value. Specify this as either a string `auto` or an object with `r`, `g`, and `b` values.
Required: true
Default: "auto"
options.display.plotProperties.{^.+$}.pointColor objectstring
The color to use for plot points specified as an RGB value.
Required: true
Default: "auto"
options.display.plotProperties.{^.+$}.yAxis enum (string)
The yAxis with which to associate the plot. Must be one of: Left1, Left2, Left3, Right1, Right2, Right3. Lower numbers correspond to axis which display closer to the graph on either side (left or right) when multiple are shown. If not provided, the yAxis value will default to Left1.
Required: false
Default: "Left1"
Enum Items: "Left1" | "Left2" | "Left3" | "Right1" | "Right2" | "Right3"
options.display.description object
Defines how the description string on the interface will display, including its text, height in lines, justification, and font properties.
Required: true
Default:
{
    "text": "Acquisition Rate: @VAR{acquisition.sampling.rate} Hz",
    "height": 2,
    "justify": "Left",
    "font": {
        "name": "App Font",
        "size": 15,
        "bold": false,
        "italic": false,
        "underline": false,
        "strikethrough": false,
        "color": {
            "r": 0,
            "g": 0,
            "b": 0
        }
    }
}
options.display.description.text string
The text to render in the description string on the interface. This can use any acquisition configuration options with variables such as `@VAR{acquisition.sampling.rate}`.
Required: true
Default: "Acquisition Rate: @VAR{acquisition.sampling.rate} Hz"
options.display.description.height integer
The height of the description section in lines. The minimum is 1.
Required: true
Default: 0
options.display.description.justify enum (string)
The justification orientation of the text. One of: Left, Center, Right.
Required: true
Default: "Left"
Enum Items: "Left" | "Center" | "Right"
options.display.description.font object
Defines the font properties used to display the description text.
Required: true
Default:
{
    "name": "App Font",
    "size": 15,
    "bold": false,
    "italic": false,
    "underline": false,
    "strikethrough": false,
    "color": {
        "r": 0,
        "g": 0,
        "b": 0
    }
}
options.display.description.font.name string
The name of the font to apply. The available font names depend on the fonts installed with your operating system. For example, `Arial` is often an installed font and should work here.
Required: false
Default: "App Font"
options.display.description.font.size integer
The size of the font in pixels.
Required: false
Default: 0
options.display.description.font.bold boolean
Whether to bold the font.
Required: false
Default: false
options.display.description.font.italic boolean
Whether to italicize the font.
Required: false
Default: false
options.display.description.font.underline boolean
Whether to underline the font.
Required: false
Default: false
options.display.description.font.strikethrough boolean
Whether to strike through the font.
Required: false
Default: false
options.display.description.font.color object
The font color defined as r, g, b.
Required: false
Default: (not specified; see any element defaults within)
options.display.description.font.color.r integer
The red component of the RGB color definition.
Required: false
Default: 100
options.display.description.font.color.g integer
The green component of the RGB color definition.
Required: false
Default: 100
options.display.description.font.color.b integer
The blue component of the RGB color definition.
Required: false
Default: 100
options.publishing object
An object defining if and how the plugin publishes data.
Required: true
Default: (not specified; see any element defaults within)
options.publishing.enable boolean
Whether to enable publishing.
Required: true
Default: false
options.publishing.strategy enum (string)
Whether published data should be the Average or simply the Last Value (for each channel specified, of course, and applies to the number of samples read per loop iteration).
Required: true
Default: "Last Value"
Enum Items: "Average" | "Last Value"
options.publishing.messageFormat object
An object defining the published message format, if publishing is enabled. Several variables are available for use in constructing the published message in a VAR variable container: instanceName (the name of the plugin instance), readSamplesPerChannel (the number of samples read each loop iteration), specifiedSamplingRate (the specified sampling rate), actualSamplingRate (the actual achieved sampling rate in hardware), actualSamplingPeriod (the actual achieved sample period), publishTime (the timestamp that the current message was published), thisFirstSampleTime (the timestamp of the first sample in 'data'), data (the data for each channel - either the average of the number of samples or the last value depending on 'strategy'), totalSamplesSoFar (the total samples acquired thus far for the current acquisition), and acquisitionStartTime (the time the acquisition started). Note that timestamps are the number of seconds elapsed since 12:00 a.m., Friday, January 1, 1904, Universal Time [01-01-1904 00:00:00]
Required: true
Default: (not specified; see any element defaults within)
options.publishing.messageFormat.{^.+$} arraybooleanintegernumberobjectstring
An element of data to publish.
Required: false
Default:
[]
options.logger object
Defines the standard logger for this plugin. Note that a LOG variable space is provided here, as well as the VAR variable space. Available variables are: @LOG{LOGGERNAME}, @LOG{TIMESTAMP}, @LOG{LOGMESSAGE}, @LOG{ERRORMESSAGE}, @VAR{instanceName}, @VAR{timestamp}, and @VAR{acquisition} which contains the entire acquisition object meaning you can index out individual properties such as @VAR{acquisition.sampling.readSamplesPerChannel} are available variables. Note: @LOG{LOGGERNAME} is equal to the @VAR{instanceName} here.
Required: true
Default: (not specified; see any element defaults within)
options.logger.Enable boolean
Whether to enable the logger.
Required: true
Default: true
options.logger.Start enum (string)
When to start logging.
Required: false
Default: "Immediate"
Enum Items: "Immediate" | "User"
options.logger.LogFolder string
The folder in which to write log files.
Required: true
Default: "\\JADE_LOGS\\@VAR{instanceName}"
options.logger.FileNameFormat string
The filename to use when creating log files. Note: if the filesize limit is reached new files will be created with enumerated suffixes such as: MyLogFile-1.txt, MyLogFile-2.txt, etc.
Required: true
Default: "@VAR{instanceName}-@LOG{TIMESTAMP}.log"
options.logger.ErrorsOnly boolean
Whether to log only errors.
Required: true
Default: true
options.logger.DiskThrashPeriod integer
The period in milliseconds with which to flush the file buffer to ensure it's committed to the hard drive. Note: This is a performance consideration to prevent writing to disk too frequently.
Required: true
Default: 1000
options.logger.FileSizeLimit integer
The file size at which to create new files.
Required: true
Default: 1000000
options.logger.StartLogFormat string
The initial string to put into the log file when opened for the first time.
Required: true
Default: "**** START LOGGER - @LOG{LOGGERNAME} (@LOG{TIMESTAMP}) ****"
options.logger.EndLogFormat string
The final string to put in the log file when closed.
Required: true
Default: "\n\n**** END LOGGER - @LOG{LOGGERNAME} (@LOG{TIMESTAMP}) ****"
options.logger.LogEntryFormat string
The format to use when writing log entries when errors are not present.
Required: true
Default: "\n\n@LOG{LOGMESSAGE}"
options.logger.ErrorLogEntryFormat string
The message format used to construct error log entries.
Required: true
Default: "\n\n@LOG{ERRORMESSAGE}"
options.logger.TimestampFormat string
The format used by the @LOG{TIMESTAMP} variable.
Required: true
Default: "%Y-%m-%d %H-%M-%S%3u"
panel object
Required: true
Default: (not specified; see any element defaults within)
panel.open boolean
Whether to open the front panel immediately when run.
Required: true
Default: true
panel.state enum (string)
The state in which the window will open.
Required: true
Default: "Standard"
Enum Items: "Standard" | "Hidden" | "Closed" | "Minimized" | "Maximized"
panel.transparency integer
The transparency of the window. 0 = opaque, 100 = invisible.
Required: true
Default: 0
panel.title string
The title of the plugin window when it runs. Note that the variable 'instanceName' is provided here in a VAR variable container.
Required: true
Default: "@VAR{instanceName}"
panel.titleBarVisible boolean
Whether the window title bar is visible.
Required: true
Default: true
panel.showMenuBar boolean
Whether the menu bar is visible.
Required: true
Default: true
panel.showToolBar boolean
Whether the toolbar is visible.
Required: true
Default: false
panel.makeActive boolean
Whether the window becomes active when opened.
Required: true
Default: false
panel.bringToFront boolean
Whether the window is brought to the front / top of other windows when opened.
Required: true
Default: false
panel.minimizable boolean
Whether the window is minimizable.
Required: true
Default: true
panel.resizable boolean
Whether the window is resizable.
Required: true
Default: true
panel.closeable boolean
Whether the window is closeable.
Required: true
Default: true
panel.closeWhenDone boolean
Whether to close the window when complete.
Required: true
Default: true
panel.center boolean
Whether to center the window when opened. Note: this property overrides the 'position' property.
Required: true
Default: false
panel.position object
The position of the window when opened the first time.
Required: true
Default: (not specified; see any element defaults within)
panel.position.top integer
The vertical position of the window in pixels from the top edge of the viewport. Note: this property is overriden by the 'center' property.
Required: true
Default: 100
panel.position.left integer
The horizontal position of the window in pixels from the left edge of the viewport. Note: this property is overriden by the 'center' property.
Required: true
Default: 100
panel.size object
The size of the window when opened the first time.
Required: false
Default: (not specified; see any element defaults within)
panel.size.width integer
The width of the window in pixels. -1 means use the default width for the panel. Note that depending on panel features exposed, there may be a limit to how small a panel can become.
Required: true
Default: -1
panel.size.height integer
The height of the window in pixels. -1 means use the default height for the panel. Note that depending on panel features exposed, there may be a limit to how small a panel can become.
Required: true
Default: -1
channel object
The communication channel definition used by this plugin. Note: this section rarely needs modifications. In many cases, the underlying plugin implementation depends on at least some of these settings having the values below. Consult with a JADE expert before making changes to this section if you are unfamiliar with the implications of changes to this section.
Required: true
Default: (not specified; see any element defaults within)
channel.SendBreakTimeout integer
The timeout duration in milliseconds to wait for sending messages.
Required: true
Default: 1000
channel.WaitOnBreakTimeout integer
The timeout duration in milliseconds to wait for receiving messages. Note: -1 means wait indefinitely or until shutdown is signalled.
Required: true
Default: -1
channel.WaitOnShutdownTimeout integer
The timeout duration in milliseconds to wait for shutdown acknowledgment.
Required: true
Default: 2000
channel.ThrowTimeoutErrors boolean
Whether to throw timeout errors vs simply returning a boolean indicating whether a timeout occurred.
Required: true
Default: false
channel.ThrowShutdownUnacknowledgedErrors boolean
Whether to throw 'shutdown unacknowledged' errors.
Required: true
Default: true
channel.QueueSize integer
The size of the underlying communication queue in bytes. Note: -1 means unbounded (i.e. grow as needed with available memory).
Required: true
Default: 100
channel.SendBreakEnqueueType enum (string)
The enqueue strategy employed on the underlying queue for standard messages.
Required: true
Default: "LossyEnqueue"
Enum Items: "Enqueue" | "EnqueueAtFront" | "LossyEnqueue" | "LossyEnqueueAtFront"
channel.SendErrorEnqueueType enum (string)
The enqueue strategy employed on the underlying queue for error messages.
Required: true
Default: "LossyEnqueue"
Enum Items: "Enqueue" | "EnqueueAtFront" | "LossyEnqueue" | "LossyEnqueueAtFront"
channel.SendShutdownEnqueueType enum (string)
The enqueue strategy employed on the underlying queue for the shutdown message.
Required: true
Default: "LossyEnqueueAtFront"
Enum Items: "Enqueue" | "EnqueueAtFront" | "LossyEnqueue" | "LossyEnqueueAtFront"
channel.FlushQueueBeforeWaitingOnBreak boolean
Whether to flush the queue upon waiting for new messages (i.e. whether to clear the queue and wait for the next 'new' message; this has the effect of removing old messages and waiting for the next message.
Required: true
Default: false
channel.FlushQueueAfterBreaking boolean
Whether to flush the queue after receiving a new message (i.e. whether to handle the next message coming in the queue and then flush; this has the effect of handling the oldest message (if it exsits) or the next message before flushing the queue.
Required: true
Default: false