Visual Basic Dot Net Code to Communicate with a weight scale

J

Jay Patel

Hello,
I need to write visual basic.net code to interface with a Mettler
Toledo Shipping Scale that interfaces with a PC via USB or a serial
port. I have seen example code on how to communicate via a serial
connection (RS-232), but am not sure as the process if it is connected
via USB. Is the USB port seen then as a COMM port, or is there a
different type of connection a USB port creates that I would have to
open? The scale will take as an input one character, and then send
back a response. If anyone out there can help, I would greatly
appreciate it.

-Jay
([email protected])
 
J

Jay B. Harlow [MVP - Outlook]

Jay,
When the device connects to the PC via the USB, is it emulating a serial
port or is its own device?

If its emulating a serial port, you can simply continue using the COMM port
as is.

If it is its own device, then you will need to communicate with that device.
Remember that USB is not the device, USB is just the Bus that gets you to
the device.

Note: I have a USB to Serial cable that my .NET program simply sees as a
normal COMM port. There is a special device driver that virtualizes the USB
to Serial cable to make this work.

Hope this helps
Jay
 
W

wryoung98

Jay B. Harlow said:
Jay,
When the device connects to the PC via the USB, is it emulating a serial
port or is its own device?

If its emulating a serial port, you can simply continue using the COMM port
as is.

If it is its own device, then you will need to communicate with that device.
Remember that USB is not the device, USB is just the Bus that gets you to
the device.

Note: I have a USB to Serial cable that my .NET program simply sees as a
normal COMM port. There is a special device driver that virtualizes the USB
to Serial cable to make this work.

Hope this helps
Jay
I will be writing some code to communicate with a Mettler Toledo PS 60
scale next week I have asked the tech department to send me
communication specifications. All I want to do is capture weight.

Let me know if you still need help. Or if you can assist me.

P.S. I will be coding in Delphi. :)
 
T

Thomas Lutz

If your scale connects to your PC using a RS232 connection or a USB
connection that emulates a RS232 connection and you do not want to
write serial communications code, you could also use a product called
WinWedge from TAL Technologies to get the data from the sale directly
into your application program.
WinWedge is designed to run in the background and capture data from
RS232 instruments (including scales and balances) and it then feeds
the data that it receives to other programs by stuffing the data
through the keyboard buffer so that the data appears as if it is being
typed in on the keyboard.
You would develop your application to expect someone to type in the
data from the scale and then you would simply use WinWedge to feed the
data to your application as keyboard input. WinWedge even has
"hotkeys" that you can define that would prompt the scale for a weight
reading when you press the hotkey on your keyboard.

For more information about WinWedge please visit www.taltech.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top