Complete the following steps to write a double-precision floating point number to a binary file. You also can write 1D or 2D data to a binary file.
Select the New File function on the Functions»File I/O»Advanced File Functions palette and place it on the block diagram.
Right-click the file path input of the New File function and select Create»Constant from the shortcut menu. An empty path constant appears.
Enter a path to a non-existent file in the file path constant. For example, C:\temp\example.
Select the Write File function on the Functions»File I/O palette and place it on the block diagram.
Wire the refnum output of the New File function to the refnum input of the Write File function.
Select a numeric constant on the Functions»Numeric palette and place it on the block diagram.
Wire the numeric constant to the data input of the Write File function.
Enter 1.23 into the numeric constant. LabVIEW changes the representation of the numeric constant to a double-precision floating-point number.
Select the Close File function on the Functions»File I/O palette and place it on the block diagram.
Wire the dup refnum output of the Write File function to the refnum input of the Close File function.
Run the VI. LabVIEW creates the file in the directory specified by file path and stores the 1.23 double-precision floating-point number in the file indicated in step 3.
After you write a double-precision floating-point number to a binary file, read the file.
Refer to the Write Binary File VI in the examples\file\smplfile.llb for an example of how the Write File function writes an array of double-precision floating-point values to a binary file.