LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

URGENT!!! How we add a series of 2 strings into a new array dynamicly?

Hi,

 

     To insert 2 string into an array first you make check whether it is a valid string if true,use insert into array .Is this make sense.Let me know if you didnt get.

0 Kudos
Message 11 of 14
(888 Views)

Hi AutoTec,

 

After a good night sleep, this morning I have a fresh mind (yesterday night I was too tired when trying more)

 

At first,  I tried your suggestion inserting strings into array, it does not work well (might be my way was not corrected)

 

Secondly, I tried another way by append strings into an append array & it works as I wanted (please see the attachment)

 

Thanks for trying for helps Smiley HappySmiley HappySmiley Happy

0 Kudos
Message 12 of 14
(869 Views)

OK, here are some pointers to improve the code:

 

  • Get rid of the sequence and value property node. (These are not "lines" of text based code with terminals as "variables". Stacked sequences fragment the code and make it difficult to read. value property nodes are computationally expensive)
  • Resize your array to show more elements and you'll see that the array in the shift register will grow with each run. You need to initialize the shift register with an empty array.
  • If you buit the array first and format it later, you need fewer primitives.
  • "Array subset" is not needed. If you don't want the first row, dont generate it in the first place (e.g. insert a +1 in the loop and run only 4 times).
  • "Index array" is resizeable, so you only need one instance.

 

 

Before:

 

 

After:

 

Message Edited by altenbach on 11-06-2008 09:32 AM
Message 13 of 14
(855 Views)

1. After I sending the reply I found out that I need initialize the array (as you mentioning) & some minor adjustments and my task are done!

 

2. However, your suggestion is a much better solution & I will use it!

 

Many thanks for help Smiley Happy  Smiley Happy  Smiley Happy

0 Kudos
Message 14 of 14
(832 Views)