Serial Communication, Bits and the Baud Rate

Abstract Representation of Data by Pixabay

If you’re interested in a balance’s data communication capabilities, you might have noticed the section concerning baud rate in the manual. What is the baud rate? How does it relate to scales and balances? How can it be used to your advantage? Let’s take a look at serial communication.

What is a Bit?

To explain the baud rate, we must first define bits. “Bit” is short for “binary digit.” A bit is the smallest increment of data in a computer and holds a single binary value of 0 or 1.

Serial Communication

Adam scales and balances use RS-232 cables to send data asynchronously, meaning each operation begins when the previous operation sends a signal to indicate completion. Data is sent bit by bit, one after the other, beginning with a “Start” bit, seven to eight data bits, a parity bit (also called “check bits,” they are optional. They are a simple way to detect errors via code.) and one or more “Stop” bits. The data is transmitted in reverse order of importance, with the least important bit sent first and the most important bit sent last.

Back of Highland Compact Precision Balance

Parity

Parity bits are selectable, allowing users to choose none, odd (adding a “1” to make the number of “1s” in the sequence odd) and even (adds “1” to the sequence to make it an even number of “1s”). If there is an extra or missing 1 in the sequence that includes a parity bit, that means the sequence has an error. This verification only works for a single mistake within a sequence. There is no “better” option; if you choose to include parity, just pick the parity polarity that has the highest chance of catching errors you could make.

So, What is the Baud Rate?

The baud rate is the rate of information transfer communicated in a channel. You could refer to it as the transmission speed of bits, as it refers to the number of bits per second that can be transferred. If the baud rate is 9600 (standard for our scales and balances), it means the device can send 9600 bits per second at maximum output.

Many devices allow users to adjust the baud rate to their liking. Some Adam products allow users to choose between 4800, 9600, 19200 or 38400 bits per second. The baud rate MUST be set to the same amount on the transmitter and the receiver. For example, you cannot set your scale to transfer at 9600 bits pers second and set your computer to receive 19200 bits per second.

Cables on Back of Machine

Which Balances Include a Baud Rate?

Any balance or scale allowing serial data communication features a baud rate, since it needs to transfer bits. Industrial platforms and analytical balances alike can offer that option. Users might be able to configure more options with higher-end models that include more functionalities, but the essential components remain the same.

Connectors, Inputs and Outputs

Devices with serial communication capabilities can be connected via a nine-way connector or a 25-way (sometimes also referred to as D-sub 25-pin or D-sub 9-pin). The number (nine or 25) refers to the number of pins used to transfer data. Some pins have different functions. The pin function also depends on whether the DB9 connector is male or female. There are two types of RS-232 cables: null modem and straight cable. A null modem cable connects the transmitter pin of a male DB9 to the receiver pin of the female DB9, and vice versa. The straight cable simply connects transmitter and receiver pins to each other. The results are often output in the ASCII format. To learn more about ASCII for scales and balances, read this blog post. You can also check your scale’s manual, where the data output will be explained.

Male DB9 Connector

Representation of Male DB9 Cable

Pin Number

Signal Direction

Signal Name

Signal Function

1

Transmitted

CD

Carrier Detect

2

Received

RxD

Receive Data

3

Transmitted

TxD

Transmit Data

4

Transmitted

DTR

Data Terminal Ready

5

N/A

GND

Ground

6

Received

DSR

Data Set Ready

7

Received

RTS

Request to Send

8

Transmitted

CTS

Clear to Send

9

Transmitted

RI

Ring Indicator



Female DB9 Connector

Representation of Female DB9 Connector

Pin Number

Signal Direction

Signal Name

Signal Function

1

Received

CD

Carrier Detect

2

Transmitted

TxD

Transmit Data

3

Received

RxD

Receive Data

4

Transmitted

DTR

Data Terminal Ready

5

N/A

GND

Ground

6

Received

DSR

Data Set Ready

7

Transmitted

CTS

Clear to Send

8

Received

RTS

Request To Send

9

Received

RI

Ring Indicator


Why Use RS-232 Cables?

There are many answers: they’re affordable and easy to set up, among other things. If an electronic device is capable of serial communication, chances are it will be equipped with an RS-232 interface. RS-232 devices take minimal resources (less than, say, a USB interface) and can work with more rugged electronics. RS-232 cables can also transmit data faster over long distances. It’s an older standard, so organizations with less resources available can still transmit data without having newer machines. That is not to say USB is not a viable form of data communication, but, as of now, RS-232 cables offer easy and rugged capabilities in a convenient package that works well with older hardware, so they’re more accessible.

In addition, wired connections are more secure than Wi-Fi or Bluetooth connections. Wireless connections can be tapped into, bugged, intercepted, interfered with and more. There can also be connectivity issues having to do with the layout of the building, the distance between the balance and the computer or erratic connectivity (as anyone who’s ever tried to connect their phone and earbuds can attest). Wireless connections can also drain a battery much faster, which can be a problem if you need the scale to function all day without charging.

“But,” you might say, “most PCs don’t even have RS-232 interfaces anymore.” That’s true, which is why we offer RS-232 to USB connectors to ensure your device can still communicate with modern laptops and compact peripherals that are not equipped with RS-223 interfaces. The data sent by the RS-232 cable is sent directly to the USB port, where software creates a virtual serial port that interprets the data so it can be “read” by the USB interface. If you’re using a USB to RS-232 cable interface, the process is the same, just reversed.

Cables on Back of Machine

Setting Parameters

Your scale or balance will often allow you to set various parameters (including the baud rate). These are some of the settings you will see most commonly. Don’t forget to check the manual before adjusting the parameters.

Enable: enables or disables a serial port. Users can toggle them on or off.
Baud: Allows users to select the baud rate. Don’t forget, you must select the same baud rate on the receiving and transmitting sides.
Parity: Set the parity to none, odd or even.
Stable: Users can toggle this setting on and off. It determines if the scale can transmit data only when the scale is stable, or at all times.
Continuous: Users can choose data to be transmitted at all times (continuously) or only when the PRINT button is pressed.
Periodic: Users can choose to periodically transfer data every preset time period (for example, every 30 seconds). That option can be turned off as well.
Format: Allows users to format the output of data that is printed or transmitted.

If you have additional questions about data communication, feel free to contact us. We’ll be happy to help you.

How would you rate this article?
i

Schreibe deinen Kommentar

Please note that all posts are moderated before being placed live.