LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

text output using string indicator from subVI to mainVI

Solved!
Go to solution

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!!!

0 Kudos
Message 1 of 9
(4,635 Views)

Hi horanyee,

 

you should try to avoid locals when not explicitly needed...

 

For me the string is shown in the main vi.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(4,627 Views)
Is the end result what you want?  You just want it to be updating the indicator on the MainVI as it is doing it, but the updates are not looking like the end result.  Is that the issue?
0 Kudos
Message 3 of 9
(4,622 Views)

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?

 

 

0 Kudos
Message 4 of 9
(4,617 Views)
Solution
Accepted by topic author horanyee

Hi horanyee,

 

use some standard shift registers to achieve your goal... They will keep the previous valu so you can ad the new line!

Message Edited by GerdW on 09-11-2009 08:43 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 9
(4,614 Views)

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.

 

 

0 Kudos
Message 6 of 9
(4,609 Views)
Aren't these the same questions you were asking in this thread?
0 Kudos
Message 7 of 9
(4,588 Views)
"

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?...

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 8 of 9
(4,579 Views)

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

0 Kudos
Message 9 of 9
(4,536 Views)