Using MQTT Protocol for Smarter Automation

In my previous blog post, “Edge Gateways to Support Real-Time Condition Monitoring Data,” I talked about the importance of using an edge gateway to gather the IoT data from sensors in parallel with a PLC. This was because of the large data load and the need to avoid interfering with the existing machine communications. In this post, I want to delve deeper into the topic and explain the process of implementing an edge gateway.

Using the existing Ethernet infrastructure

One way to collect IoT data with an edge gateway is by using the existing Ethernet infrastructure. With most devices already communicating on an industrial Ethernet protocol, an edge gateway can gather the data on the same physical Ethernet port but at a separate software-defined number associated to a network protocol communication.

Message Queue Telemetry Transport (MQTT)

One of the most commonly used IoT protocols is Message Queue Telemetry Transport (MQTT). It is an ISO standard and has a dedicated software Ethernet port of 1883 and 8883 for secure encrypted communications. One reason for its popularity is that it is designed to be lightweight and efficient. Lightweight means that the protocol requires a minimum coding and it uses low-bandwidth connections.

Brokers and clients

The MQTT protocol defines two entities: a broker and client. The edge gateway typically serves as a message broker that receives client messages and routes them to the appropriate destination clients. A client is any device that runs an MQTT library and connects to an MQTT broker.

MQTT works on a publisher and subscriber model. Smart IoT devices are set up to be publishers, where they publish different condition data as topics to an edge gateway. Other clients, such as PC and data centers, can be set up as subscribers. The edge gateway, serving as a broker receives all the published data and forwards it only to the subscribers interested in that topic.

One client can publish many different topics as well as be a subscriber to other topics. There can also be many clients subscribing to the same topic, making the architecture flexible and scalable.

The edge gateway serving as the broker makes it possible for devices to communicate with each other if the device supports the MQTT protocol. MQTT can connect a wide range of devices, from sensors to actuators on machines to mobile devices and cloud servers. While MQTT isn’t the only way to gather data, it offers a simple and reliable way for customers to start gathering that data with their existing Ethernet infrastructures.

Is IO-Link with Single Pair Ethernet the Future?

20 meters.

That is the maximum distance between an IO-Link master port and an IO-Link device using a standard prox cable.  Can this length be extended?  Sure, there are IO-Link repeaters you can use   to lengthen the distance, but is there an advantage and is it worth the headache?

I hope you like doing some math, because the maximum distance is based on the baud rate of the IO-Link device, the current consumption of the IO-Link device and finally the cross section of the conductors in the cabling.  Now throw all that into a formula and you can determine the maximum distance you can achieve.  Once that is calculated, are you done? No.  Longer cables and repeaters add latency to the IO-Link data transfer, so you may need to slow down the IO-Link master’s port cycle time due to the delay.

Luckily, there is a better and easier solution than repeaters and the sacrifice of the data update rate — Single Pair Ethernet (SPE).

SPE is being discussed in all the major communication special interest groups, so it makes sense that its being discussed within the IO-Link Consortium.  Why?  A couple of key factors: cable lengths and updated speeds.  By using SPE, we gain the Ethernet cable length advantage. So, instead of being limited to 20 meters, your IO-Link cabling could stretch to 100 meters!  Imagine the opportunities that opens in industrial applications.  It is possible that even longer runs will be achievable.  With 10 Mbit/s speed, to start, the update rate between IO-Link devices and the IO-Link master could be less than 0.1 millisecond.

Latency has been the Achilles heal in using IO-Link in high-speed applications, but this could eliminate that argument. It will still be IO-Link, the point-to-point communication protocol (master-to-device), but the delivery method would change. Using SPE would require new versions of IO-Links masters, with either all SPE ports or a combination of SPE and standard IO-Link ports. The cabling would also change from our standard prox cables to hybrid cables, containing a single twist Ethernet pair with two additional conductors for 24 volts DC.  We may even see some single channel converts, that convert standard IO-Link to SPE and vice versa.

There likely would have been pushback if this was discussed just five or ten years ago, but today, with new technology being released regularly, I doubt we see much resistance. We consumers are ready for this. We are already asking for the benefits of SPE and IO-Link SPE may be able to provide those advantages.

For more information, visit www.balluff.com.

Industrial Safety Protocols

There are typically three or more communication levels in the modern factory which consist of:

  • Enterprise level (Ethernet)
  • Control level (Ethernet based industrial protocol)
  • Device/sensor level (various technologies)

IO-Link

The widespread use of control and device level communications for standard (non-safety) industrial applications led to a desire for similar communications for safety. We now have safety versions of the most popular industrial control level protocols, these make it possible to have safety and standard communications on the same physical media (with the appropriate safety hardware implemented for connectivity and control). In a similar manner, device level safety protocols are emerging to allow standard and safety communications over the same media. Safety Over IO-Link and AS-i Safety At Work are two examples.

This table lists the most common safety control level protocols with their Ethernet-based industrial “parent” protocols and the governing organizations:

chart1

And this table lists some of the emerging, more well-known, safety device level protocols with their related standard protocols and the governing or leading organizations:

Chart2
* Safety Over IO-Link is the first implementation of safety and IO-Link. The specification for IO-Link Safety was released recently and devices are not yet available.

Ethernet-based safety protocols are capable of high speed and high data transmission, they are ideal for exchanging data between higher level devices such as safety PLCs, drives, CNCs, HMIs, motion controllers, remote safety I/O and advanced safety devices. Device level protocol connections are physically smaller, much less expensive and do not use up IP addresses, but they also carry less data and cover shorter distances than Ethernet based protocols. They are ideal for connecting small, low cost devices such as E-stops, safety switches and simple safety light curtains.

As with standard protocols, neither a control level safety protocol, nor a device level safety protocol can meet all needs, therefore cost/performance considerations drive a “multi-level” communications approach for safety. This means a combined solution may be the best fit for many safety and standard communications applications.

A multi-level approach has many advantages for customers seeking a cost-effective, comprehensive safety and standard control and device solution which can also support their IIoT needs. Users can optimize their safety communications solutions, balancing cost, data and speed requirements.

Why Train on Industrial Ethernet?

trainingAn industrial Ethernet network is vastly different from an office Ethernet network in several key ways, and the key to optimizing your industrial network in light of these differences, is hands-on training.

First of all, the environment in industrial applications can degrade the actual cable itself. Some cable manufacturers actually rate their cables’ ability to withstand these environmental factors. They use the acronym MICE, and rate the cable as appropriate for one of three environments: M1I1C1E1 for office environments, M2I2C2E2 for light industrial environments, and M3I3C3E3 for industrial environments. The letters actually stand for: Mechanical factors such as shock and vibration, Ingress from moisture, Climatic factors such as temperature and sunlight, and Electromagnetic interference such as noise caused by inductive loads, welders, variable frequency drives, etc. Other cable vendors observe the recommendations of ODVA and offer cables that are ODVA compliant.

Secondly, industrial Ethernet networks can have a high amount of multicast traffic. In the early years of Ethernet hubs were used to link devices. The problem is that information coming into one port of a hub was redirected to all of the other ports on the hub. With the advent of switches, unicast traffic was now directed to only the port for the intended recipient device. This is true for both managed and unmanaged switches: they both handle unicast traffic well. The problem for the unmanaged switch comes when you encounter multicast traffic. Since an unmanaged switch does not employ IGMP Snooping (Internet Group Management Protocol), the switch does not know what to do with multicast traffic. It starts acting like the old hubs: it directs all multicast traffic to all ports. With a managed switch and with IGMP Snooping turned on, the switch knows exactly where to send this multicast traffic and directs it only to the intended recipients. Multicast traffic can be anything from produced tags to input modules configured for multicast. These can be very common in industrial applications using PLCs.

Thirdly, we now have tools available in many switches and routers to prioritize the traffic on an Ethernet network. This becomes especially important when you have high-speed applications, motion applications, or time synchronization applications. In the past all Ethernet data was equal. The feedback coming from a servo drive had to wait just as long as a person trying to get online with a PLC. Now many automation vendors are marking their data with priority codes. Allen-Bradley marks their data in layer three with DSCP markings, and Siemens uses layer two markings with PCP marks, for instance (a VLAN tagging mechanism). In either case, if your switch or your routers are not configured properly to recognize and use these priority codes, you are not taking advantage of the QoS feature that could help get your important data through first (Quality of Service).

Only through proper training can you learn not only what the key issues are but also how to properly deploy your hardware to fully optimize your network. Balluff offers hands-on training with actual automation equipment, switches, and routers to help you do just that. You can learn more about the courses Balluff has to offer at www.balluff.us.

1 Visual Way to Improve Operator Performace

Many manufacturers I talk to are excited about the possibilities that our new Smart Light technology, used in level mode, brings to their production or machines.  Here’s a video if you havent seen it yet:

It works over virtually any industrial network with an open standard called IO-Link, which I’ve discussed many times in previous posts.

What I’m really impressed with is the number of people integrating the level mode as a quick and easy way to give instantaneous feedback to an operator on their performance to a quota or as a count-down timer.  Here you can see in the middle of the right photo a bright green bar light just to the left of the red kanban rack.  There are multiple of these lights in this image.

Tesla Motors Blog – Factory Upgrade

This light is a five zone Smart Light operating in level mode.  As the cycle time winds down, the light decreases in value until there is no more time, at that point it flashes bright red to notify the operator to cycle to the next vehicle.  It keeps the production on track and helps operators know quickly and easily how much time remains.  What I’ve been told is nice about this is how bright the light is and that it is easily install-able without a controls cabinet or slice i/o j-box like you can see in the photo.  Others like it because it makes the data visual from all over, where HMIs require you to stand right in front of them for information.

So if you are trying to think about ways to visualize data in your process or production to operators or managers, there are many others out there already using Smart Light for that application. Check it out.

Stop Industrial Network Failures With One Simple Change

Picture1

It’s the worst when a network goes down on a piece of equipment.  No diagnostics are available to help troubleshooting and all communication is dead.  The only way to find the problem is to physically and visually inspect the hardware on the network until you can find the culprit.  Many manufacturers have told me over the past few months about experiences they’ve had with down networks and how a simple cable or connector is to blame for hours of downtime.

2013-08-19_Balluff-IO-Link_Mexico_Manufactura-de-Autopartes_healywBy utilizing IO-Link, which has been discussed in these earlier blogs, and by changing the physical routing of the network hardware, you can now eliminate the loss of communication.  The expandable architecture of IO-Link allows the master to communicate over the industrial network and be mounted in a “worry-free” zone away from any hostile environments.  Then the IO-Link device is mounted in the hostile environment like a weld cell and it is exposed to the slag debris and damage.  If the IO-Link device fails due to damage, the network remains connected and the IO-Link master reports detailed diagnostics on the failure and which device to replace.  This can dramatically reduce the amount of time production is down.  In addition the IO-Link device utilizes a simple sensor cable for communication and can use protection devices designed for these types of cables.  The best part of this is that the network keeps communicating the whole time.

If you are interested in learning more about the benefits that IO-Link can provide to manufacturers visit www.balluff.us.

The Spring Line is Here!

In today’s industrial market, Ethernet cable is in high demand. With words like Ethernet, Ethernet/IP, solid, and stranded, making a decision from the different types of cable can be difficult.

I want to make it easy for you to pick the right cable to go with the network of your choosing.  As a network, Ethernet is easy to install and it is easy to connect to other networks – you can probably even have Ethernet network devices connect to your current network.

So, let’s start with the basics…First, what is the difference between Ethernet and Ethernet/IP?  They both have teal jackets (hence the title – The “Spring Line”) due to the industrial Ethernet standards in North America. So, the difference between the two is in the application.  Ethernet is a good networking cable that transmits data like an internet cable.  Ethernet/IP transmits data and also has an industrial protocol application.  The Industrial Protocol (IP) allows you to transmit more data if you have a lot devices connected to each other or a lot of machines moving at once.  Ethernet/IP resists against UV rays, vibrations, heat, dust, oil, chemical, and other environmental conditions.

Next, there are two kinds of Ethernet IP cables: Solid and Stranded. Solid is great for new applications that require high-speed Ethernet.  The solid cables can transmit and receive across long distances and have a higher data rate compared to stranded.  The downside is that solid cables can break, and do not bend or flex well. Stranded is a better cable if you have to bend, twist, or flex the cable. It’s also better if you have to run short distances.  Stranded is made up of smaller gauge wires stranded together which allows the cable to be flexible and helps protect the cable. They move with the machine and will not break as easily as solid cables.

EthetNetCables_755x220To recap, remember the four short bullet points below when choosing your next cable:

  • Ethernet – transmits data
  • Ethernet/IP – transmits data to many machines/devices
  • Solid – good for long distance and little flexing
  • Stranded– good for short distance and flexing

To learn more visit www.balluff.us

IO-Link is the USB for Industrial Automation

I’ve recently heard this comparison used a number of times and the parallels are quite interesting.  USB was designed to help standardize a dizzying array of connectors and configurations of supplementary devices that developed during the age of the Compaq vs IBM.  It always took days to configure and establish communication between devices and then finally you could never get all the functionality that the device promised because of your PC’s specific configuration.  USB revolutionized the personal computer by allowing for a standard interface for simple devices from hard-drives to keyboard lights, and best of all by offering a device drivers the functionality promised could be delivered.  If the device broke, you bought a new one, plugged it in and it worked.

Continue reading “IO-Link is the USB for Industrial Automation”

Distributed Modular I/O Demo on Demand!

Everyone likes things on demand right?  Movies, TV shows, chocolate, you name it.  My good friend, John Harmon, has prepared a YouTube video so that you have at your fingertips an on-demand presentation on Distributed Modular I/O.  It is a great overview of the available functionality of Distributed Modular I/O and what kinds of control products that are available utilizing this technology.  I realize the video is seven and a half minutes, which is pretty long for a web video, but I think he does an excellent job of keeping your attention and demonstrating the value of this technology.  Grab a soda and your favorite chocolate bar, put your phone on silent, and hit play on this excellent presentation.

Continue reading “Distributed Modular I/O Demo on Demand!”

Machine Mount I/O: Get out of the Cabinet

In April, Jim Montague of Control Design wrote an interesting article on Machine Mount I/O entitled “Machine-Mount I/O Go Everywhere.”  I think the article makes some very good points as to the value of why someone wants to move from inside an enclosure, or controls cabinet, to mounting I/O products directly on the machine.

He summarizes, with the help of a number of industry experts, the below points:

  • Same or Better control performance out of IP67 products versus IP20 products.  
    • Installation time alone “is reduced by a factor of 5 to 10”
    • Assemble more controls equipment faster with the same people & workspace
  • Smaller & Simpler components take up less real-estate on the machine