LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display last 10 lines from string indicator

Hello,
I'm a begginer. I'm working on appliction, where I have a string indicator with concatenated messages. Each line ends with CRLF. I don't want to display all these messages on front panel, but only 10 last lines (10 new lines). How could I do that?

0 Kudos
Message 1 of 3
(2,503 Views)

If you can catch each line, then you can keep a buffer of the last 10 lines. If not, you can e.g. do like this:

last x lines.PNG

There are many ways of doing this and this code is not very efficient but should be simple to understand. (not attaching the code, you need to do something yourself :))

Certified LabVIEW Architect
Message 2 of 3
(2,455 Views)

Last 10.PNG

This works, but it's critical to know if all the lines (incl. the last one) end with \r\n or not.

 

If the string gets long (like the file) you'll need other strategies.

0 Kudos
Message 3 of 3
(2,439 Views)