[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2004
  • Last Modified:

Reading weight from a USB-attached Fairbanks SCP-R9000 Scale

As part of our solution, we have written a USB HID BHO component that reads weight from a Toledo PS60 scale in C#.

Now we are trying to do the same for a Fairbanks Ultegra SCP-R9000 Scale.  However, no matter what weight we place on the scale, we continuously receive the following byte sequence from the scale.

003 004 012 254 006 000

Any idea what to do to correct the problem and be able to read the correct weight from the scale?
0
EnrouteShipIt
Asked:
EnrouteShipIt
  • 2
1 Solution
 
NiversoftCommented:
From http://www.fairbanks.com/Manuals/50522.pdf, pp 13-15

Data is transmitted on DEMAND from the host device. Transmission to the host will occur when the host transmits a carriage return (HEX 0D) to the scale.

Did you transmit the CR?

If so, can you please post the relevant portion of your code (just the part that actually sends something to the scale and receives the answer?
0
 
EnrouteShipItAuthor Commented:
Thank you for the suggestion; the section of the manual described applies to reading from the COM port.  When a Fairbanks Scale is attached via a USB port, data is read continuously.

The issue turned out to be a problem in the USB HID library being used, with exceptions fired when the the scale was being opened for both read and write.

//m_hHandle = CreateFile(strPath, GENERIC_READ | GENERIC_WRITE, 0, IntPtr.Zero, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, IntPtr.Zero);

was corrected to:

m_hHandle = CreateFile(strPath, GENERIC_READ, 0, IntPtr.Zero, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, IntPtr.Zero);
 
Thanks again.

0
 
EnrouteShipItAuthor Commented:
Troubleshooting solved the issue.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now