-
Feb 21st, 2012, 08:19 PM
#1
Thread Starter
Fanatic Member
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.
-
Feb 27th, 2012, 06:07 PM
#2
Lively Member
Re: I want to use Sockets to listen for scale weight
What industry are you in? I assume the scale connects via serial?
-
Feb 27th, 2012, 08:08 PM
#3
Thread Starter
Fanatic Member
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.
-
Feb 27th, 2012, 08:33 PM
#4
Lively Member
Re: I want to use Sockets to listen for scale weight
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?
-
Feb 28th, 2012, 08:57 AM
#5
Thread Starter
Fanatic Member
Re: I want to use Sockets to listen for scale weight
Several computers on the network need to read the same scale.
-
Mar 5th, 2012, 09:05 AM
#6
Lively Member
Re: I want to use Sockets to listen for scale weight
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.
-
Feb 28th, 2012, 03:36 PM
#7
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
-
Mar 6th, 2012, 12:04 PM
#8
Thread Starter
Fanatic Member
Re: I want to use Sockets to listen for scale weight
What happens when the computer craps out?
-
Mar 6th, 2012, 12:51 PM
#9
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|