LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NXG

I am streaming data using "VISA continuous read write" slightly modified. I am getting data but it is loading the data into an endless list. How do you change the program so you see the most recent sample? I found a "Scroll to End" function - but i cannot find any documentation anywhere non how to use it.

0 Kudos
Message 1 of 2
(1,688 Views)

You will notice in most of the forum posts that it's better if you share with us what you have tried and the code you're looking at. You mention it is a modified example, perhaps post a snippet of it for us to see?

 

I *assume* that you are doing string concatenation from whatever is arriving in the VISA Read. In this case, your indicator would be scrolled up and your new information will be in the bottom. If this is the case, you can either concatenate from the beginning so new strings come up from the top or use the Scroll to End function, which takes the string indicator reference and performs the scrolling operation to the indicator:

 

Concatenate and Scroll.png

 

 

 

Note how I use a sequence structure to ensure, through dataflow, that I scroll to the bottom after I have updated the value in the indicator. This ensures that the scroll down happens after I have written new information to the indicator.

 

As a side note, I don't recommend using this approach in a deployment application because that concatenated string will keep filling up the application's memory until it reaches a point where LabVIEW runs out of memory and the applications stops working. If you need to persist all messages arriving to your software, consider logging them to a file. Else, consider limiting your string to a size (or switch to an array where you can add and remove elements easily) to handle how much information you leave in LabVIEW's memory.

 

All the best,

0 Kudos
Message 2 of 2
(1,646 Views)