Advertisement

05.04.2005 at 07:16AM PDT, ID: 21412376
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

How to receive binary data in VB6?

Asked by KenMac06 in Miscellaneous Programming

Tags: , ,

I can receive ascii-formatted integers without a problem - I just want to avoid the overhead of formatting on my embedded PIC microprocessor & I the overhead of extracting the data back into integer form at the PC end.  
I've set MScomm.InputMode to binary, and the Rthreshold to 10 bytes (0 because I have 5 channels worth of 16 bit data)
 
Every string received is minced: its either the null string"", or "?????"

Private Sub MSComm1_OnComm()    
    Dim i As Integer
    Dim InBufferCount As Integer
    Dim Tmp As Integer
    UploadData As String ' I've tried Byte and Variant. A byte array might work, but I don't know how to copy a String into a
                                   ' Byte array  
 
   InBufferCount = MSComm1.InBufferCount ' is 10 only if inputMode is set to Text
    UploadData = MSComm1.Input ' copy Input in case it gets overwritten by more incoming data
           
    For i = 0 To 4 ' 5 channels of 16 bit data - haven't included the stuff to combine the hi & lo bytes.
' this is the bit that doesn't work....
        'Tmp = Val(Mid(UploadData, i, 1)) ' Tmp and Val give a type mismatch - can't seem to extract the data from the sub
                                                          ' string from Mid(UploadData, i, 1))
        Ch(i).Text = MidB(UploadData, (2 * i) + 1, 1) * 256   ' this works but only
                                                          ' when  UploadData contain Text rather than binary
    Next i

'End Sub

Any ideas?
Start Free Trial
[+][-]05.04.2005 at 07:30AM PDT, ID: 13927011

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2005 at 07:31AM PDT, ID: 13927030

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2005 at 09:18AM PDT, ID: 13928201

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.04.2005 at 09:54AM PDT, ID: 13928502

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.05.2005 at 04:03AM PDT, ID: 13934361

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.05.2005 at 04:25AM PDT, ID: 13934456

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Miscellaneous Programming
Tags: binary, vb6, data
Sign Up Now!
Solution Provided By: softplus
Participating Experts: 3
Solution Grade: B
 
 
[+][-]05.18.2005 at 02:07PM PDT, ID: 14031321

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.19.2005 at 06:40AM PDT, ID: 14036153

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43