Your Universal Remote Control Center
RemoteCentral.com
RS-232 & IP Control Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 2 made on Sunday March 11, 2012 at 23:53
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
you put your line anywhere between the last line of setup of the port and before you do your first match operation. as you are doing async 232, you must also handle the onTimeout of the serial port as it is possible that there could be partial message (CR not yet received when the match times out) that you must handle as well. I know you are using serial port but some of the asynchronous example you can find here on sockets should also help to shed some light as to correct placement of the statement. Also note that when you assign an onData function, a call to serial.receive or serial.match no longer returns data and you must examine the single parameter passed during the call to your onData or onTimeout callback functions.

Also go to http://www.the-gordons.net and have a look at some of thr documents that Barry has posted explaining Serial and TCP data communications.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse