takimidante Posted March 15, 2007 Report Share Posted March 15, 2007 hai everyone.... Many instruments return a waveform as an ASCII string or a binary string. Assuming the same waveform, a binary string transfer is faster and requires less memory than an ASCII string transfer. Binary encoding requires fewer bytes than ASCII encoding......so i think i will use function extract number.vi to convert ASCII waveform string to waveform(numeric array) but in labview 8.0 i didn't find this function.so anybody can find this function to me? or else...any other solution about how to convert ASCII waveform string to waveform(numeric array) ? Quote Link to comment
Gary Rubin Posted March 15, 2007 Report Share Posted March 15, 2007 Spreadsheet String to Array. I don't have 8.x installed, but I can't imagine NI got rid of that one between 7.1 and 8.0. Quote Link to comment
Bobillier Posted March 15, 2007 Report Share Posted March 15, 2007 Hi The first point is which kind of communication you want to speak about. If It's RS232 , the Vi for Serial READ and Write accept only string Characters and in this kind it's more easy to used ASCII coding. But you can use too numerical values . For that you need to convert numerical value to characters. For this you can used "type cast" to make this convertion. (See image type cast convertion). But not the VI's of convertion in string pallette who convert in ascii.http://forums.lavag.org/index.php?act=attach&type=post&id=5195 Special point: If you want to work with numerical values rather ASCII coding , you may make attention of special values (ASCII Control Characters 0 to 31 (d)) and specially in reception. For exempl if you recevied the hexa string 48 45 4C 4C 4F 0A 30 31 32 in the serial buffer and try to see the number of received characters with the VI dedicate to that in serial menu, you show only 5 characters. Why ? Because you have 0A (line feed) in your string. In this case you must read the 5 first characters and read in a second time the 4 next and not all the string one time. Eric 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.