Introduction

When any new technology is introduced to the factory floor, it must prove that it can withstand the test of time. Some of the biggest challenges are overcoming common objections related to real-time capabilities, connector reliability, and ability to survive under harsh conditions. It is reasonable to believe that USB can also overcome similar adversity. USB has experienced explosive growth in office environments as it is able to support many and variable devices. Advocates of USB understand this and are optimistic for the future and growth of this technology. However, as of right now USB is only the best option for attaching peripherals to PCs.

There is no absolute guarantee that USB’s success with PC technology will carry into the factory floor. It may only find its way into factories as a niche technology for specific applications and scenarios. It is possible control engineers have not even begun to utilize the full potential of USB. There are three primary roadblocks preventing USB from becoming a popular factory technology. In the following article, learn about a very simple, yet, greatly overlooked solution for utilizing USB connectivity in industrial settings.

So Why Does USB Even Exist?

Simply put, computers needed a mid-level communications mechanism for devices that do not require a lot of speed but benefit from having power supplied by the host. To understand this, consider a computer mouse or keyboard. Neither of these devices are in dire need of something fast and pricey like Ethernet, but also need something a little more efficient than standard serial port communication. USB really hits the sweet spot between speed and cost.

Origins

USB has a rather interesting story behind it. USB was originally created in 1996 as PCs began hitting the mass market and became popular in homes and offices. New peripheral devices were being introduced everyday—printers, cameras, media players, external hard drives, you name it. With all these new gadgets came problems. PC users very quickly ran out of serial and parallel ports for all their devices. Managing and delivering all the different drivers for the different devices also quickly became a hassle.

The biggest problem was the market itself. Consumers began demanding smaller, more portable PCs at a lower cost. As a result, it just did not make much sense for manufacturers of PCs to include many, if any serial or parallel ports. They were both expensive and took up a lot of space. It was time for a transition.

By 2004, there were roughly one billion USB devices in the world and growing rapidly. USB had proven to be a step up to serial and parallel ports. They were low-cost, supported lots of different devices, and used a plug-and-play interface.

    Beyond that, the USB feature list includes:

  • Easy connections with no screw terminals
  • Standardized connectors that cannot be mistakenly plugged in the wrong receptacles
  • A Host device interface that can support devices with various levels of performance
  • Hot-Swappable device connections
  • Expandability when you need to add another device
  • Power on the bus to support devices that can exist without a separate power connection
  • Low-cost implementation for device vendors (many embedded processors contain the USB Host and/or Device implementation)

Factories are also a beneficiary of USB technology. Prior to USB, factories used parallel printer ports and other serial ports, such as RS-232 and DB-89, to transfer data between devices. These older technologies were far from perfect and did not always offer consistency, efficiency, and reliability. Factories needed at least six different post types for their different devices. Host computers would need to be restarted or disconnected in order to facilitate connections with their devices. There was a growing demand for a serial based technology that could facilitate immediate interaction between devices using a singular post type. USB helped fix these issues.

Evolution of USB

USB was not created perfectly the first time. When the first USB, USB 1.0, was introduced in 1996, it was merely an external bus that transferred data at a top speed of 12Mbit/s, and could only support the most basic device class implementations.

    Fast-forward 4 years: USB 2.0. “Hi-speed” signaling bandwidth, this milestone improvement provided:

  • Data transfer at a speed of 480 Mbit/s
  • Introduction of the USB mini connector, allowing engagement with smaller devices
  • An enhanced electrical interface
  • Battery charging specifications that allowed USB ports to act as charging stations
  • Supported On-The-Go which allowed USB devices to talk to each other without using the same root hub

USB 3.0 & 3.1

    In 2008, USB 3.0 was unveiled which was another step up from 2.0. USB 3.0 offered:

  • Decreased power consumption capabilities
  • Could initiate communication with the host, which versions 1.0 and 2.0 were unable to do
  • Data transfer speed increase to 5 Gbit/s

Microsoft and Linux originally delayed the widespread use of USB 3.0 by not creating products that supported this technology. Once common operating systems like Windows 8 began to support USB 3.0, device vendors had reason to begin producing more devices that were compatible USB 3.0. In 2013, about a year after Windows 8 hit the market, USB 3.1 was introduced. Nicknamed SuperSpeed+, USB 3.1 is the fastest and latest version of USB technology with transfer speeds up to 10 Gbits/s.

How does USB Work?

Perhaps the biggest reason for USB’s popularity is the minimal need for configuration. In fact, most devices do not require any. Once a new device is connected, the host device identifies the device speed and assigns it an address. This occurs after each power cycle. At the end of the connection process, the host signals to the operating system that there is a new device attached. This is referred to as Enumeration. This allows the operating system to install the necessary drivers so that the two devices can communicate. The host knows which driver to download according to the device’s class code. For instance, 01 is the code for speakers and microphones, while 03 is for keyboards, mice and joysticks. There are 255 different device codes.

USB Pipe

A USB Pipe is a logical channel that connects a USB Host Computer and a functional entity in a USB Device. A USB host can hold up to thirty-two pipes. Sixteen pipes lead into the host and sixteen carry information from the host to the device.

    The different USB Pipes are:

  • Isochronous Transfers: Transfers at a guaranteed data rate, used for video and audio; very fast but can experience data loss
  • Interrupt Transfers: Devices that need instant response, used for a computer mouse or keyboard
  • Control Transfers: Short messages that contain commands and responses
  • Bulk Transfers: Large transfers of data between the host and a device. These include file-type transfers where bandwidth and latency are not guaranteed. Printers use this type.

USB Master-Slave

USB technology utilizes a master-slave relationship. Consider a USB flash drive:
• The PC (master) sends an input request to the flash drive (slave) for information on, say, an image file.
• The flash drive then sends an output back to the PC, which then opens the file.

USB serial communication is made simple as the USB standard uses two connector types – “A” and “B” connectors, supporting up to 127 USB devices. “A” connectors send output data upstream and towards the master, while “B” connectors send input data downstream towards slave devices. Using these two data streams makes it nearly impossible for data to get lost.

Most devices come with very few USB ports, which is why USB hubs are so important in an industrial application. USB hubs allow users to expand the number of devices one master device can utilize. One must simply connect their USB hub to their master device and then connect their slave devices to the hub, or connect more hubs to the original to create a multiplier effect. Both small slave devices and hubs draw power from the host device. However, larger slave devices, like printers, must draw their own power. It should also be noted that USB technology is best used with Windows operating systems and does not perform as well with Linux operating systems or embedded devices.

USB Electrical Interface

USB operates on 5VDC power and 100ma is the basic unit load for USB. Devices that are designated as being low-power devices are unable to draw more than one unit load. On the other hand, high-power devices cannot draw more than five-unit loads, or 500ma.

Self-powered devices, such as printers or other large machines that require external power, can draw no more than one unit load from the bus. USB 1.0 had four wires: two common lines, two data lines, and 5VDC. The data lines suppress electrical noise via differential signaling. The electrical implementation of the first USB was practically identical to that of RS-485. The original USB specification simply included a standard four-pin plug and a receptacle. The A plug connects to the hub while the B plug connects to the device. Once the Mini A and Mini B were introduced, things got a little confusing. These smaller plugs included a fifth wire which is used for identification-the ID line in the host controller determines whether a device is plugged into a USB port.

USB Shortcomings in Factories

While USB is such a dynamic way to attach peripherals to a PC in an office or home atmosphere, the technology often falls short in industrial settings. The reason? There are three. First, Industrial machines typically lack USB ports, making connectivity extremely difficult. PLCs are often not built to receive data from USB. In fact, it is hard to find a PLC that has many, if any USB ports. Rather, you can find RTU and Ethernet ports. This is simply because USB is just now emerging as a viable option for connecting factory devices. On a limited basis, it is possible to simply use a USB to serial converter for devices that utilize RS-232 or RS-485. However, this only works if the end device can perfectly interpret the serial messages being sent by the peripheral, which would mean that both devices use the same industrial protocol. This is quite rare.

Serial Converters are traditionally for either Ethernet to Serial or Serial to Serial type of applications. It is far more likely that your PLC will not be able to easily interpret the messages being sent, and some form of translation will be required. Secondly, drivers made for USB peripherals are typically made for Windows. Unfortunately, PLCs and other automation devices do not support or run Windows. So even if you do find a way to plug a USB peripheral into a PLC, the two devices will not know how to communicate, rendering your USB device useless. Lastly, USB merely uses basic serial communications and cannot easily be interpreted by most machines that utilize one or more industrial protocols. That said, integrating USB peripherals is a challenge when the rest of your machines are using one or more industrial protocols.

Connecting Traditional Industrial Equipment with USB

The Easy Solution

If you are going to effectively implement USB-enabled technology into your factory, you must have a way to translate your data for your PLCs.

    In simpler terms, you need a gateway with three features:

  1. The ability to connect to your peripherals via USB port, and relay messages to stakeholder devices.
  2. Bypass the need for drivers by reformatting output data to match the communication needs for each input device.
  3. Translate serial data given by the peripheral into an industrial protocol.

An industrial gateway gives you the ability to begin implementing new USB technologies that might otherwise not be feasible. RTA gateways have the ability to translate USB output data into any number of popular industrial protocols and be understood by the rest of your machines. They are simple to integrate into factory floor and have a straightforward, easy-to-use user interface.

460ETCUSB

Another great gateway option, especially for connecting barcode scanners, is the 460ETCUSB. The 460ETCUSB moves data between up to 2 USB devices like barcode scanners and 1– 5 Allen-Bradley PLCs.

Incoming ASCII data from a USB device is mapped to user defined tags or registers in the data table of your Allen-Bradley PLC. You define two tags in the PLC. One for incoming data and a message counter. In your logic you read the value of the scan whenever the message count increments. If your device uses delimiters, the 460ETCUSB can be configured to automatically remove the delimiters, no need to deal with the delimiters in your PLC. If you need to parse your data, the 460ETCUSB can parse a string of ASCII data in up to 50 segments by delimiter or offset.

For detailed information on moving data using an USB gateway, contact us: