LabRatzz Posted August 27, 2014 Report Share Posted August 27, 2014 Hello, I have these to strings of data how do i use labview to differentiate bettwn the two? the first four letters are always the same and the rest changes, SDFS = Data1 ASXP = Data2 I guess what i want is when the data comes... labview automaticly knows this line is DATA1 or this line is DATA2 SDFS~S0000000040942770200002014016980156XXX ASXP`0100361553364651\` Quote Link to comment
hooovahh Posted August 27, 2014 Report Share Posted August 27, 2014 Many ways. How about getting the string subset on the first four characters and seeing if they equal SDFS or ASXP then getting the string subset of there for the appropriate length and offset for each. I'm sure regular expression could do it too. Post your VI you have tried and show what you couldn't get to work. Quote Link to comment
Mark Balla Posted August 28, 2014 Report Share Posted August 28, 2014 Try the example "Extract Numbers with Match Pattern.vi" Under the Menu items Help>>Find Examples... Quote Link to comment
Neil Pate Posted August 29, 2014 Report Share Posted August 29, 2014 I'm sure regular expression could do it too. As someone wiser (and more sarcastic) than myself has already pointed out... Some people, when confronted with a problem, think “I know, I'll use regular expressions.†Now they have two problems. 1 Quote Link to comment
hooovahh Posted August 29, 2014 Report Share Posted August 29, 2014 As someone wiser (and more sarcastic) than myself has already pointed out... Some people, when confronted with a problem, think “I know, I'll use regular expressions.†Now they have two problems. Notice I didn't say to use regular expressions, I just said that it could be used. Quote Link to comment
bigjoepops Posted September 3, 2014 Report Share Posted September 3, 2014 Are you checking the data after it was received or while it is being received? Is there any type of header or pattern to your data? 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.