Hi,
Is it possible for WAIT command in HSerin to wait for either for the string "OK" or "ERROR"?
What I want to happen is that, if Either of the String "Ok" or "Error" is received the HSERIN will start to put received buffer to variable.
Thanks
Hi,
Is it possible for WAIT command in HSerin to wait for either for the string "OK" or "ERROR"?
What I want to happen is that, if Either of the String "Ok" or "Error" is received the HSERIN will start to put received buffer to variable.
Thanks
You can not WAIT for both at the same time.
Depending on you application...
Wait for one and if not received, use the TIMEOUT option to goto a wait for the other.
Or...
Take all data all the time into an array, then check the array for "OK" or "ERROR". Then process from there.
Dave
Always wear safety glasses while programming.
thank you.
hserin 1000, _WaitTimeOut, [str rbuffer\5\13]
endif
lookdown2 rbuffer, ["OK",$FF,$FF,$FF ,"ERROR","+CMTI","+CMGR"], b0
b0=b0/5
Bookmarks