Designed & Made in the USA Since 1983

How to Interface with RS-232 Devices

Facebook
Twitter
LinkedIn

What is RS-232?

You may have heard the terms RS-232, serial communication, Virtual Com Port (VCP), and DB9 when researching how to send data from your device to a PC. But what exactly is RS-232?

RS-232 is an asynchronous, serial communication protocol that was standardized in the 1960s as a standard for hardware-to-hardware data transfer. It was used extensively in telecommunications, PC peripherals, and networking.  Let’s break that down:

  • Serial Communication: Serial communication is the method of sending binary data (bits), in series, on a single conductor as opposed to parallel communication where multiple conductors transmit a single bit simultaneously.
  • Asynchronous: Asynchronous communications do not send a clock, or timing signal, with the data. This requires the transmitter and receiver to be set independently to the same interval and size known as the communication parameters.

The communication parameters are comprised of the baud rate, parity, the number data bits, and the number of stop bits. Binary bits are sent one after another at a defined rate, known as the Baud Rate. Bits carrying information are combined into a Data Bit group and terminated with a Stop Bit. An optional Even or Odd Parity Bit can be used as a transmission error check. Parity Bits work by counting all the 1s in the Data Bit group and adding either a 1 or 0 to ensure that the sum of all 1s is either Even or Odd.

MicroRidge devices use a standard comm parameter of 9600-N-8-1. This comm parameter is used in many other RS-232 devices.

RS-232 serial devices are connected via serial cables to serial ports. The most common was the DB-9 (DE-9) size D-subminiature (D-sub) electrical connector. The DB-9 connector has 9 pins for communication and comes in male and female configurations. The Gender of the connector refers to the gender of the pins and sockets, not the plug itself.

Historically Data would be sent from Data Communication Equipment (DCE) to Data Terminal Equipment (DTE). DCE devices would have a female DB-9 port and DTE devices would have a male DB-9 port. The gender of the ports allows for simple Straight RS-232 cables to be used. But as device networks became more complex and hardware served both DCE and DTE roles, Null Modem cables became a common occurrence to interface hardware.

Remember, the gender of the serial port implies the direction of data flow. Data typically flows from a female (DCE) to a male (DTE) port. The sending and receiving of data are done on separate lines and when two DTES are communicating, the Transmit (Tx) and Receive (Rx) must be crossed into a null modem configuration to ensure data is sent to the correct pins. In fact, Null Modem cables are commonly referred to as crossed or crosswire serial cables. 

Although there are 9 pins in a DB-9 connection, most modern applications of RS-232 only utilize pins 2, 3, and 5. Data is transmitted on pins 2 and 3 between the hardware and pin 5 is the common ground.

The other pins have historical uses for handshaking/status that are not necessary with modern . Handshaking was a requirement when device processing speeds were low and communication between hardware needed a system of checks to ensure data was being sent to a device ready to receive data.

Modern Applications of RS-232

Although once prominent in home and professional computing, RS-232 has been replaced by new standards such as USB, which are faster and require less hardware. But, due to its simplicity and robust connectivity, RS-232 remains relevant in industrial settings. For example, RS-232 enables communication of data between devices, such as gages and scales, to your PC.

Interfacing RS-232 with Modern Devices

With the rise of mobile devices, it is very uncommon to see a physical serial port. Serial to USB converter cables can translate the RS-232 data into a USB friendly format. To emulate the functionality of a physical com port, the PC will set up a Virtual Com Port (VCP) to communicate with the USB Serial device.  To read this data, you may have to download a specific driver and then have a dedicated program to read the data from the VCP.

Add Your Heading Text Here

To avoid the setup barrier of VCPs, another option is to translate the RS-232 data into keyboard output. Hardware and software programs that translate serial data into keyboard keystrokes are referred to as Keyboard Wedges. Keyboard Wedges function by converting the serial data into the keystrokes that a  keyboard sends to the PC to “type” the RS-232 data into a program.

MicroRidge’s Solutions

The most straightforward interface that MicroRidge offers is the WedgeLink SP. The WedgeLink SP is a Plug-and-Play Keyboard Wedge device that can type RS-232 data into any program. There are no setup, programming, software, or drivers necessary. Since there is no configuration, a user must select the WedgeLink SP with the same comm parameters as their serial device. As the serial device sends data, the WedgeLink SP will type the data into the active program.

 

The WedgeLink AT is an advanced, configurable hardware Keyboard Wedge. It can read data of various comm parameters and can even detect the comm parameters with the AutoBaud feature. The WedgeLink AT’s primary benefit is the ability to program various parsing schemes. Some devices, such as scales, will output extraneous data, which can lead to additional data processing. The WedgeLink AT’s parsing can cut out superfluous data and enter exactly what you want into your program. In addition to parsing, the Read Switch port can be programmed with the serial commands of the RS-232 device enabling the use of a MicroRidge Hand or Foot Switch to initiate readings.

 

The RS-232 Remote is a desktop transmitter that is part of the MobileCollect Wireless family. MobileCollect works by connecting a transmitter to each device in a facility, turning that device into a wireless node that sends data wirelessly to a MobileCollect Base Receiver. The Base Receiver then sends the device’s data to the PC via USB Serial or Keyboard Wedge output. RS-232 Remotes also have AutoBaud and the ability to parse data from the serial device. A unique feature of the RS-232 Remote is that it can be remotely triggered to take a reading from a Base Receiver via a Foot/Hand switch or software command. Multiple RS-232 Remote Transmitters can be paired to a single base, allowing you to send data from multiple RS-232 devices to a single PCs USB port!

The RS-232 V2 Mobile Module is a small, battery powered, RS-232 Transmitter. It is designed for mobile RS-232 devices such as torque wrenches, ultrasonic thickness gages, and RS-232 indicators. It doesn’t have the parsing or AutoBaud features of the RS-232 Remote, but its form factor makes it a great option when space is at a premium. The read button on the transmitter can be programmed to send a serial command to the RS-232 device to initiate a reading.

The GageWay Pro is a multi-port, wired interface, commonly referred to as a Muxx Box. Typically used to interface multiple Digimatic compatible devices at a gaging station, The GageWay Pro can also If you need to interface with more than one RS-232 device, the Level Converter Cable (GW-LC) can turn each channel into an RS-232 interface. The Read Switch ports for each channel can be configured to send serial commands so that MicroRidge Hand and Foot Switches can be used for each channel to trigger an RS-232 reading. Software commands can also be sent to a GageWay Pro to initiate readings and send serial commands to your device.

If you already possess a Serial to USB converter cable and would like an easy way to send the RS-232 data to excel then WedgeLink is the perfect program! WedgeLink is an easy-to-use program that can read data from a Com Port, parse the data, and send it to any program on your PC via a Keyboard Wedge output. The Lite version is great for simple Keyboard Wedge translation while the Standard version allows for complex data parsing to extract and manipulate your data to meet your needs. With the ability to program up to 50 unique serial commands, WedgeLink can become your serial data hub.

MicroRidge – Your Measurement Collection Specialists

MicroRidge is dedicated to being your measurement collections specialist. With our wide array of interfaces for gages and serial devices, we can connect your RS-232 devices, hand gages, benchtop gages, and various other equipment all on a single system. MicroRidge specializes is sending data from any gage into any software so that your Quality program remains robust and efficient.

Leave a Reply

Your email address will not be published. Required fields are marked *