Jump to content
lovemachinez

Please help! I want to split the number from this format string

Recommended Posts

Hi,

I got the string data from my sensors like this  ('\'Code display).  Anyone can give me the idea to split the value please?

Quote

65.317\03\02?\03\02+65.317\03\02?\03\02+65.317\03\02?\03\02+65.317\03\02?\03\02+65.317\03\02?\03\02+65.3

Thank you in advance.

Share this post


Link to post
Share on other sites

There is a whole host of tools in the Strings pallet. There is scan string for tolkens, match pattern, conversion primitives... I could take a bunch of stabs at how to parse it out, but without any information as to how much of what is being sent and the format of the message it would be guesswork. That being said, it does appear the start of text (ASCII hex 2) and end of text (ASCII hex 3) is being used to delimit information, so scanning for tolkens is probably a start point.

  • Like 1

Share this post


Link to post
Share on other sites

Just an FYI for the future, in the Labview examples there is a VI called Extract Numbers with Match Pattern.vi.  Very similar to MikaelH's code and really useful.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.