A&D scales and balances have always been an excellent choice when it comes to data transfer to a computer, printer or other devices. With a data format that has remained virtually unchanged throughout the company’s history, we have seen customers replace decades-old balances with new ones without having to adapt their existing data acquisition software.
This does not mean that the communication capabilities of A&D balances are not evolving. The new GX-A, GF-A and GX-AE models are particularly interesting because they are equipped with multiple interfaces and can be controlled by a connected computer (or PLC) via a large number of commands.
Best of all, A&D has documented everything in a 56 page communication manual, which you can download here (PDF).
If you thought that my interface description of A&D’s FX-i and FZ-i balances was already quite comprehensive, you’ll certainly be impressed by this communication manual for the GX-A/AE and GF-A series, which covers more topics in much greater detail.
Table of contents
To give you an idea, you’ll find the table of contents from the communications manual below:
- Applicable models
- Features of the communication function
- Using standard RS-232C / extension RS-232C interface
- Using standard USB interface
- Connecting multiple peripheral devices
- Interface specifications
- Connecting Peripheral Devices
- Cables needed to connect to peripheral devices
- About data output method
- Specific examples when connecting multiple peripheral devices at the same time
- Printing Weighing Values To the Printer
- In case of AD-8127
- In case of AD-8126
- Connecting to a PC or a PLC
- Quick USB mode
- Virtual COM mode
- WinCT data transmission software (USB Virtual COM mode or RS-232C)
- Notes when using quick USB
- Data output
- Data output mode
- Weighing data format
- Output examples of weighing data format
- Other data formats
- Control commands
- The <AK> code and error codes
- Command usage examples
- Error codes
- Error codes list
- The UFC function
- UFC program commands
- Examples of creating UFC program commands
- Internal settings
- How to set
- List of items (communication entries only)
- Key lock function
- Locking all key switches
- Locking specified key switches
- Checking the software version of the balance
One of my favorite things about this manual are the examples, which clearly presented and easy to follow:
Is something still missing?
In my opinion, this is the best communication manual I’ve seen from any weighing instrument manufacturer so far.
My only suggestion for improvement as far as the manual itself is concerned is to add a warning symbol next to the footnote on page 6, which mentions the 12 V voltage on pin 9. When connecting the balance to a device which also uses pin 9 in this way (such as Zebra printers), both devices could malfunction and possibly be damaged. To prevent this from happening, a custom cable must be used instead of a standard cable that connects all pins.
Tare weight and gross weight
When the tare weight is set by the operator by pressing the RE-ZERO button on the balance, it is not returned when using the “?PT” or “?T” commands. This is mentioned in the manual, but no explanation is given. It is also not possible to request the gross weight. Therefore, applications which require this data have to be designed so that the tare operation is triggered by the connected device (see example above).
Note: The UFC template language available on the GX-A/AE and GF-A balances allows the tare weight and gross weight (and of course net weight) to be sent to a connected device.
Ethernet, WiFi, Bluetooth
An Ethernet interface is optionally available, but it costs several times more than an external converter (such as Moxa’s NPort 5110A). If it was more affordable, it would attract more customers planning to connect multiple balances to a single PC for data acquisition purposes.
No wireless LAN option exists (so far). The Bluetooth adapter for the RS-232 interface is unfortunately not available in Europe. This makes it somewhat difficult to use the balances under a fume hood and transferring the weight to a computer outside.
A&D could make the balances more compatible with existing systems by adding support for the MT-SICS protocol. While MT-SICS is not the holy grail of all protocols, it is widely used and supported in the weighing industry and by software developers. With companies such as Sartorius, Radwag, Kern (KCP) and Ohaus (on some models) offering support for what is effectively MT-SICS, I see no compelling reason why A&D could not do the same.
The balances already understand the “S”, “SI” and “SIR” commands also used by MT-SICS. When set to the “MT” data format, they come very close to sending the same replies as MT-SICS-compatible weighing instruments:
Very close, however, is sometimes not close enough (see this blog post where communication failed because of one additional “space” character).
Reading and changing settings through commands
Finally, while these balances support many commands covering a lot of functionality, it’s not possible to read and change most of the settings by using commands. If this were an option, a connected computer with a configuration software could change the balances’ settings in a quick and user-friendly way. With new technologies such as WebUSB, it may eventually be possible to change the configuration of the balance directly from a web browser.
Further information on GX-A, GF-A and GX-AE precision balances
BarTender from Seagull Scientific is “the world’s leading design and print software for labels, barcodes, cards and RFID tags.” In this article, I’ll show you how to capture the net weight and tare weight from an Ohaus Defender 5000 scale with BarTender.
- This guide applies to the new generation of Ohaus Defender 5000 scales (2018 or later).
- It was created using BarTender 2019 R8 and version 1.05 of the Ohaus Defender 5000 firmware. It may not apply to future versions.
- I’m not a BarTender expert, if you think that you have a better solution, please let me know in the comments.
BarTender communicates with a scale by requesting the weight and – if supported – the tare weight in short intervals (every 250 ms by default). The received data is then parsed using regular expressions.
Unfortunately, the “Ohaus” protocols defined in BarTender do not work with the default settings of the current Defender 5000 scales. They also don’t support requesting the tare weight. Therefore, we’ll use the MT-SICS protocol instead. As you’ll see below, this is a very straightforward solution. However, for a limited number of multi-interval Defender 5000 scales, we’ll need to modify the regular expressions used by BarTender.
Note for legal-for-trade applications (verified scales): If you’re planning to use the alibi memory (SD card) installed in the Defender 5000 indicator, please note that the solution proposed here does not create alibi records. To do so, you would have to use the Ohaus “P” (print) command instead of the MT-SICS command to request the weight. However, this would create an alibi entry every 250 ms, which is probably not what you want either. In my opinion, the communication method used by BarTender is not well suited for use with verified scales and alibi records.
Configuring your Ohaus Defender 5000 scale
Note: This guide assumes that you’ve already connected your scale to your PC. I used the standard RS-232 port found on all current Defender 5000 models. Using the optionally available USB or Bluetooth interface (SPP) would be almost identical.
Apparently, you do not need to change the configuration of the scale, as it already supports MT-SICS commands in its default “Demand” mode. However, if you want to explicitly set it to the MT-SICS protocol, press and hold the Menu button, then press 7 to enter the Communication menu, select the interface you’re using, press 2 for Setup and then change the Assignment from “Demand” to “SICS”:
The other settings on this screen should not matter, as they’re irrelevant for the selected protocol.
Add Scale Wizard Step 1
Start Bartender Designer, select Administer>Weighing Scale Setup and Add Scale. This will launch the Add Scale Wizard. Click on Next.
As mentioned, simply selecting “Ohaus 5000 Series” (or any other Ohaus model) will not work with the current Defender 5000 scales. Instead, select Define a model not listed above and click on Next.
Add Scale Wizard Step 2
If your scale is a single interval scale (which means that the readability does not change over the entire weighing range), select the “Mettler Toledo (MT-SICS Level 1)” protocol and click on Next. Then skip to step 3 of this guide far below.
If your scale is a multi-interval scale, things may get a bit more complicated. It all depends on the readability (aka “graduation”, “d” or “e”) of your scale. If it has the same number of decimal places over all intervals when using the default unit (kg), you can also go to step 3. If the number of decimal places is not the same, continue reading here.
Creating a new protocol
For multi-interval scales that don’t have a constant number of decimal places, we have to make a tiny change to the regular expressions defined in BarTender’s MT-SICS Level 1 protocol. Since we can’t modify existing protocols, click on New to create a new one.
Give the new protocol a name (e.g. “SICS”) and click on Copy existing Protocol.
In every single response pattern except for the last one, locate the following string:
Change it to:
By adding a plus sign, the regular expression now matches strings which contain one or more spaces (\x20) in between the weight (or tare) value and the unit. This is necessary because some multi-interval Defender 5000 scales use two spaces after switching to the second interval:
Note how the second line contains two spaces after “22.25”. With the default regular expression defined in BarTender, this weight value (and all others in the same interval) would not be captured.
I don’t know if BarTender was too strict or if Ohaus was too lax in implementing the MT-SICS protocol. I believe it’s better if I don’t comment on this any further.
Note: If you’re regularly dealing with regular expression, I highly recommend the wonderful RegexBuddy software.
Select the protocol we’ve just defined and click on Next.
Add Scale Wizard Step 3
Welcome back, my lucky readers who did not have to deal with protocols and regular expressions. Change the name of the scale if you feel like it and then click on Next.
In this dialog, you must specify the COM port on your computer that is used to connect to your Ohaus Defender 5000 scale.
This is it! We’re done! Click on Finish, but don’t bring out the champagne just yet.
Testing your Ohaus Defender 5000 scale
Back in the Weighing Scale Setup, select the scale you’ve just added and click on Properties.
Click on Test Connection. If everything is correct, BarTender should show the Net Weight and Tare Weight received from your scale:
Should you not see any weight values, you’ll find some troubleshooting information below.
Troubleshooting a scale connection
Unfortunately, communication problems with scales can have many causes and are often difficult to solve. I can’t give you extensive troubleshooting instructions here, but I’ll tell you the same thing I also tell our software users: Download HTerm, a simple terminal program. Then try to communicate with your scale using HTerm instead of BarTender:
Change the following settings in HTerm:
- COM port,
- Baud to 9600,
- Newline at to “CR+LF” (optional, looks nicer),
- Send on enter to “CR-LF” (required).
Click on the Connect button at the top (shown as Disconnect in the screenshot as I had already clicked on it). Then type the “SI” (send immediately) command manually into the input field (lower red arrow) and press enter.
You should see the command you just sent under Transmitted data and the reply from the scale under Received Data (marked green on the screenshot).
If communication is successful with HTerm but not with BarTender, the problem is with BarTender. If you’ve changed the regular expression as described above, double-check that you’ve not made any mistakes. Contact Seagull Scientific for further support. Please don’t ask me for help in the comments.
If you can’t communicate with your Defender 5000 scale using HTerm, something is wrong with your setup. In my experience, the most likely culprits are:
- Wrong COM port.
- Wrong interface parameters (baud rate, etc.).
- Wrong type of serial cable.
Please understand that I cannot diagnose these problems for you remotely. You may want to contact your Ohaus dealer or pay a specialist to help you.
Did this article save you a lot of time? Please consider supporting my work by buying a PDF version for US$2/copy (contains no additional information).