11-01-2011 09:11 AM
I have an input that gives me: 122345,%,0000,0000
I just want the 122345 part so that i can graph the value in real time as the data is being streamed into the computer. How do I select for this? Right now I just have a straight read command and the read buffer indicator I have just cycles through the packet depending on how many bytes i tell it to read.
Solved! Go to Solution.
11-01-2011 10:18 AM
Look at the string to number formatting functions in the String palette. If the values are always integers and always at the beginning of the string, the Decimal String to Number function will work without any additional effort.
Lynn
11-02-2011 06:05 PM - edited 11-02-2011 06:07 PM
Hey superomario,
Two other options to consider are the String Subset and Search/Split String. The first returns a subset of a string that is "length" characters long starting at the character designated by the offset. In your given input, you would use a length of 6 and an offset of zero. The latter VI splits a string at the first instance of a user defined character, in your case a comma. Take the "substring before match" output and you will get the desired result you requested.
Hope this helps
Luke W
11-02-2011 06:05 PM - edited 11-02-2011 06:08 PM
..
Luke W