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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A way to stop reading COM1

Status
Not open for further replies.

Riegg

Programmer
Mar 20, 2003
29
CA
Is there a way to stop reading a com port after receiving a specific string?? I am working on Motorola iDEN base radios and need to issue commands, wait for the reply and then manipulate the data. The reply always ends with “EBRC>” (with out the “”), right now I have it doing a read for a period of time (user definable) but it seems to vary too much from radio to radio and computer to computer.
 
Not familiar with Motorola iDEN
but try using FOREVER to prevent timeout.
This will also stop the need for the user-defined timeout.

proc main
;start read
;SCRIPT
waitfor "EBRC>" forever
;SCRIPT
;end read
endproc

Don't know why a "READ" would vary significantly from radio to radio or computer to computer.


"I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered."
No. 6
 
the read time will very do to processor loading and call volume on the radio anywhere from 1 second to 10 seconds. I will try the waitfor but I can't remember why it did not work right now but there was a reason.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top