LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string append scroll up

Solved!
Go to solution

Hello,

 

I have a string indicator where every time through a while loop I concatenate more data by making use of shift registers as shown in the simplified attachment.

 

The new data is added to the top of the indicator and old data is pushed down

 

Is there a way to have the new strings added to the bottom of the indicator and the older strings pushed up?  This would be more like a standard terminal window.

 

I'm using labview 8.2.

 

Thanks.

 

 

 

0 Kudos
Message 1 of 11
(7,046 Views)
You VI does append to the end of the string.
0 Kudos
Message 2 of 11
(7,034 Views)

i think in your case, you can't really distinguish between a text added at the bottom or at the top of your string because you use always the word "text" to add...as you programmed it, the text is added at the bottom of the string (that means the text in the loop is added to the bottom). Try to right-click your string indicator, choose "create property node" and the use a property node "text--Scroll position" to specify the position of your scroll bar...

 

hope this helps,

 

christian 


THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
0 Kudos
Message 3 of 11
(7,031 Views)
Perhaps you're looking to "auto-scroll" the string indicator? If so, you can use the Text.ScrollPosition property to keep moving the scroll bar to the end. Will make it annoying when someone tries to manually scroll, though. You can mitigate this by having a checkbox to enable/disable auto-scroll.
0 Kudos
Message 4 of 11
(7,022 Views)

Hmm.  I don't think I explained this very well.

 

I understand the additional string is being concatenated and added to the end of the bigger string.  What I'm trying to solve is how the data is displayed in the string indicator.

 

In the attached screen capture Current_1.jpg so you can see how the string starts at the top of the indicator. When additional strings are added, they are added at the top and the older text is pushed down.

 

The behavior I'd like is to have the newly concatenated string added to the bottom of the indicator and have the older text push upward.  I manipulated the jpg to show the desired result in the attached Desired_1.jpg.

 

Again this behavior is common in a windows command prompt window or in a unix shell.  The current, most recent line is at the bottom of the window and older entries move upward.

 

Thanks.

 

Download All
0 Kudos
Message 5 of 11
(7,004 Views)

It looks like you need a bottom justification which just isn't an option I can find.

 

What you could to is put some blank lines in your data, enough to fill the text indicator.  Then as you add new data, it will appear at the bottom.  With careful coding, you could keep track of how many blank lines you have and delete one from the top as you add new data to the bottom until you've removed all the blank lines and now have an indicator full of real data.

Message 6 of 11
(6,984 Views)
I've run into the same issue in the past.  The easiest way I've found is using the "text.scroll position" property of the text box.  Wire the number of lines to that property each time you add a new line to the box, and the scroll bar will move down to that line (the last line).
-------------------
Greg
Certifed LabVIEW Developer
0 Kudos
Message 7 of 11
(6,974 Views)
Solution
Accepted by topic author JohnSantaFe

Hey,

 

I just tried it and seems like what you want ... i did in for loop for testing ..

 

StringStack.JPG

 

Hope it helps

 

HS

0 Kudos
Message 8 of 11
(6,960 Views)

Thanks HS.  Nice solution to the problem.

 

That's the behavior I'm looking for.  Kind of a  strange way to get there.

0 Kudos
Message 9 of 11
(6,928 Views)

You can also do this using queues.

 

 

Message Edited by smercurio_fc on 06-02-2010 01:41 PM
Download All
Message 10 of 11
(6,909 Views)