By using PortOpen to clear the Input buffer doesn't sounds right. Because I
wouldn't
know when is the last data sent from the serial port? Closing the port
might cause
lost of data, do you agree with me, Ian Johnston? Any other alternative?
Thanks.
>
>>I managed to send data out to serial port by using MSComm control.
Thanks.
>>I used the INPUT property to receive data from the serial port, it does
>>read, but when I read the 2nd time it is the same message.
>>
>>Anyway to clear away the previous read data, as I'm using the
>>Timer to perform read at time interval. Pls advise, thanks.
>
>The way the documentation sounds calling input is suposed to clear the
buffer but it does not. I use portopen to open and close the port this will
clear the buffer and reread the serial port.
>
>Hope this helps.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement