Thanks Glenn for your advise.
I used the Timer control to read the Comm Port at an interval.
1) How many seconds interval would be the best to read the Comm Port?
2) Is data duplication on reading the Comm Port casued by incomplete
reading from the Comm Port?
Thanks!
>>Hi all,
>>I am using the MSCOMM32 to interface with a machine in VFP5.
>>I can receive data form reading the comm port. I just wonder will
>>it "Clear" the input buffer once the read is issued(ie
>>ThisForm.CommPort.Input).
>>Because I am receiving some duplicate data.
>>I just wonder what is the purpose of some of the comm properties, like
>>...HandShaking or ...InputLen or ...ParityReplace
>>Is it neccessary to pay attention to these settings? Thanks!
>
>Hi Alvin,
>We use MSComm32 quite a bit. The input does clear the buffer.
Handshaking, using CTS/RTS is more reliable than without, as long as the
other device supports it also. InputLen, set to 0, reads all data in the
buffer. Set to 1, reads ONE character only, etc. ParityReplace can
generally be ignored except for special parity circumstances. If you have
not found it yet, there is some help for mscomm in your
\VFP\CTRLHELP\CTRLREF.HLP (type MSCOMM in search window)
>Although the examples are in VB, the general help is good
>
>Best Regards,
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