How to Read Raw Binary Data from WebDAV Get Buffer.vi into LabVIEW

Updated Aug 28, 2019

Reported In

Hardware

  • CompactRIO Controller

Software

  • LabVIEW

Operating System

  • Windows

Issue Details

I want to load the contents of a TDMS file stored on CompactRIO into LabVIEW on my PC. And I want to load them in memory instead of downloading a TDMS file from CompactRIO to my PC. So I was able to load the contents of the TDMS file into LabVIEW on my PC using WebDAV Get Buffer.vi instead of WebDAV Get File.vi. However, the output data type of WebDAV Get Buffer.vi is raw binary data. I'm not sure how to read this raw binary data in TDMS format.

Solution

There are various ways to convert raw binary data in LabVIEW. However, the most commonly used method is to use Type Cast node. It is also recommended to use the TDMS In Memory APIs to read the raw binary data in TDMS format.

The below sinppet is an example code of LabVIEW showing raw binary data output from WebDAV Get Buffer.vi using the TDMS In Memory Open.vi and Type Cast node functions in TDMS format.


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 diagram.

This example code's is like below.

Additional Information

Ensure that the type of Type Cast node matches the input type of TDMS In Memory Open.vi.