As Steve said, post your code so we do not have to guess. If your data is in ASCII, then
Decimal 0 = 48 in ASCII
Decimal 1 = 49 in ASCII
Decimal 2 = 40 in ASCII
etc.
You can convert your received ASCII numbers to decimal by
or you could do your compare like thisCode:X VAR Byte ' Received value X = X – 48 ' convert from ASCII to decimal (or X = X - “0” does the same thing) If X < 7 THEN Something ' your compare
Again, post your code if you cannot make yours work.Code:X VAR Byte ' Received value If X < “7” THEN Something ' “7” = decimal 55 but is 7 in ASCII
Paul Borgmeier
Salt Lake City, Utah
USA




Bookmarks