04-25-2005 04:45 PM
04-25-2005 04:50 PM
04-25-2005 06:55 PM
05-05-2005 01:02 PM
@tbob wrote:
It depends on what you are getting from the serial port. If you are getting a character string representation of a hex number, like FF 3A, then you can use the Hexidecimal String to Number function. If you are getting a wierd character, a smiley face or a square box, then you must use the Type Cast function found in Advanced - Data Manipulation palette on the block diagram. Wire serial string into Type Cast left side, wire a U32/U16/U8 constant into the top terminal of Type Cast. Converted number comes out of the right terminal. You must know whether the serial stream is a 32 bit or 16 bit or 8 bit number. If the serial string is FA 34 16 00, is this one number (FA341600), or is it two numbers (FA34 and 1600), or is it four numbers (FF and 34 and 16 and 00)? Use U8 if four numbers, U16 if two numbers, and U32 if one number.
05-05-2005 02:05 PM