12-15-2006 07:12 AM
Hello there,
Couple of things,
I have a 2D array out of whcih i'm indexing out a column containing a set of 200 controller names. The basic types are as listed in the attached "Parsing sample.vi". The example also shows the required parsed format for each controller type programatically. A sample code for programming my application is highly appreciated.
Secondly, I have two 2D arrays in which I'm comparing first 4 column elements of each row of both the arrays.( 1st 4 elements of 1st array with 1st 4 elements of all rows in 2nd array). For every match of these first 4 elements from both array, I would like to build a composite array. Composite array shalll be a summation of : Row from the 1st array ( where the 1st 4 elements match) + Rest of the elements from second array(other than the match, where the 1st 4 elements match).
The vi that I now have works fine for just one match. But I would like to be build composite rows for multiple matches. If you could kindly correct the code to satisfy this requirement that will be great..!
Thank you
Shaun
12-15-2006 11:00 AM
I took a look at your code and 1) I am not sure what you are asking and 2) it looks like it does exactly what you want it to do.
1. Parsing Code: Can you attach an example of some of the work you have already done so we can help you to get it working?
2. In the 2nd you state " Phi, fuel, dial , speed is repeated twice". I looked in the tables and unless I don't understand I would say no it is there only 1 time. so the VI does exactly what it should. I wonder if you have changed the data and not saved it as default. So open your VIs and select Edit>>reinitialize values to default. Then run your code and you will see that the "Phi, fuel, dial , speed" line is there once and the code works.
12-15-2006 01:39 PM
Evan,
Thanks for replying. Here's somemore information that you wanted to know:
1. I'm attaching the vi that I have now that works on controller type. The input would be an 1D array of aIl controller types. I would like the code to sense the controller type programatically and parse them asper my requirement in my previous posting. (Plot, bit, HI/LI , CH)
2. For every first 4 elements of each row in 1st 2D table, compare the first 4 elements of all the rows and build the composite rows for all the matches of 2nd table.
composite row: Row in 1st array where the 1st 4 elements match + rest of the elements of the row in 2nd array where the 1st 4 elements match.
So be as many composite rows as the number of matches( 1st 4 elements) in the second array.
Hope I'm clear now.
Thanks
Shaun
12-19-2006 05:10 PM
12-20-2006 03:12 AM
For info, this thread is a continuation of here http://forums.ni.com/ni/board/message?board.id=170&message.id=218715
The two threads are cross-linked.
David