From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

line indexing an output string

I have multiple test results coming out of a case structure.  The test result is text and is simply wired to a output string.  I would like to compile the results instead of the results over writing all previous results. 
 
I've used an array to spreadsheet string to create a list for another application but the test result is not an array.
0 Kudos
Message 1 of 5
(2,468 Views)
Hello,
 
Using shift registers, first initialize an array outside of the structure, then insert it into an array and have your new information wired as the new element, wire the output array to an indicator and to the shift register.
 
 
Hope this helps,
0 Kudos
Message 2 of 5
(2,462 Views)
If all your outputs are wired to the SAME output terminal of the case structure, you need to accumulate them in the loop you are using to execute your case statement multiple times.

You can either wire the results out of the loop and Auto-index or you can use a shift register to build the array one piece at a time.  The auto-index method has the array only available AFTER the loop is exited, whereas the shift register is available WHILE the loop is running.



Depends on where you need the data.

Shane.

Message Edited by shoneill on 03-21-2007 06:25 PM

Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 3 of 5
(2,450 Views)

I don't know what "compile" means in this context, bu you have many possibilities:

  1. If you only need the array at the end of the loop, use an autoindexing output tunnel.
  2. If you want to built the array iteractively, build it up in a shift register using "build array".
  3. If you just want to append a new line to a string, keep the string in a shift register and concatenate the result and a linefeed.

The attached shows simple drafts of all three possibilities. modify as needed. 🙂

 

Message Edited by altenbach on 03-21-2007 09:37 AM

0 Kudos
Message 4 of 5
(2,443 Views)
Thanks!  I am actually starting to see the usefulness of the different options...
0 Kudos
Message 5 of 5
(2,436 Views)