LabVIEW 2018 Help
View Product Info
DOWNLOAD (Windows Only)
Complete the following steps to write a double-precision, floating-point number to a binary file.
- Add the Write to Binary File function to the block diagram.
- Wire the data you want to write to the binary file.
You also can wire an array to the binary file.
- Add a numeric constant to the block diagram.
- Wire the numeric constant to the data input of the Write to Binary File function.
- Enter 1.23 into the numeric constant. LabVIEW changes the representation of the numeric constant to a double-precision, floating-point number.
- Run the VI.
- In the dialog box that appears, create a name for the file, such as number.bin.
LabVIEW creates the file in the directory specified by the file input and stores the double-precision, floating-point number in the file.
After you write to a binary file, you can read the binary file.
Refer to the Simple Binary File project in the labview\examples\File IO\Binary\Simple Binary directory for an example of how the Write to Binary File function writes an array of double-precision, floating-point values to a binary file.