Writing Channel Data from a Plug-In to FlexLogger

Plug-ins created from the Produce data for FlexLogger template send collected data to FlexLogger. Use the Produce data for FlexLogger template as a starting point for creating your own plug-ins that send channel data to FlexLogger.


Block diagram of the flow of data from a third party data aquisition device to the Produce Data for FlexLogger Plug-in to the FlexLogger Application.

To create a channel that sends data to FlexLogger, select the Produced by Plugin mode in Create Channel VI. The Create Channel VI is in the Initialize method of the Produce data for FlexLogger template.


Screenshot of the Create Channel VI with Produced by Plugin mode selected.

You can write string data or waveform data to a FlexLogger channel. To write string data, specify 1D String (NChan 1 Sample) as the data type in the Write Data VI. The Write Data VI is in the Process method of the Produce data for FlexLogger template.


Screenshot of the Write Data VI within the Produce data for FlexLogger plug-in template with 1D String (NCHan 1 Sampe) mode selected.

When writing strings, you can optionally specify the time stamp at which the string is written. If you don't specify a time stamp, the VI will use the current time as the time stamp for when the string is written. The following image shows all of the inputs and outputs for the Write Data VI.


Screenshot of the Write Data VI contextual help showing all the inputs and outputs.

To send waveform data, specify either a one or two-dimensional array of doubles.


Screenshot of the Write Data VI with 1D DBL (NChan NSample) mode selected.


Screenshot of the Write Data VI with 2D DBL (NChan NSample) mode selected.

Writing waveforms that overlap in time disrupts visualization and logging capabilities of FlexLogger. The Produce data for FlexLogger template uses the Set Stream Timing VI to send data to FlexLogger without overlap errors. The Set Stream Timing VI is in the Configure Session method and defines the waveform dt and Start Time timing parameters.


Screenshot of the Set Stream Timing VI.

Since the Configure Session method always executes before the Process method, the timing information for the output channel updates after every configuration change.