Typica

Serial Scale Support in Typica

If you head over to the Downloads page you'll discover that there's a pre-release build available that extends Typica's support for scales connected to the computer through a serial port. This is intended to allow Typica to support a broader range of hardware than the current release build can.

Scale configuration options in Typica

As with other sorts of devices, there's little agreement among different hardware manufacturers or even across different product lines from a single manufacturer about how a computer can talk to a scale. The most straightforward approach, and the only one Typica currently supports, is to use a simple text based protocol. The computer sends a command, often a few characters long followed by some sort of terminator such as a line ending, and the scale replies with some text usually containing a number and a measurement unit followed by a line ending. These are easy to integrate into various systems. The catch is that there is no widespread agreement of what a computer should send to get a response from the scale and the responses are similarly variable. Just as I don't have the hardware budget to make Typica work with every piece of hardware out there that can collect temperature measurements, I can't afford to make it work with every scale out there (and the producers of some popular scales have gone out of their way to make the dumbest possible design decisions on their communications protocols).

Adam PGL 4001 behind the lab roaster

When I first added scale support to Typica, I had one scale in mind: an Adam PGL 4001, which I have on the table with my lab roaster. When that roaster was installed, there were not a lot of options for how this could be positioned for getting gas up through the floor, proper venting through the roof, and maintaining a clear path to the rear exit in case of fire (never mind that the stuff most likely to cause fires would have people going for the front doors). There isn't a good place to put a laptop computer at that roaster where I could use Typica easily while also being able to see what's going on at the roaster or pull samples mid-roast. I could, however, mount a touch screen at the front of the roaster. With that sort of setup, anything that I could do to reduce the amount of typing I needed to do would make Typica easier to use at that roaster. This is why it's possible to drag and drop scale measurements. If you have a keyboard, it's easier to just read the numbers and type them in, but without a keyboard, drag and drop is easier.

Since adding that support, I've been asked to extend that to other scales. Sometimes these are scales that are too different from what I have. I'd need to have hardware to test that against (nobody who wants me to write code to support more hardware wants to buy me hardware that I can use to test that the code works). Sometimes the scale manufacturers don't properly document their communiation details to force you into their software (tip for device makers, your apps will always suck, please make it easy for people to make the software they want to use work with your hardware). Some scales, however, just need Typica to send a different command string, so why not make that configurable?

That's what the pre-release build currently available does. When you add a scale, you'll need to know the command string needed to get a measurement from the scale and you'll also need to know which of three fairly common line endings are used. Some scales might still need additional configuration options to work, but if you have a scale with a serial port on it that you'd like to use with Typica, I'd encourage you to try that build and see if you can get it to work. If you can, I'd appreciate an email with the manufacturer and model number of the scale and the configuration settings you used to get Typica to communicate with it so I can add that information to the documentation for the next release. If you can't get it to work but it seems like it should, I'd also appreciate knowing about that.

Here are scales and settings currently known to work:

Scale Weigh Command Command Terminator
Adam PGL Series !KP CR
OHAUS Defender Series IP CR
I will update this post if people send more information to add to this table and this information will also be incorporated into the documentation for the next release of Typica.