Complete the following steps to write to a text file.
- Add a string control to the front panel window.
- Enter into the string control the text that you want to write to the text file.
- Add the Write to Text File function to the block diagram.
- Wire an absolute path to the file (use dialog) input of the Write to Text File function.
- Wire the string control to the text input of the Write to Text File function.
- Run the VI. The VI writes the text from the front panel window string control to the file wired to the file (use dialog) input.
After you write to a text file, read the file.
Refer to the Write to Text File VI in the labview\examples\file\smplfile.llb for an example of writing a text spreadsheet of simulated acquired data to a file.