Change Datatype of MDF4 Dataplugin

Updated Mar 28, 2023

Reported In

Software

  • LabVIEW

Issue Details

When I use MDF4 Dataplugin which is installed from this site , I noticed that stored data type is always double. Is it possible to change this data type to the other (for example, integer) ?

Solution

It is possible to change datatype of stored data when you use MDF4 Dataplugin. See the following snippet. You can implement this snippet into your vi.


Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW block diagram.
 

In order to change data type, you should

  • Set additional parameters as <nativedatatype>true</nativedatatype>
  • Set available Value.

Each value represents different datatype. Please refer to the following table.
 

ValueDatatype
1U8
2I16
3I32
4I64
5R32 (double)
6R64 (long)
7Time
8String
11U64
12U32
13U16
14I8