LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop concatinating strings when string length is reached

Hello, 

I would like to Stop concatenating strings when a certain string length is reached.

Here is my trial on the VI.

Could you assist?

Regards,

 

0 Kudos
Message 1 of 4
(2,546 Views)

Instead of wiring a false constant into the stop terminal of your while loop (the red stop sign), you should wire a boolean that indicates whether the string length is reached (maybe you mean this to be the boolean that you are wiring into the case structure?). Then your loop will stop when the boolean becomes true.

0 Kudos
Message 2 of 4
(2,529 Views)

Try something like this:

len.png

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 4
(2,512 Views)

I would do something like this, concatenate until the resulting string length is greater than or equal to the target length and take the string subset of the target length (for the greater than case).

 

Ben64

stop concatenation.png

0 Kudos
Message 4 of 4
(2,427 Views)