LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

concat strings from different subdiagrams of a case structures

Solved!
Go to solution

I am using a case structure, which has about 8-10 different case and each case has a string constant. I want to show the strings in a single indicator. Suppose if 3 cases runs first then second and then third. Then the indicator should show

" first case

  second case

  third case"

initially indicator should be empty then as soon as the first case runs indicator should show " first case"

after finishing the first case when second case runs then the indicator should show

"first case

 second case"

and so on..Please help me.

0 Kudos
Message 1 of 6
(2,772 Views)

Place your string in a shift register (initialized with an empty string) and append the relevant text (incl linefeed) with each iteration. Place an indicator on the concatenated string.

0 Kudos
Message 2 of 6
(2,768 Views)

Here it is attached with 3 cases........

0 Kudos
Message 3 of 6
(2,752 Views)
Solution
Accepted by topic author tanump1112

@$agar wrote:

Here it is attached with 3 cases........


Well, that does not look very useful. Try to scale it to 10 booleans! 😮

 

 

Here is a quick draft how it could be done. Modify as needed.

Message 4 of 6
(2,737 Views)

thanks 

in this solution the indicator is inside the loop.

how can we show the same thing outside the loop, because this vi will be my subvi so i have to pass this to another vi i.e. main vi. and in main vi there will be a string indicator and in that i have to show this.

please reply....

0 Kudos
Message 5 of 6
(2,701 Views)

tanump1112 wrote:

in this solution the indicator is inside the loop.

how can we show the same thing outside the loop, because this vi will be my subvi so i have to pass this to another vi i.e. main vi. and in main vi there will be a string indicator and in that i have to show this.


Please attach a simplified version of your code, showing how you call the subVI and what parts of the code are in the subVI.

 

Easiest would be to design a small subVI as an action engine that stores the accumulated string in an uninitialized shift register. It would take the new string as input and return the concateneated string as output. You would need a few more modes, e.g. init, read, write, etc.

Message 6 of 6
(2,685 Views)