Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the WAITFOR Command

Status
Not open for further replies.

Marky4556

Programmer
Dec 20, 2000
7
US
I am trying to find a command that will allow me to wait for a particular marker in the RXDATA buffer and then allow me to grab all the data after that marker. The waitfor command seems to clear the RXDATA buffer after it is executed so that all the data I need to grab is gone. I can use a 'pause' but since this particular script will be running at different baud rates this is not an option. From the documentation it appears that the Waitfor command should only clear the buffer if you have the STRIP enabled which I do not.

Has anyone used this command extensively or done any retrievals like this. If so could you please point me in the correct direction.

Thanks!
 
You are right. The waitfor command does not clear the RXData buffer under normal circumstances.
I am kind of second-guessing based on my own experiences, but your waitfor command could be detecting another marker that looks like the one you specified, and grabbing the data too early. Try finding another marker on the page, or test your waitfor using a usermsg window.
Code:
waitfor "string"
Usermsg "found string"
Another possibility is that the waitfor command expires earlier than the marker is recieved (20 seconds default), or that the marker is not the exact string that waitfor expects.
Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top