Difficult to give suggestions without knowing what you have in mind to achieve. The below is a simple way to get out of the While/Wend loop.
Al.Code:StrLIst var byte[10] ' for example not knowing the true dimension gotchar var byte BUfferChar: gotchar=0 return_code=0 low HIGH RED_LED While return_code<>13 or gotchar >9 Hserin 50, NoData, [return_code] StrLIst[gotchar]=return_code gotchar=gotchar+1 WEND RETURN Nodata: HIGH RED_LED ; Show Error led (use the high state of this pin to workout the timeout in the main routine) Return




Bookmarks