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.
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.
05-26-2011 02:22 PM
What i am trying to do is find a string then go to the next column of same row and read that value. Since i need to find more than one string, i have added separate functions for each string in flat sequence. And all the found values combined together to write in excel.
Do you think there is a better way to do this ?
05-26-2011 02:43 PM
Yes there are better ways to do it. All the excel functions are exactly the same except for the string to find. Create a subvi of the Excel functions and the inputs to the subvi will be Error in and the string to find and the outputs will be the error out and the data. Then just use the subvi in your main vi and use dataflow withe the error in and out. then write to the file at the end. that way there are no long sequence structures and wires going back and forth across the screen. A good rule of thumb about using subvi's is if you use a function more than once then you need to make a subvi for the function. If you do not know how to use subvis then I would suggest going through the examples.
05-26-2011 02:45 PM
also if you know which column the data is in and it is the same all the time then you do not have to use the find function. You just put in the cell # itself. Looks like to me everything will always be the same.
05-26-2011 02:59 PM
Many Thanks for suggestions i will look into those!!
The reason why I am using find function because the data generated from instrument is always in the same column but rows are different all the time.
Can you explain a bit on # function you mentioned ?
05-26-2011 03:04 PM - edited 05-26-2011 03:05 PM
Not sure what your talking about. # is shorthand writing for the word "number".
05-26-2011 03:43 PM
well I was not aware of that terminology.
But can it help in case the row numbers are changing ?
when there are more than one values to be read ?
05-26-2011 03:59 PM
Try putting your Excel functions in a subvi and when you get that done I will help you further.
05-26-2011 04:30 PM
thanks
i will get back to you soon
05-27-2011 05:35 AM
So here is the sub vi which finds the value next to string. It will find the value for the string from the given excel file.
The search strings are e.g. CDi,CMono,H2,AGON,CH4 etc.
Thanks !
In this way i could cable to learn sub vi