09-11-2009 01:07 PM
Hi,
I think I asked similar question before, but since then my program got more complicated.
Here is my issue.
I have a program with nested loops to print out the stream of strings in subVI
and it needs to be updated in a string indicator in mainVI.
When I say "update", it needs to be updated as it comes out line by line, not by
the block when the loop is finished.
I was not successful doing this by both shift register or RefNum.
Maybe I do not know the advance usage these two.
So can someone show me how?
I have attached simplified version of my labview program.
Thank you in advance!!!
Solved! Go to Solution.
09-11-2009 01:23 PM
09-11-2009 01:31 PM
09-11-2009 01:40 PM
Hi,
First thanks for replying to my post.
Basically you have fixed the locals in my code, but the behavior is same
as before.
This does not solve my issue here.
For each loop count I want to see the string indicator to be updated with previous data.
For example
1st loop in string indicator in MainVI
SubVIloop1#: 0
2nd loop in string indicator in MainVI
SubVIloop1 #: 0
SubVIloop1 #: 1
3rd loop in string indicator in MainVI
SubVIloop1 #:0
SubVIloop1 #:1
SubVIloop1 #:2
and so on.
Any idea to fix this way?
09-11-2009 01:42 PM - edited 09-11-2009 01:43 PM
09-11-2009 01:53 PM
Hi,
Are you saying I need to use both shift and refnum together
to get the real time string update in MainVI string indicator?
Or are you suggesting just to use shift register?
Because as I told you on first post, I tried the shift register,
I know I can keep the previous data with shift register,
but it doesn't print out the string line by line, instead it prints
whole loops as a blook. This is not way I want to print.
I need something in real time as the string comes out from lowest loop in SubVI
and print in MainVI string indicator.
Thanks for keep up with me.
09-11-2009 02:14 PM
09-11-2009 02:55 PM
instead it prints
whole loops as a blook.".............can show some data how it is getting displayed?
use shift register and refnum or global ..........when u r concatenating strings..........are you using End Of Line contant in between?...
09-15-2009 01:06 PM
Hi,
Now I was able to print out the data in real time using RefNum and concatenate string,
but there is some drawback in performance.
Compare to shift register above scheme is very slow.
When I used the shift register, the single test time took 14 seconds, but with RefNum,
it is taking 20 seconds.
Even though the shift register is faster, but I can not figure out the print in real time.
So I have two questions.
1. When you handle the text string in real time, what do you think is the fastest method?
2. How come in shift register implementation in subVI does not update text stream in
main VI?
thank you