LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Concatinating strings in a loop

The string TYPE only contains the last value from the loop instead of all of them
0 Kudos
Message 1 of 8
(2,766 Views)
Hi exo,
i can´t open your vi at the moment, may be you can attach a picture of your code? Did you use shift regsiters or auto indexing?

Mike
0 Kudos
Message 2 of 8
(2,761 Views)
Instead of requiring everyone to try and decipher your code (which is always so much fun), please explain what it's supposed to do, provide an example of an input that you use (e.g., the value of "Object"), what you expect to get, and what you actually get.
Message 3 of 8
(2,750 Views)
Are you talking about the for loop or the while loop? In either case I think you want the shift register or feedback loop outside the case structures so that the feedback includes all the iterations. You have a separate feedback node in each case. Each knows nothing about the others.

Cleaning up the wires would be helpful. You have wires running under and behind nodes and all directions. This makes it hard to tell what you are doing.

Is the DEC :sec term always coming from row 8, column 9? That is how it is wired. This may be one of the consequences of the crazy wire routing.

What are typical values to be entered into Object and what should the result be?

Lynn
Message 4 of 8
(2,749 Views)

Hi exo,

i think you spoke about the for loop. Don´t set the tunnels from a case structure to "default if unwired". Smiley Happy
See the attached vi, it should now work for you.

Mike

Message 5 of 8
(2,743 Views)
Also: the loop doesn't seem to be setup right in the first place. The "N" is wired for 6, but it seems that based on the case structures you actually want 7 iterations. Also, the way the string is being built doesn't make much sense. I would think that you would want the actual value of the cell contents appended, but since you never explained what you're supposed to get, that's just a guess.
Message 6 of 8
(2,734 Views)
Yes, I think that will work.
Thanks
0 Kudos
Message 7 of 8
(2,703 Views)
Of course, you're right but as we get closer to ship date, things are even crazier here. It's not only on the LV support board that I assume everybody follows my sometimes giant leaps in logic.I don't have the code in front of me. I'll look at the number of iterations. As to why, I'm not adding what is in the cells; the columns are Y,E,O,D, etc.; The cells just contain ones. Going across a row, if I find a one in any of the columns, I have to note it in LV with the proper letter. So I loop through the columns and when I find a one the column tells me what letter to use; That's hard coded.




Thanks.
0 Kudos
Message 8 of 8
(2,700 Views)