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.
Re: I want to use Sockets to listen for scale weight
What industry are you in? I assume the scale connects via serial?
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.
Re: I want to use Sockets to listen for scale weight
Quote:
Originally Posted by
mojo69
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?
Re: I want to use Sockets to listen for scale weight
Several computers on the network need to read the same scale.
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
Re: I want to use Sockets to listen for scale weight
Quote:
Originally Posted by
mojo69
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.
Re: I want to use Sockets to listen for scale weight
What happens when the computer craps out?
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?