cancel
Showing results for 
Search instead for 
Did you mean: 

Talking to a USB scale

Former Member
0 Kudos


There have been a few posts regarding USB ports and such, but none have really answered my myriad of questions. So, in a more generic phrasing this ... Does anyone have experience interfacing to a USB (I'm assuming HID device) scale? We're currently using the Greenleaf RS-232 OCX to talk to Symbol Technlogies' virtual COM driver, but the virtual COM driver is not compatible with 64-bit PCs. In an effort to remove this dependency on 32-bit platforms, I have to come up with ways to talk to our scanners and scales in a way that is bitness-agnostic. For the scanner, Symbol has a Ole Point of Sale (OPOS) OCX that works. For the scales, currently Pitney-Bowes, but we bought Toledo scales, too, as backups. With USB, not RS232. D' oh!

I've seen references to mscomm.ocx. Don't know how this works. Chris P. mentioned plain old FileOPen(), but I don't know the USB port name. KInd of in a pickle here of lack of knowledge. Oh, if I ask Pitney-Bowes, they have a driver for their app only. Toledo has an OCX that talks to their serial scale. Doesn't seem to be a generic USB HID OCX out there.

In an earlier post I mentioned that Symbol (Zebra) has an SDK for scales and scanners, but it heavily bit-dependent. This won't work for us due to a mix of client PCs out there.

Larry Molter

CCS Medical

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Larry,

Not sure if this will help, but I wrote a system that runs under PowerBuilder to read vital signs from monitors in real time.  The monitor communications were varied; serial, network and USB.  We were able to get serial communications to work on at least one of the USB monitors by using a serial-to-usb adapter and talking to the port created by the adapter's drivers.  Not sure it would work for you, but maybe something to investigate?

Christopher

P.S. https://support.microsoft.com/en-us/kb/832678

Former Member
0 Kudos

Christopher, thanks. But to monitor the USB monitor, you still needed a serial port, right? The serial-to-usb cable driver talked out through the serial port. We, unfortunately (or fortunately) want to not be dependent on physical or virtual serial ports. The former because we have to order separate COM cards for all our new PCs - very few have a serial port on the motherboard anymore. But... we may have to rethink this whole thing.

Former Member
0 Kudos

Hello Larry,

Actually, it worked both ways.  We also had computers w/only USB ports connected to serial monitors (different adapter).  But the virtual serial port talked through the USB port to the serial monitor.

Roland is correct, can you give us a link and maybe we can be of more help.

Christopher

Answers (2)

Answers (2)

Former Member
0 Kudos

Can you give us a link to the manual for the scales you are using? We might be able to give you some better pointers if we knew the exact models you are using. I am fairly decent at plain C programming so could probably translate it to PB for you if they have examples.

Former Member
0 Kudos

Ok. In a bit because the physical scales are in boxes at a different location. We haven't connected them yet. They were bought as 'spares' but no one asked if we could talk to a USB scale before purchasing them. Toledo-Mettler (sp??). Don't have the model number. I can get that a little later.

Thanks.

Former Member
0 Kudos

JT75 Pitney-Bowes (in a Toldeo-Mettler box!).

Former Member
0 Kudos

I can't find anything online. There are JN75 hits on ebay but other than that nothing. I searched JN75 and JT75 on the P-B website and nothing.

Former Member
0 Kudos

Hello Larry, I have tried the Pitney-Bowes site, the Mettler-Toledo site and general Google searches for JT75 scale and came up empty. Anything you can do to help get us in the correct place? Christopher

Former Member
0 Kudos


Oops. It was JP75. But... the wrong paperwork was in the box. Actually a Toledo-Mettler PS60. Through trial and error and seat of the pants programming, I used a USB library for VB6 called UsbHidApi.dll to make initial contact with the scale. I also managed to find a technical document describing the host commands, e.g., zero the scale, read the weight, and such. Alas, sending these commands was futile -- error code each time from the library. Surprisingly, I was able to open the scale port (had to hard-code the vendor and product id's and other stuff) and read data. It seems that this scale is always sending a 6-byte stream containing the weight and other unknown values. No specs of the 6 bytes coming back. And no active forum at Toledo/Pitney Bowes to inquire to.

So, I'm not ready for prime time yet. I can display the weight in a PB window, but I don't know why the commands are not digested, not do I know how long to wait before the weight value is stable, and stuff like that. It's a friggin' black box, and it shouldn't be.

Message was edited by: Larry Molter

Former Member
0 Kudos

Here's the tech doc for the PS line of scales: Link

Useful bit of info near the bottom of the doc under Protocol:

"Mettler Toledo has additional information to assist software developers to communicate to the PS scales by USB. Please request document 64068935, USB Protocol Specifications for PS Scales, from your local Mettler Toledo representative or call 1- 800-786-0812. In addition to the usage tables referenced above, this document includes the vendor extensions for full PS scale functionality."

According to that, you should be able to get the full communication protocols.

Former Member
0 Kudos

Oh, man! I missed the 'USB' in the Protocol Specifications title. Yes, this may help tremendously. Our Distribution Center VP has Pitney Bowes (Toledo?) contacts. I'll send him the info.

Thanks for pointing out what I missed.

Former Member
0 Kudos

Hi Larry;

  Check out Real's PB code example on how to locate USB devices & ports ..

Get CPU or other hardware infos - Real's Powerbuilder HowTo

HTH 

Regards ... Chris

Former Member
0 Kudos

Hi, Chris. I copied Real's code to a button. Amazingly, it worked as designed -- it showed a list of USB hubs. Not exactly what I need, but at least PB can see what's there. Next step is to connect to a device and talk to it. Real's code could maybe be modified to look at devices instead of hubs and I could use it detect if a scanner or scale was connected. There's potential here.

Thanks.

Former Member
0 Kudos

One step at a time my friend!