rlrepoff Posted April 8, 2015 Share Posted April 8, 2015 Hello, I have a string that is coming in from a serial connection and this is the output that I am getting: Rx: 669.00,-252,5795,-12,131071,167,37669,6833,14764,540,47\013\010 I am using 'parse' to parse each of the measurements from this string as follows: Seconds[0]=StrToDouble(parse(StringIn,0,",")) (The first indexed item is the time). During my last indexed item (the number 47 before the returns of \013\010), the 7 is getting cut off and I am only getting the 1st digit and not the second (i.e. I am getting the 4 on my channel but not 47). Here is the code for the last parsed item: RelHum[0]=StrToDouble(parse(StringIn,10,",")) Is there a way for me to get the whole value instead of just the first number. All of my other assigned channels are getting the correct value. Link to comment Share on other sites More sharing options...
AzeoTech Posted April 8, 2015 Share Posted April 8, 2015 What release of DAQFactory are you running? Sounds like a bug in parse, and I believe we fixed that one. Anyhow, the easy workaround is to make the string longer: StrToDouble(parse(StringIn + " ",0,",") Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.