Is a Serial or Ethernet interface right for you?
Ever since the scale industry started to use microprocessors, scale indicators have been equipped to talk to other devices. In the beginning, these devices were mostly printers which could create a record of each transaction. Then, around 1980, they began broadcasting more complex data, which could allow for automation. Before this time, automation tended to involve mechanical hacks like mercury switches and mechanical counters. But in the 1980’s, machines like bulkweighers, automated batching systems, and in-motion checkweighers were being built and performing as well as, or better than, systems operated by human beings.
From the beginning, the most common interface for this machine-to-machine communication was a protocol called RS232, which had evolved from protocols used by the telegraph industry when those were adapted to early computers in the late 1960’s. This was a method of transmitting a stream of characters with a single electrical signal, and came to be called “serial” because both the bits that made up each character, and the characters themselves were transmitted one after the other. Originally, receiving devices would assemble these characters into a document to be printed. A little later, they were reading dynamic weight and scale status in real time in order to control automatic processes.
The Serial Interface
Serial communication is well suited to embedded devices like scales because both the hardware and software required to implement the protocol are simple and cheap. For this reason, nearly all scales and many other instruments provide RS232 (or serial) interfaces to this day.
The Ethernet Interface
Starting in the 2000’s, and particularly since 2010, many scales have come with another more powerful and modern interface, Ethernet. Although Ethernet is technically a serial interface itself, it was designed from the ground up around the idea of passing packets of data between multiple devices on a network. It is increasingly common for accessories like printers to be available with either serial or ethernet interfaces. When this choice arises, it’s good to be aware that both the older serial and newer Ethernet interfaces have strengths and weaknesses that might be important.
Serial vs Ethernet: Comparing Both Options
Cost of the Hardware:
The older and simpler RS232 interface, also known as the serial interface, can be implemented with simpler and cheaper hardware and software. It’s much better suited to simple embedded devices, and easier to troubleshoot when something goes wrong. It’s easier to configure and set up, and because it’s been around for 60 years, it’s more likely to be supported by older devices.
Cost of the Wire:
This one is tricky. Serial connections tend to be dedicated and point-to-point. The wire is less fussy than Ethernet wiring, but it generally can’t be shared. By contrast many facilities have existing Ethernet networks and instead of a long dedicated cable run, a customer can just provide network drops wherever they are needed, which can be shared with unrelated devices like cameras. The means to route packets from source to destination on a complicated network are baked into the interface itself. But this also means configuration is tricky, and a “scale failure” might really turn out to be something in the customer’s network that is blocking the traffic. This is becoming more common as network owners deploy more security measures because of malware and hacking.
Speed and Data Integrity:
Ethernet is faster than serial. A lot faster. And mechanisms for protecting the integrity of a packet, and replacing it if it is lost, are baked into the interface. This can be important when recording transactions or printing complicated tickets, labels, or reports, which could take significant time to transmit over a serial interface.
Since the 1980’s there have been schemes for converting RS232 data to radio for those situations where running a wire isn’t practical, and none of them have worked very well. But Ethernet, with its built-in mechanisms for verifying packet integrity, deals easily with the added problems a wireless connection can create, and economies of scale have made WiFi equipment ubiquitous and cheap.
The flip side of the speed issue is that when a serial interface sends data, it arrives at its destination at the speed of light. By contrast Ethernet data may bounce around a network, being cached in multiple switches and routers before arriving at the device for which it is intended. Because Ethernet is a shared medium, it is also subject to data congestion blockages if too many devices try to use a connection at the same time.
This can be a significant problem if the data is being used to control a dynamic weighing process like batching or in-motion checkweighing. In fact, the most common Ethernet protocol, TCP/IP, is positively terrible for this kind of real time communication. When transmitting a stream of weight data, we usually don’t care if a measurement is lost now and then, since there is always another coming a fraction of a second later. But in its zeal to protect all data integrity, TCP will stop all communication as it waits for the lost packet, then initiate a handshake to get the transmitter to replace it before allowing any other data through. There are ways around this, such as UDP and “non-transportable protocols,” but those are less universally supported, and using them requires more knowledge of how Ethernet works.
Because it requires a dedicated wire, serial data is limited to that wire. Once a packet is transmitted on Ethernet, it can be routed practically anywhere in the world by the Internet at little additional cost.
Many of the new scales which support Ethernet also have built-in file systems and web servers. This means that instead of printing a report to get a list of the day’s transactions, that report can be built as a file and served to a computer running a web browser. This can eliminate a dedicated printer and daily chore, and take the reporting process out of a difficult industrial environment into the office. Scales can even serve the data in formats intended for other machines to automatically import to spreadsheets or databases for further processing. This can be a significant upgrade to an older system that was implemented when the only choice was a serially interfaced printer for making human-readable tickets and reports.
Serial connections can be troubleshot with a voltmeter, and by replacing one or another of the devices on the line with a computer. There is a lot more to go wrong with the more powerful and complicated Ethernet interface, and even eavesdropping on the traffic can be very difficult. Configuration parameters like IP addresses must be matched to even attempt communication. On a corporate network, security measures can complicate the situation. When using Ethernet it’s a good idea to make sure everyone understands who is responsible for every element of the connection.
Although it’s still the superior choice for a number of purposes, it can’t be denied that once ubiquitous serially interfaced devices like printers are getting harder to find.
Need Help Finding the Right Equipment for Your Environment?
Contact your nearest Michelli Weighing & Measurement location to speak to an expert about your application & environment today.