PDA

View Full Version : HSERIN for variable length string



Pic2008
- 19th February 2010, 02:54
Any idea how to read string with variable length? In HSERIN command, I'm not sure how I can allocate the variables since the length of data can change eg.

AB
CDEF
GHI
JKLMNO

Your help is much appreciated.

Charles Linquis
- 19th February 2010, 05:58
If you don't have a constant terminator, or your data is not ASCII, you will probably just have to set a timeout that is long enough to cover receiving the longest possible string.