connecting to a scale

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ekow17
    New Member
    • Mar 2008
    • 2

    #1

    connecting to a scale

    I'm trying to write a program where its going to connect to a truckscale, and read that data to a text box I actually think that I'm going to have to connect to the rs232 port on the pc that the scale is connected to so does anyone know how i would connect and retrieve data from that port, if you do u can email it to me at [Removed]
    Last edited by Killer42; Mar 14 '08, 02:26 AM. Reason: E-mail address removed in accordance with site guidelines
  • jeffstl
    Recognized Expert Contributor
    • Feb 2008
    • 432

    #2
    Originally posted by ekow17
    I'm trying to write a program where its going to connect to a truckscale, and read that data to a text box I actually think that I'm going to have to connect to the rs232 port on the pc that the scale is connected to so does anyone know how i would connect and retrieve data from that port, if you do u can email it to me at [Removed]
    I would take your email out of there if I were you.

    I dont think you need a direct way to connect to the port. If there is a port there I assume its putting the data somewhere.

    Hopefully look for that data file and see how its formatted, etc and we can go from there probably. (Assuming the scale device is outputting data to the pc in some file somewhere)
    Last edited by Killer42; Mar 14 '08, 02:27 AM. Reason: Removed e-mail address from quote block

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      This sounds like a job for the old MsComm control.

      jeffstl, you're right about the e-mail address. I've now removed it. The site guidelines specifically prohibit the posting of personal contact details such as this, in order to protect all of you from scammers and spammers who may scan the forum.

      However, in future please don't quote the e-mail address in your reply. :) That meant I had to edit two messages instead of one.

      In fact, since the person who posted the message can only edit it for one hour afterward, it might be best if you just hit the "Report" button in future to bring the message to our attention. (That button means "report this message to the Moderators" - it doesn't print a report.)

      Comment

      • jeffstl
        Recognized Expert Contributor
        • Feb 2008
        • 432

        #4
        Originally posted by Killer42
        This sounds like a job for the old MsComm control.

        jeffstl, you're right about the e-mail address. I've now removed it. The site guidelines specifically prohibit the posting of personal contact details such as this, in order to protect all of you from scammers and spammers who may scan the forum.

        However, in future please don't quote the e-mail address in your reply. :) That meant I had to edit two messages instead of one.

        In fact, since the person who posted the message can only edit it for one hour afterward, it might be best if you just hit the "Report" button in future to bring the message to our attention. (That button means "report this message to the Moderators" - it doesn't print a report.)
        OOOOPS

        Sorry. I didn't realize
        Thanks for the tip on the report button.

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Originally posted by jeffstl
          OOOOPS

          Sorry. I didn't realize
          Thanks for the tip on the report button.
          Many don't. That's why I mentioned it here rather than in a private message. :)

          I described the Report button because I used to think it was for printing out some sort of report.

          Comment

          • ekow17
            New Member
            • Mar 2008
            • 2

            #6
            Originally posted by jeffstl
            I would take your email out of there if I were you.

            I dont think you need a direct way to connect to the port. If there is a port there I assume its putting the data somewhere.

            Hopefully look for that data file and see how its formatted, etc and we can go from there probably. (Assuming the scale device is outputting data to the pc in some file somewhere)
            [CODE=vb]
            Dim comm1 As New IO.Ports.Serial Port
            comm1 = SerialPort1
            'Dim s As Boolean
            's = SerialPort1.IsO pen
            With comm1
            .PortName = 1
            .BaudRate = 2400
            .Parity = IO.Ports.Parity .Odd
            .DataBits = 7
            .StopBits = IO.Ports.StopBi ts.One
            End With
            comm1.Open()
            [/CODE]
            this is what I have so far but I'm stuck I was looking around and It looks like now I have to send a request to the scale for weight but I'm not too sure about that part, do you have any idea of how to code that?
            Last edited by Killer42; Mar 26 '08, 05:27 AM. Reason: Added CODE=vb tag

            Comment

            Working...