Formats string, numeric, path, or Boolean data as text and writes the text to a file. Details
![]() |
format string specifies how to convert the input arguments. Defaults match the data type of the input arguments. Right-click the function and select Edit Format String from the shortcut menu to create and edit the format string. | ||||||
![]() |
input file can be a refnum or file path. If it is a refnum, this node opens the file specified by the refnum. The default is to display the Open File dialog box and prompt you to select a file. If the file does not already exist, it will be created. | ||||||
![]() |
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurs before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| ||||||
![]() |
input 1..n specifies the input parameters to be converted. Each input may be a string path, enumerated type, or any numeric. You cannot use arrays and clusters with this function. | ||||||
![]() |
output file refnum is the refnum of the file that the VI read. You can wire this output to another file function, depending on what you want to do with the file. The default is to close the file if it is referenced by a file path or selected from the Open File dialog box. If input file is a refnum, LabVIEW assumes that the file is still in use until you close it. | ||||||
![]() |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.
|
Increase the number of parameters by right-clicking the function and selecting Add Parameter from the shortcut menu or by resizing the function.
You can use this function to determine the order in which the data appears in the file. However, you cannot use this function to append data to a file. To do so, use the Format Into String function and Write Characters to File VI or Write File function.