09-26-2016 10:15 AM - edited 09-26-2016 10:19 AM
I just think it would save everyone tremendous headaches if you could develop a tiny data input app like I had constructed. Much easier than flagging possible errors and correcting them. (HINT: Put the main cluster in an array.)
Well, the other method has merit, too because you can cut and paste and change what you need to change. Potentially easier to enter raw data.
09-26-2016 10:23 AM
This'll result in an empty string if the input doesn't match the pattern you've defined. (Where's Rube?)
I've used the Format Into String node to make it easier to edit the core regex.
09-26-2016 10:46 AM - edited 09-26-2016 10:49 AM
Ben,
Thanks for the reply. The result is close to my needed result, but not quite there yet. Still needs a little more work.
There are a few things that didn't come out correctly. I built it exactly as you built yours, and I checked it 3 times. Attached is a screenshot of the input string and the resulting string. As you can see, the elements are kind of out of order, as well as missing the negative sign on the -150. What did I need to do to fix those things?
Thanks for the help!
SM
09-26-2016 10:51 AM
09-26-2016 10:56 AM
Ben,
I can't post the actual VI. Attached is a screenshot of the code. Should be exactly like yours. The String IN is the string from the previous post.
Thanks,
SM
09-26-2016 11:00 AM
09-26-2016 11:04 AM
Sorry, please see attached.
Thanks,
SM
09-26-2016 11:37 AM
09-26-2016 11:44 AM - edited 09-26-2016 11:44 AM
Ben,
I see now. I fixed it, and it did indeed fix the order of the elements and such.
However, it still did not parse out the bad character. Attached is a screenshot of the results. Code is the same as last post, except with the missing parenthesis fixed. The input string has numbers and bad characters in it, but the resulting string just has 0's. How can I fix that, or did I mess up somewhere else?
Thanks for the help!
SM
09-26-2016 11:51 AM
Ben,
I tried it with the attached bad character, and it worked great. However, although there was no bad character in the first portion of data (position data from post #1), the result was still 0's for all 3 elements?
thanks!!!
SM