Hi Andy,
There are 3 main file formats that you can consider writing your data out to in LabVIEW:
ASCIIASCII files are useful because every operating system and almost every application can read/write ASCII format files. Use ASCII files when:
- Other users or applications will need to access the data file.
- You will not need to perform random access file I/O
- File I/O speed is not crucial
- Disk space is not crucial
Examples within LabVIEW Example Finder: Fundamentals >> File Input and Output >> Write to Text File.vi and Read from Text File.vi
BinaryBinary byte stream files are more specific to data storage and retrieval. Use b
inary files when:
- File I/O will remain in LabVIEW only -- no other applications will be needing to write/read that file. There is no standard formatting for binary files and thus other applications or operating systems may be unable to read the file.
- Files are smaller than ASCII files
- Easier and faster random access to data
Examples within LabVIEW Example Finder: Fundamentals >> File Input and Output >> Write Binary File.vi and Read Binary File.vi
DatalogWhen to use datalog:
- If you need to record data with a mixture of types, it can be cumbersome to convert everything to ASCII or to keep track of the binary formatting.
- Datalog format is binary and internal to LabVIEW, so again only use this format if no other applications or operating systems will be needing to perform file I/O on the file.
Examples within LabVIEW Example Finder: Fundamentals >> File Input and Output >> Write Datalog File
Example.vi and Read Datalog File Example.vi
Good luck!
Kileen C.
Applications Engineer
National Instruments