LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Set manipulation in Array/Cluster etc.

I have 300 data set points available in format(T65HJG7, 1238.52) which I would like to read from a text file as a default sequence. The first field indicates the serial no. and second is associated values. And, I need to perform some mathematical routine on all data associated value's (i.e. 1238.52) and swap the data positions in the default sequence. How can I perform this data swapping/manipulation using Arrays/Clusters, GOOP or anything else. Kindly help !!
0 Kudos
Message 1 of 3
(2,704 Views)
Not sure if I fully understand your question, but I'll give it a shot anyway:

Read the file using "Read Characters from File". You will have to then put the serial numbers into an array of strings, and the numerics into an array by converting them to fractionals from the strings. You will have to use a loop to scan each item from the file by looking for the separators (whitespace?) When completed, you should have an array of strings that matches an array of numerics. The numerics can then be operated on as you wish. As for swapping, I'm not sure what you mean.
Message 2 of 3
(2,704 Views)
Labviewguru is right on the money about the parsing. In case you have never done it before, I wrote the some example code for the string parsing. Parsing in LabVIEW is really easy with a little experience. I would like to encourage you to experiment with the VI.

Jeremy
0 Kudos
Message 3 of 3
(2,704 Views)