Complete the following steps to read a double-precision, floating-point number from a binary file.
- Write to a binary file to create the .bin file you need to complete the following steps.
- Place the Read from Binary File function on the block diagram.
- Wire the data type of the logged data to the Read from Binary File function.
- Place a numeric constant on the block diagram.
- Wire the numeric constant to the data type input of the Read from Binary File function.
- 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.
- Right-click the data output of the Read from Binary File function and select Create»Indicator from the shortcut menu.
- Run the VI. In the dialog box that appears, select a binary file with a single floating-point value.
Refer to the Read Binary File VI in the labview\examples\file\smplfile.llb for an example of how to open and read an existing file stored as a double-precision array in binary form.