I want to use Sockets to listen for scale weight-VBForums
Results 1 to 9 of 9

Thread: I want to use Sockets to listen for scale weight

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Wisconsin
    Posts
    784

    I want to use Sockets to listen for scale weight

    I have a program in vb6 that uses a winsock control on a form that connects to a scale on the network and reads in the continuos output. Once there is a stable weight it closes the connection and shows the weight on another form. I need to convert this to C# and call it from the vb6 application. There are all kinds of client/server chat program samples out there but I do not think these fit exactly with my scenario. Are there any good C# socket articles anyone has a link to that would demonstrate something similar to my needs?


    Thanks in advance.

  2. #2
    Lively Member
    Join Date
    Oct 2010
    Posts
    87

    Re: I want to use Sockets to listen for scale weight

    What industry are you in? I assume the scale connects via serial?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Wisconsin
    Posts
    784

    Re: I want to use Sockets to listen for scale weight

    Actually there is a serial to LAN interface that has a static ip assigned to it.

  4. #4
    Lively Member
    Join Date
    Oct 2010
    Posts
    87

    Re: I want to use Sockets to listen for scale weight

    Quote Originally Posted by mojo69 View Post
    Actually there is a serial to LAN interface that has a static ip assigned to it.
    Now that's interesting. Why not just connect the serial into the pc? and have the pc give you the weight? I assume you have it recorded back to a database?

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Wisconsin
    Posts
    784

    Re: I want to use Sockets to listen for scale weight

    Several computers on the network need to read the same scale.

  6. #6
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,565

    Re: I want to use Sockets to listen for scale weight

    You can simply use the socketclass. Do you have some more info about the scale and the interface? Maybe even WCF can help, with a little luck
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  7. #7
    Lively Member
    Join Date
    Oct 2010
    Posts
    87

    Re: I want to use Sockets to listen for scale weight

    Quote Originally Posted by mojo69 View Post
    Several computers on the network need to read the same scale.
    You can still use serial. I am doing it. The scale is physically plugged into the serial port but then the listener is set to the IP of the pc. Then you simply point the other computers to the IP of the computer.

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Wisconsin
    Posts
    784

    Re: I want to use Sockets to listen for scale weight

    What happens when the computer craps out?

  9. #9
    Lively Member
    Join Date
    Oct 2010
    Posts
    87

    Re: I want to use Sockets to listen for scale weight

    You're going to have that regardless. What happens if the server craps out? Same thing....You fix it. How else are you going to get the data you need?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.