LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

for loop with stdout of all iterations

Solved!
Go to solution
Highlighted

Hi

 

I have a for loop which calls an external script. The external script writes something to stdout. I'd like to see the stdout. I tried connecting a string to the stdout, using a concatenating tunnel. But it always only shows one line of stdout, not all of the output from the iterations. How can I achieve that?

0 Kudos
Message 1 of 6
(1,198 Views)

If it is sufficient to see all stdout after the loop has finished, simply wire to the right loop edge to create an array of outputs, one element/iteration and connect a string array indicator ob the outside.

 

If you want to see the array as it builds, you need to use a shift register and built he array there.

 

Alternatively, you could use a single string in a shift register and append one line per iteration.


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 2 of 6
(1,180 Views)

Thanks for your help.

 

I want to see stdout as it runs. So I use a shift register for now. But I still don't understand how I get all the output into one string indicator. I tried to use build array, but it doesn't seem to work?

0 Kudos
Message 3 of 6
(1,162 Views)
Solution
Accepted by topic author iviewlab

@iviewlab wrote:

Thanks for your help.

 

I want to see stdout as it runs. So I use a shift register for now. But I still don't understand how I get all the output into one string indicator. I tried to use build array, but it doesn't seem to work?


How about using Concatenate String?

 

StringGrow.png

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
Message 4 of 6
(1,156 Views)

Perfect, thank you! That is much easier and more straight forward than what I had in mind.

0 Kudos
Message 5 of 6
(1,149 Views)

Here is an even simpler versions:

 

 


LabVIEW Champion. It all comes together in GCentral GCentral
Message 6 of 6
(1,110 Views)