05-21-2013 12:18 PM
Thanks for your help. However I was wondering how I can also read rows from the files while keeping the column constant. Like read 0,1,2,3,4,...rows while column stays the same.
05-21-2013 12:25 PM
What colums? I thought you had a 1D array of strings.
05-21-2013 02:25 PM
Made 2D to seach for a specific word in the output to flag a match in case I change the order of the input commands. I'm wondering how do I increament the rows and keep reading from the same column
05-21-2013 02:41 PM
You could index by the colum and then process the data in a FOR loop.
05-22-2013 10:39 AM
Tried indexing by column and process the data in a for loop but doesn't work. Maybe a sample MOD of my VI as to what you mean could help?
05-22-2013 11:01 AM
Something like this.
05-23-2013 01:28 PM
Thanks for the help. Did it a different way but same idea. However if I was doing real time data output how do I index the matching to the next line from the output?
05-24-2013 06:50 PM
I'm not quite sure what you mean by that. Could you post the VI you ended up using and explain in a bit more detail what you're asking?
05-27-2013 05:17 PM
Apologies for not giving good clarification. I'm running "live' test on a device by sending commands get the output from the device search for a key word in the output and flag a pass/fail in real time need to do this on every command. My problem is I have to wait for the device to loop through all the commands and output result before I can search strings on the output for match and flag a pass/fail. Would like to check the result in real time. A manual check would be like send a command check the screen it that the right result yes/no next command (Automating this is the problem)
05-27-2013 08:05 PM
I do not understand what your VI is trying to do.
You take all the strings from the 2D array constant and concatenate them into one long string:
"DIS CONFIGURATION UPDATE
All changes to the configuration will be saved
savedDIS CRC
CRC mode is disbled
modeDIS DELIMITER
Tab separated output
Tab".
Then you concatenate the strings from the columns in the text file separately into two strings which look nothing like the 2D string:
"DIS CONFIGURATION UPDATEDIS CRCDIS DELIMITER"
and
"savedmodeoutput"
So, the Match Patterns never find a match.
None of the input data ever changes inside your for loop. This for loop will produce the same result and will certainly execute much faster for large strings.
String matching can be slow. If you can focus on the part which is the key to the match, you may be able to speed things up. Which column has the "Commands"? Are the reference values (list of commnds) in the file or is the array constant in the VI the list of commands and the file represents your "live" data? Building an array inside a loop can be very slow because it requires frequent memory re-allocations as the array grows. Either post-process the Pass/Fail array to get the line numbers or Initialize Array outside the loop to the maximum size and use Replace Array Subset inside the loop.
Lynn