Reading from Binary Files

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2015 Help
LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help

Complete the following steps to read a double-precision, floating-point number from a binary file.

  1. Write to a binary file to create the .bin file you need to complete the following steps.
  2. Add the Read from Binary File function to the block diagram.

     

  3. Wire the data type of the logged data to the Read from Binary File function.
    1. Add a numeric constant to the block diagram.



    2. Wire the numeric constant to the data type input of the Read from Binary File function.
    3. Enter 0.0 into the numeric constant to inform LabVIEW that the data type you want to read is a double-precision, floating-point number.
    You also can wire an array to the Read from Binary File function.
  4. Right-click the data output of the Read from Binary File function and select Create»Indicator from the shortcut menu.
  5. Run the VI. In the dialog box that appears, select a binary file with a floating-point value.

Refer to the Preallocated Read from Binary File function for information about reading binary data and placing it into a pre-allocated array without incurring a copy.

Refer to the Simple Binary File project in the labview\examples\File IO\Binary\Simple Binary directory for an example of how to open and read an existing file stored as a double-precision array in binary form.

WAS THIS ARTICLE HELPFUL?

Not Helpful