Ohaus Defender 3000 scales: Commands to request the weight (and to control the scale).

The Ohaus Defender 3000 series scales with T32XW and T31P indicators can send the weight via the standard RS-232 interface. There are several ways to trigger data transmission:

  1. By pressing the print button1 on the scale,
  2. automatically at each stable weight,
  3. continuously2 at a rate that depends on the baud rate (approx. 50 values/s with standard setting 9600 bit/s; 100 values/s with 19200 bit/s)3,
  4. in intervals from 1 s to 3600 s,
  5. on demand via the interface with a suitable command (bidirectional communication).

In this article I’ll describe the 5th method: a device connected to the balance via the RS-232 interface (e.g. a computer, microcontroller, PLC, etc.) sends a command to the balance and it responds with the weight:

Requesting the weight from an Ohaus Defender 3000 scale
Made by me with Microsoft Whiteboard, an application that fits my limited artistic talent
Notes:
1 Originally, scales were more often connected to printers than to computers, hence the name “Print”.
2 Continuous transmission (3) is not possible with verified (legal-for-trade) scales.
3 The actual measuring rate (conversion rate) is always approx. 16 values/s.

All explanations in this article refer to the current (October 2021) generation of the Ohaus Defender 3000 with the T32XW indicator with firmware 1.03 (left in photo above) and the T31P indicator with firmware 1.14 (right in photo).

Instruments with different firmware as well as older or possible future newer Defender 3000 models may behave differently. For verified (LFT) scales, some features are disabled (also, legal requirements must be observed when connecting verified scales to computers).

Commands to request the weight and data format of the response

To send commands to the scale and to view the reply, you can use any serial terminal software (I’ll be using HTerm). No settings need to be changed on the scale: by default, data transmission by pressing the print key (1) and requesting the weight via the interface (5) is supported.

Important: In HTerm, be sure to select “CR” or “CR-LF” in Send on Enter under Input Control so that all commands sent to the scale are terminated with these characters (required).

The following commands are listed in the user manual (PDF), I’ll discuss them in detail below:

Defender 3000 scale commands

SP command (Print when stable) – does not work as expected

If the scale sent the weight as soon as it stabilized after receiving SP, this command would be very interesting. However, the Defender 3000 does something completely different: it sets the Print > Stable setting to “On” and responds with “OK”:

SP command Ohaus Defender 3000 scale

As far as I know, this setting cannot be changed back to “Off” with any command (except the Reset command). It must be changed directly on the indicator in the Print menu.

This command is unfortunately useless for retrieving the weight. On other scales, such as the Ohaus Defender 5000, it works as expected.

P command (Print)

The P command corresponds to pressing the Print button on the scale. Therefore, the already mentioned stability setting (Print > Stable) is observed:

Print > Stable: “On”

If Print > Stable is set to “On”, the weight is only sent if it is stable (an asterisk * appears in the upper left corner of the display when the weight is stable). If the scale receives the P command when the weight is unstable, it does not respond (and the display briefly shows “–NO–“):

P command Ohaus Defender 3000 unstable print stable on

Note: For verified scales, Print > Stable is always set to “On” and cannot be changed.

Print > Stable: “Off

If Print > Stable is set to “Off”, the scale always responds to P with the weight. Unstable weights are marked with a question mark (see below).

Output format of the scale when replying to the P command

The description in the manual is largely correct:

Defender 3000 scale output format

The 7 characters for the weight correspond to the 6 digits of the scale display plus the decimal point. The legend is only used for the gross, net and tare weight (deactivated by default) and is otherwise omitted.

Example 20.00 kg, stable:

P command Ohaus Defender 3000 scale stable

Example -3.18 kg , unstable:

P command Ohaus Defender 3000 scale unstable

Example 11,87 kg, unstable, with unit (Print > Content > Unit: “On”):

P command Ohaus Defender 3000 scale unit unstable

Example with gross, net and tare weight as well as unit (all entries in the Print > Content menu set to “On”), stable:

P command Ohaus Defender 3000 gross net tare weight unit stable

Note: The scale sends the lines with the net weight and the tare value only if the latter is not zero (i.e. if the tare function was actually used).

Same example as above, except that the tare value was set with “1000T” via the interface:

P command Ohaus Defender 3000 gross net pre-tare weight unit stable

The only difference is “PT” (pretare) instead of “T” in the last line.

IP command (Immediate Print)

The IP command can be used only with non-verified scales. After receiving the IP command, the scale sends the weight immediately, whether it is stable or not. Moreover, the response is not influenced by settings in the scale’s menu, so Print>Stable and Print>Content do not play any role.

Output format of the scale when replying to the IP command

For a stable weight, the response consists of 16 characters:

IP command Ohaus Defender 3000 stable

If the weight is unstable, two characters are added (space and question mark at the end):

IP command Ohaus Defender 3000 scale unstable

Other commands

CP (Continuous Print)

Activates the continuous transmission of the weight (possible only with non-verified scales), see point 3 at the beginning of this article. With 0P (zero + P) this can be deactivated again. The data format is similar to those described above.

Caution: The high data rate can overload some programs. In addition, the scale is sometimes falsely recognized as a serial mouse by Windows if it sends values continuously already at system startup (the mouse pointer then jumps wildly across the screen and your customer may call you and complain that your scale made his PC go crazy).

xP (Interval Print)

Transmission every x seconds (with x from 1 to 3600), send 0P to disable. The data format is the same as the P command.

Z (Zero)

For zeroing the scale, corresponds to pressing the Zero button on the indicator. The allowed range for executing the command is controlled by the Setup > Zero setting (2% or 100% of the capacity).

Note: The scale always responds with “OK”, even if the allowed range has been exceeded and the command could therefore not be executed (and the display showed “–NO–“).
Caution: If Setup > Zero is set to “0-100”, the maximum capacity could be unintentionally exceeded (as the zero range is not subtracted from the capacity).

Use the Z command to eliminate small residual values. It is not intended as an alternative to the tare command (see below).

T (Tare)

Same as pressing the Tare button. Suitable for “zeroing” the weight of a container or weighing individual components of a recipe.

The tare function can be deactivated by sending 0T (zero + T). The scale will then show the gross weight again instead of the net weight (only possible via this command, not via a button on the indicator). 0T is probably not supported by verified scales (I haven’t tried this out yet).

Note: If the tare function cannot be executed (because there is no object on the scale), the scale will still respond with “OK”, but will show “–NO–“in the display.

xT (Pre-tare)

Sets x as a pre-tare value, where x must be specified in g. Not possible with verified scales.

Example:

1000T command pre-tara Ohaus Defender 3000 scale

PU (Print Unit)

The scale responds with the currently used unit (without blank spaces, see example under xU).

xU (Unit)

Changes the current unit, 1U=>g, 2U=>kg, 3U=>lb, 4U=>oz, 5U=>lb:oz.

Important: In order to set a unit, it must have been activated in the menu of the scale under Mode > Unit. Otherwise, the scale responds with “ES” instead of “OK”:

unit grams not activated

Verified scales may not support all units (this depends on your local regulations).

Example switching from kg to g:

Change unit to grams

PV (Print Version)

The scale responds with the type of indicator (T32XW or “Defender 3000” for T31P), the firmware version (Sr=Software Release) and the “legal-for-trade” setting (“ON” for verified scales, “OFF” otherwise). With this command you can easily check if your scale uses the same firmware as my test unit.

Example T32XW:

PV command Ohaus Defender 3000 T32XW

Example T31P:

PV command Ohaus Defender 3000 T32XW

<ESC> R (Reset)

Resets all settings to the factory defaults. In my tests, some settings were only applied after a restart. I see no reason to use this command during normal operation (though – unlike on the Ranger 3000 and 4000 – it fortunately didn’t seem to reset anything in the CAL menu).

Example:

Reset command Ohaus Defender 3000

Summary of how to request the weight from an Ohaus Defender 3000 scale

The IP command is the simplest way to retrieve the weight (with the unit) from the Defender 3000. However, it cannot be used with verified scales.

Alternatively, the P command can be used, which is equivalent to pressing the Print button. It is influenced by the Print > Stable setting (send only stable values) and Print > Content setting (scope of transmitted data and unit).

SP is not a command to retrieve the weight, even if the description in the manual suggests this.

The format of the scale’s response differs slightly depending on the command (I don’t know why). I therefore recommended not reading a fixed position from the response string, but searching for the first number instead (which will be the weight).

How to use the Ohaus Defender 5000 demo kit suitcase

The demo kit allows you to easily test the many interfaces available for the Ohaus Defender 5000 indicator. Its sturdy case is well suited for shipping.

Follow these steps to start using it:

  1. The required components and cables can be found in the compartment on the left side (1).
  2. Connect the load cell simulator (2) (3).

This device simulates the load cell that is normally installed in the weighing platform. Make sure that the pointers on the gauge are at 0, but do not turn on the scale yet.

  1. Set the selector knob (4) to the interface you want to test (e.g. WiFi/BT).
  2. If necessary, plug in the WiFi/Bluetooth dongle (5).
  3. Connect the device to AC power and switch it on.

Turn the load cell simulator counterclockwise to increase the weight:

The configuration of the interface is done in the menu of the scale. Printed instructions are included in the case (6).

When using a WiFi or wired Ethernet connection, the device acts as a TCP server. By default, the IP address is assigned automatically (DHCP). WiFi uses port 6060 and Ethernet port 9761.

After establishing a connection as a TCP client (e.g. using PuTTY), you can request the weight by using one of the commands listed in the manual. The “P” command corresponds to pressing the Print button on the scale. The device will answer using the default template:

This template can be changed in the menu. The menu also allows you to select a different capacity or graduation.

Note: A micro SD card is included in the device, but it cannot be easily accessed.

Does the A&D AD-1688 weighing data logger also work with scales from other manufacturers?

What is the A&D AD-1688 weighing data logger?

It is a compact device designed to be connected to scales and balances made by A&D via their RS-232 interface. It stores the weight and – if required – a sequential number and the date/time. After weighing, it is connected to a USB port on a computer (just like a flash drive) to access the data:

data logger ad-1688 connected to pc

The CSV file created by the AD-1688 can be opened in applications such as Excel by simply double-clicking on it. The weight will appear as a number in its own column, ready for further processing.

Does the data logger work with scales from other manufacturers?

Sometimes, but it almost never works as well as with scales from A&D. In our tests, the following problems occurred.

Connectors and pinout

Weighing data logger AD-1688 connectors
Connectors of the cables included with the AD-1688 weighing data logger

The data logger comes with suitable cables for (almost) all scales and balances made by A&D. On a DE9 connector (often erroneously called DB9), it uses pins 2 (RxD), 5 (GND) and 6 (DSR), though the latter is not strictly necessary. To connect to scales from other manufacturers, you may need adapters such as “gender changers” or null modem adapters, or you may need to make a special cable:
rs232 gender changer null modem adapter

Please do not assume that the pinout is compatible just because the connector can be plugged in on your scale!

Possible damage

Some scales use pins of the RS-232 port for other purposes, e.g. for powering peripherals such as check weighing signal lights. These pins must not be connected to the AD-1688!

Power supply via the RS-232 interface

The AD-1688 gets its power from the scale it is connected to (or the USB port when connected to a computer). RS-232 voltage levels are clearly defined in the RS-232 standard. Nevertheless, the “RS-232” interface of some scales does not supply the voltage required to operate the AD-1688. On a Kern DE parcel scale, for example, the data logger did not turn on at all, even though the pinout matched:

ad-1688 weighing data logger and kern de scale
AD-1688 weighing data logger conencted to a Kern DE parcel scale

Further analysis revealed that this scale did not contain an RS-232 transceiver and that logic one (“mark”) was sent as 0 V (instead of −15 to −3 V).

Interface parameters

The settings for baud rate, number of data bits and parity must match on the scale and on the data logger, otherwise the AD-1688 won’t be able to read the incoming data correctly.

When using the data logger with scales from A&D, you do not have to worry about this: Almost all A&D weighing instruments use 2400 bps, 7 data bits, parity “even”. This is also the default setting of the AD-1688.

For scales made by other manufacturers you will have to change the interface parameters either on the scale or on the data logger. The AD-1688 supports the following settings:

  • Bit rate: 600, 1200, 2400, 4800, 9600, 19200.
  • Data bits/parity: 7 even, 7 odd, 8 none.

Data format

The data logger expects all data to be sent as ASCII in A&D’s standard format:

First line: byte number; second line: ASCII character sent by an A&D balance; third line: hexadecimal value
 1 2 3 4 5 6 7 8 91011121314151617
ST,+00456.89gCRLF
53542C2B30303435362E38392020670D0A

Only a very small number of scales made by other manufacturers support this exact format. If your scale sends data in a different format, two problems may occur:

  1. Unless each line is terminated with carriage return and line feed, the AD-1688 won’t record it.
  2. Even if this is the case, the numeric value of the weight will not be separated from the unit (and other characters sent by the scale).

You can generally solve the second issue by using the import wizard of your spreadsheet application. With Excel, the easiest way to open the file in the import wizard is to rename it from .CSV to .TXT.

You can try this out yourself by right-clicking here and downloading a (renamed) file we recorded on an AD-1688 connected to an Ohaus Catapult 5000 scale. This is the scale shown in the header image of this article.

Number of lines

Many scales send several line breaks after the weight (for the paper feed of a serial printer). This causes the data logger to create empty rows not containing any data. If you cannot modify the line feed configuration of your scale, you can instead increase the “Line” setting of the AD-1688 to combine several lines into one row.

This will result in empty columns (see example file above), which is much better than empty rows. However, the maximum is 7 lines. Beyond that, data will spill into the next row.

Decimal point or comma

The AD-1688 data logger cannot convert between a decimal point and comma. If you’re in a country which uses a decimal comma, this again means that you will have to use the import wizard of your spreadsheet app to correctly format the weight as a number.

Note: A&D scales let you choose whether the weight should be sent with a point or comma (e.g. “12.34″ or “12,34″) and therefore do not have this problem. You only have to ensure that the “dP” setting on the data logger matches the decimal separator used by your scale.

Transmission mode

Most scales have a “print” or “data” button to send a single weight reading to a connected device. However, this is not always the case. Some scales send the weight continuously with several values per second. This would quickly fill the memory of the AD-1688. You can mitigate this by using the “Rec” setting so that data is only stored at certain intervals, but this is far from ideal for most applications.

Other scales use bi-directional protocols (very common with point-of-sale scales):

nci pos protocol
Example: NCI POS protocol

Such scales can definitely not be used with the AD-1688 weighing data logger as it can only passively record incoming data. It is unable to send requests to the connected scale (see pinout above, there is no transmit pin).

Intended use according to A&D

Finally, the manual (PDF) clearly states that the AD-1688 is designed to be connected to “balances and scales with an RS-232C connector manufactured by A&D“. It was never intended to be used with weighing instruments made by other manufacturers. Given the many pitfalls described here, this is an understandable decision.

Conclusion

The trouble-free operation of the AD-1688 weighing data logger is only guaranteed with compatible scales from A&D.

On scales from other manufacturers, the AD-1688 may work, but there are many potential problems that can cost you a lot of time. Even in the best case, the resulting CSV file will often not be fully comma-separated due to differences in the data format and will require further processing.

If your scale is not made by A&D, consider connecting it to a PC for data acquisition. You can use our Simple Data Logger software, which is designed to work with scales from many different manufacturers.

Note: The information in this article is valid for firmware P1.10 of the AD-1688.

Links and further information about the AD-1688 weighing data logger