Example Code

Binary Headers in Binary Files Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Demonstrates how to write and read from a binary file that makes use of header information above its data set.

 

Description

To read binary files you need to supply the information of the data type representation, normally a double or integer for the data, while the header should be a string. This example shows an easy way to add a string as a header to a binary file and still using an integer for the data.

 

Requirements

LabVIEW 2012 (or compatible)

 

 Steps to Implement or Execute Code

  1. Choose File Path for binary File
  2. Run the VI

Additional Information or References
VI Block Diagram

binaryheader.png

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.