How to receive 43 bytes of data from a Microcontroller using MSCOMM in VB 6 and display them onto a vb form ?

I am using VB6 and MSCOMM to create a link between my PC and Microcontroller.

I am sending 43 bytes of data to my Microrcontroller from an array of 43 bytes and writing it to the EPROM of my microcontroller. I wan to be able to read that data later on and display it on a form.

I can successfully receive a byte when a Comm RX event is triggered.

but not sure how to receive all 43 bytes and display them onto a vb form (form text, combo etc controls)

I am sending a query command to microcontroller then it sends me all these byte. I am able to see this data
coming on scope but not able to receive it. Please help ?
adnansamiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mmusanteCommented:
Try this ...

Private Sub Command1_Click()
   Dim InString As String
   MSComm1.InputLen = 43

   If MSComm1.InBufferCount >= 43 Then
         InString = MSComm1.Input
   End If
End Sub

0
adnansamiAuthor Commented:
Thanks for the post
I tired it and it did not work ?
What about RThreshold property ? I want to receive all this on a comm event.
How do I parse it and display it onto the controlls
0
mmusanteCommented:
You can try something like this ...

Dim InString As String

private sub Form_Load()
' ....
  MSComm1.InputLen = 43
  MSComm1.RThreshold = 43
' ....
end sub

Private Sub MSComm1_OnComm ()
   Select Case MSComm1.CommEvent
        Case comEvReceive      
               InString = MSComm1.Input
   End Select
End Sub

0
moduloCommented:
PAQed with no points refunded (of 75)

modulo
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.