PDA

View Full Version : serin2 DEC problem



PortlandJohn
- 6th April 2006, 13:56
I am receiving a data stream $C123.5P-0.8R1.3*00
I would like to pick out the 123.5 as a number to allow me to add it to another number later.


serin2 PortC.2,188,[wait("C"),dec tcm]
Hserout2 [dec tcm]
hserout2 [13,10]

I thought this would make tcm = 123

when I read TCM I get 49 which I think is the ascii value for 1
any ideas where I'm going wrong.

John