I'm not sure, but I have code in place which works fine. See if this helps you at all (look at the oncomm event):
Re: MSComm Documentation Message #
705364>Dear All,
>
>I am writing a code to send and receive data on a machine connected on com port. By looking on the manual of machine I understood what i need to send (eg. U010000000) and what the machine will send back (eg. 010000001001).
>
>After using the MSCOMM32 control (object name on FORM is MSCOM1) I have written following code in the RECEIVE event (MSCOM1.ONCOMM()):
>cRetCode = cRetCode + MSCOM1.INPUT
>
>For sending the output I have following line of code:
>MSCOM1.OUTPUT = 'U010000000'
>
>The above statement send the correct instructions to machine and it starts working correctly.
>
>Now I have written following statement to verify the return value:
>IF cRetCode = "010000001001"
>MESSAGEBOX("Commands Successfull")
>ENDIF
>
>When program executes it does not show me the message box.
>
>But if I use a SUSPEND statement before checking the value of cRetCode then it gives me correct value.
>
>The RThreshold value for MSCOM1 is set to 1. As there are cases when the machine will send only 1 or two characters and I need to process that also.
>
>If anybody has done this type of work then please help me.
>
>Thanks,
>Rajeev
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"