To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example creates the function that will easily read defined number of lines counting from the end of text file.
Description
Recently someone asked if there is a function in LabVIEW that allow user to read defined number of lines counting from the end of file. Unfortunately there is not. Reading large file from the start is not a good idea so I decided to create function that will easily read lines from the end of text file.
This function reads as many lines as requested (of course not more than file has). Also I have added distinction between ANSI and Unicode files. This VI can read both without any problems.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
The Poem.txt in the ZIP file just a testing file for the example, you can specify an text file you want to read.
If you have any suggestions please ask.
Enjoy!
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.