LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string manipulation challenge

 I’m having a bit of trouble manipulating a single string into a string list. It’s not easy to explain but the attachment will give you a good idea what I’m trying to achieve. I have the feeling I’m missing something very simple here, I have tried to work through all the various ways I can think to do this but have come up with nothing. If anyone could show me the simple and intelligent way to finish this once and for all, I would be most grateful. I will be able to go to bed a lot earlier. I'am using Labview V8.
0 Kudos
Message 1 of 6
(2,665 Views)


new2this wrote:
 I’m having a bit of trouble manipulating a single string into a string list.
Sorry, I don't see a "single string" just an array of strings as inputs.
 
What are the settings for the eight index inputs? I assume that List2 should depend on these settings in some way.
In order to reproduce the List2 results, we would need to know these settings.
 
 
0 Kudos
Message 2 of 6
(2,659 Views)

Hi I'm sorry I forgot to save the VI with all the proper data. I have added further explanation in the VI i hope this helps. I should explain more clearly this is a VI that is part of a program to prompt a user to conduct various tests on an electric vacuum motor. As part of this test the user has to place metal plates with various sizes of orifices ranging from 6.5 to 50 mm in diameter on a test rig. The plates have to be measured to within .01mm and this figure used as part of the later calculation. The rest of the program has been written and this is a last minute addition.


See attached VI for further explanation.
0 Kudos
Message 3 of 6
(2,638 Views)
Hi new2this,

you always take a complete row from your "Table 1" - and there are 4 columns with test data... (resize the table to show all those data!)

To take only values from the correct column you have to wire this index in the big "indexArray" function too! So for testA you have to wire a "0", testB = 1 and testC=2. Your Table1 is a 2d array, so you have to wire 2 indices to get a scalar string!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,628 Views)

I have attached the VI I have currently in my project. I wanted to avoid having a user input table with all three coulombs and the user having to input the same data three times in affect. There are only 17 plates in all and I was looking for a simple way of inputting the measurement data in one list and then to manipulate this array to produce the three sets of data to send to the table in the plate counter VI attached. I hope this make sense to you. Thank you for your reply.

0 Kudos
Message 5 of 6
(2,620 Views)
Hi new2this,

as you have different number of items for each test (A, B, C) you cannot use the same indices when trying to get the items from your Table1. You need to use a different set of indices for each set, so you need to use both index inputs in the IndexArray function...

For your last attachment:
I would replace the number to string conversion and string concat with a FormatIntoString function. And I would also use an integer datatype (I32 preferred) for your "Current/Next plate number"...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(2,613 Views)