09-18-2007 07:45 PM
09-18-2007 09:47 PM
06-29-2010 08:46 AM
I am wanting to write a cluster of six elements into a spreadsheet file and vise-versa. I have an example spreadsheet file atttached with each value for the corresponding elements in the cluster. I am having difficulty with the coding, as all the values for the six elements have to be acted upon before the next set of value for the six elements are called - so-on and so forth. I have given the cluster a title of TPOS and therefore seperated the values with this heading. Is there anyway I can call this file quickly and write new cluster values to a new file file like a database system.
06-30-2010 03:37 PM
This is pretty unrelated to the original posters issue, and would probably qualify for a new thread.
But, from looking through your text file I think that you are going to want to do is use a read from text file and then start using the VIs from the String palette to parse your string. Its nice that your file has all the <X>, <Y>...etc that will give you a nice regular expression to look for.
Browse through some of the string parsing examples and let me know if you have any questions.
07-02-2010 08:10 AM
Thankyou for the reply, further to this....
I can search for the character <x>,<y> etc. and upload the numbers into an array/cluster. The issue that I cannot resolve is that I wish to use the one group of values (separated by the <Tpos> </tpos>)within the text file (ie. <x>number, <y>number ---> <psi>number) and store them to be used within a 6 element cluster. Then allow my vi to use these values for analysis etc. Once the software has utilized these, call the next group of values within the text file(<x>number, <y>number ----> <psi>number) and place them into the same 6 element cluster (replace original values)and utilize them and so on an so forth, until all the groups of values within the <tpos> </tpos> groups has been utilized within the vi separately.
In essence how can I make my vi use information within the text file separately, when the vi is ready to call for the next set of data.
(I do not really want to alter the text file as it is use for another application). However, Is the only solution to store the numerical values for x,y etc into separate columns. and the values to be used for further 'iterations' on separate lines?
07-07-2010 06:29 PM
I'm still not sure that I completely understand what you are needing. Are you wanting a 2D array of values from the string that is formatted like <X0,Y0,Z0,Phi0,...><X1,Y1,Z1,Phi1,...><X2,Y2,Z2,...> and so on. Or, are you trying to get something else from the string?