12-21-2015 01:49 AM
Refer the attched VI ( LV2012)
Data arrives at the input buffer to this VI once every second.
With the setup as I have I am able to see it but only for a second and then a new ones comes.in. I tried concatenating but that works till only the visible range of the indicator I have.
What I need is an auto scrolling indicator that adds a vertical scroll bar the moment the values go out of the lower edge of the indicator.
Any ideas ?
Solved! Go to Solution.
12-21-2015 02:10 AM
Hi Raghu,
I tried concatenating but that works till only the visible range of the indicator I have.
There is no concatenation in your current VI - no wonder you only see the latest value until a new one comes in!
What I need is an auto scrolling indicator that adds a vertical scroll bar the moment the values go out of the lower edge of the indicator.
At first you need to concatenate new values to the old ones.
When there are more than 8 (adjustable) lines of strings you could enable the scrollbar of the string indicator. And you can even set the scroll position of the scroll bar - it's all done using property nodes of that string indicator!
Btw: Concatenating new strings in front of the old ones enables your user to see the most recent values instantly…
Moreover: when enabling the TermChar for a serial communication you should get rid of BytesAtPort!
12-21-2015 06:03 AM
Yes its working now after I brought in the changes suggested by you. Actually the point regarding adding the current value in "front" of the earlier value did the trick - earlier while concatenating i did it "after " the earlier one and so very soon the updates fell out of the indicator ! In fact with this done, I dont even need a scroll bar to view as the new data keeps pushing the old data down !
Anyway I brought in the scroll bar to be able to view past history.
Only thing, if I remove the "Bytes at buffer" it still works but i loose some characters particularly more in the begining of the init process. And the it gets tricky to stop the loop at times...
Since I am not "waiting" to get all the bytes at the buffer, i am running it in a non blocking mode and there is no problem with this approach.
Of course my constant fed into the Read function should be always more than expected bytes not to loose any bytes !!
Thanks Gerd.
12-21-2015 06:19 AM
GerdW wrote:
Moreover: when enabling the TermChar for a serial communication you should get rid of BytesAtPort!
I would say the OP is actually using the Bytes At Port correctly in this case. It is just used to see if a message has even started to come in. If not, wait and check again. If there is any data, then the large constant will allow the termination character to be used. This is a good setup for sporatic messages.