03-07-2017 03:15 PM
Here is my code.
It is working, but not that good.
If you can help to improve it, that will be great.
Thanks a lot.
Bingji
03-07-2017 03:26 PM
What is not working well? The parsing or the serial control? If it is serial control you may want to start a new thread for that. Helps to keep things organized.
03-07-2017 05:29 PM
Read the Help for Spreadsheet String to Array carefully -- it notes that the data type "between the commas" has to be all the same type, and by default it chooses Strings or Dbls. You wired in Doubles, so your input string cannot (as in CANNOT) include any text.
If your string is a mixture of Text and numerics, but still strictly comma-separated, you need to read it all as strings, and then convert those elements that "really" are numerics in a second step.
Do you know how to create a "Constant" VI? I'd recommend you run your program, copy the Response 2 indicator (which you are trying to parse) to a new VI, right-click and turn it into a Constant (inspect it to make sure it still has the entire string), then name this "My Data.vi" or "Response 2.vi". If you attach this as well, we can easily check out your parsing logic with your "real" data.
Bob Schor