Serial Communication problems with VB6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brianisu
    New Member
    • Feb 2007
    • 2

    #1

    Serial Communication problems with VB6

    I'm using VB6 to communicate with a weigh scale and am having trouble getting it to respond to my commands. The scale is hooked up using a RS232 to the COM port .

    Using Hyperterminal I can receive a read out from the scale by manually hitting a send button on the scale unit or using a Control E command (the command given by the manufacturer). When i switch into VB and use MSCOMM, i can still receive from the unit when i manually press the button on the unit but cannot get the Control E command (5, HEX (05), ENQ, etc...) to the scale unit.

    Any ideas on how to get this command into the proper form and send it through VB so i can command the scale to give me a read out when i want?

    Thanks.

    brian
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Hi. Would you please post the code you have so far?
    thanks

    Comment

    • brianisu
      New Member
      • Feb 2007
      • 2

      #3
      The code i've been using so far is one that i found here:

      http://www.programmers-corner.com/sourcecode/111

      After changing the settings to match my device, I have been working with the first sub by trying different things with the output. I've tried dimensioning a variable as a byte and sending that with different values with no luck.

      any ideas would be greatly appriciated.

      brian

      Comment

      Working...