Home > Software engineering >  Vb PC for help. Each oncomm interrupt received bytes are the same. Thank you
Vb PC for help. Each oncomm interrupt received bytes are the same. Thank you

Time:10-25

Under a machine to send two consecutive bytes as 0 x55 0 xaa -- -- -- -- --,
PC can only receive the first byte
I saw the single step, every time an interrupt receive 0 x55, second, or 0 x55, the third is...
 MSComm1. InputLen=0 'receive buffer size 
MSComm1. To receive an InputMode=comInputModeBinary 'binary
MSComm1. RThreshold=1 '


 Select Case mEvent 'serial events 
MSComm1.ComCase comEvReceive 'receives the data
Buffer=MSComm1. Input 'clean up the receive Buffer, at this point, to receive the number of bytes have 0
Numbuf (RecvCount)=Buffer (0)
-- -- -- -- -- - handler -- -- -- -- -- -- -- -- -- --
End the select

Because the instruction length is different, so a byte oncomm event time,
Lower machine is straight hair,
Using vb for the first time, I wish to call for help, thank you

CodePudding user response:

Use this to try?

CodePudding user response:

reference 1st floor Veron_04 response:
use this to give it a try?

Thank you, I am using mscomm control that can help take a look at ah!

CodePudding user response:

I give you the example program, you download and see
  • Related