lovemachinez Posted April 5, 2017 Report Share Posted April 5, 2017 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. Quote Link to comment
Tim_S Posted April 5, 2017 Report Share Posted April 5, 2017 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. 1 Quote Link to comment
ensegre Posted April 5, 2017 Report Share Posted April 5, 2017 Guessing that this stream comes from a VISA read, you'll probably want this: 1 Quote Link to comment
MikaelH Posted April 5, 2017 Report Share Posted April 5, 2017 Something like this 1 Quote Link to comment
lovemachinez Posted April 7, 2017 Author Report Share Posted April 7, 2017 On 6/4/2560 at 5:22 AM, MikaelH said: Something like this Thank you very much MikaelH. This is very suit to my code. Quote Link to comment
EricLarsen Posted April 11, 2017 Report Share Posted April 11, 2017 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.