06-26-2015 08:16 PM
Hello im working on a small project which involves taking CPU usage information from an iPhone and sending it via a webserver to labview.
I managed to get the first part working in a python shell using ssh and got it into labview via the http GET vi. i managed to put it into an array as its a just a long string and its working fine.
I would now like to pull out the third colum of data as numerical values and just basically add them together.
I am trying to pull out the third colum into a cluster of strings then using "scan from string" to convert to string to numerical valuse.
The issue is im only getting the third colum, second row number value and everything else is 0 (with supressed errors). im not fully awear on how the array to subset works so a little help here would be appreciated.
However i do want to develop this further so as well as the above so any information on how to make a bar chart using colum a as the x name and colum b as the y value would also be appreciated.
Attatching image of the code as it currently is and a copy of the CPU information i get from the phone (the inforation from the phone cannot be changed)
Solved! Go to Solution.
06-26-2015 08:21 PM
Please run your VI until you have typical data in the String indicator. Stop the VI. Then Edit >> Make Current Values Default and save the VI (with a new name). Post that VI. That way we have some of your data to work with without requiring the phone and webserver.
Lynn
06-26-2015 08:23 PM
Sorry got use to it being there i forgot the values get removed.
06-26-2015 08:43 PM
I hope this hep you, you can take advantage of polymorphic VIs.
06-26-2015 09:01 PM
27.3 % That is what I get when I sum all the numeric values in the third column.
I used Spreadsheet String to Array to convert the entire array to numeric data type. Then I used Array Subset to get the portion of the array with the data to be summed.
The attached VI shows three methods of accomplishing this. All produce the same result. Note that I disabled the web stuff and placed a copy of String converted to a control inside the Enabled case of the Diagram Disable structure.
Lynn