lovemachinez Posted May 11, 2010 Report Share Posted May 11, 2010 (edited) Hi, I'm a newbie with labview. I use PIC microcontroller read data from TPA81 8 pixels temperature sensor and then it send all string format via rs232 to LV. My protocol look like this "@32 33 32 11 44 22 33 44 55". (@ is start bit ,, and number are temperature value) I want to use this string to display 8 temperature datas in waveform chart, how should I do with this string??? Best Regards, Edited May 11, 2010 by lovemachinez 1 Quote Link to comment
crossrulz Posted May 11, 2010 Report Share Posted May 11, 2010 Are you passing the temperature values over the RS232 in an ASCII format or binary? If you are passing them in a binary format, I recommend the String to Byte Array. If you are passing them in an ASCII format, look at the String/Number Conversion palette (it's under the String palette). These can get your string into numbers to then put into the graph. Quote Link to comment
lovemachinez Posted May 11, 2010 Author Report Share Posted May 11, 2010 Are you passing the temperature values over the RS232 in an ASCII format or binary? If you are passing them in a binary format, I recommend the String to Byte Array. If you are passing them in an ASCII format, look at the String/Number Conversion palette (it's under the String palette). These can get your string into numbers to then put into the graph. Thank you very much. But I still have some problem you know, my data is a string format , so how can I split it. for example, string = "32 22 34 54 31 55 12" How can I split it to => 32 and 22 and 34 and 54 and ........ to put it into array[0],array[1],array[2],............ Best Regards, Quote Link to comment
Francois Normandin Posted May 11, 2010 Report Share Posted May 11, 2010 Thank you very much. But I still have some problem you know, my data is a string format , so how can I split it. for example, string = "32 22 34 54 31 55 12" How can I split it to => 32 and 22 and 34 and 54 and ........ to put it into array[0],array[1],array[2],............ Best Regards, If the separator (space, tab, comma, etc.) is fixed, you can use the primitive "Spreadsheet String to Array" from the string palette. Quote Link to comment
smenjoulet Posted May 11, 2010 Report Share Posted May 11, 2010 As François mentions, "Spreadsheet String to Array" would work well here. An alterantive approach, just to get you thinking about different possibilities uses "Scan from String", which is also on the string palette. -Scott Quote Link to comment
lovemachinez Posted May 11, 2010 Author Report Share Posted May 11, 2010 Great!! thankyou every body 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.