What is Modbus Communication Basics?

Developed in 1979, Modbus industrial serial protocol makes communication between automation devices possible. It is used with programmable logic controllers or PLCs. It transmits the information over serial lines that exist between electronic devices. The Modbus Master requests the information and the device that supplies the information are the Modbus Slaves. In a standard network, there are up to 247 slaves and one master. Each of the slaves have their own unique addresses. The master has the ability to write information the each of the slaves. The slave device has to wait to be asked for information and cannot give it without permission. The master writes the data to a slave devices registers and also reads the data from the registers.

What Modbus is used for?

This common protocol is used by many devices for efficient, reliable, and simple over many of the modern networks. A giant server can be used as the master for a PLC and then the PLC can be used as a valve, motor, sensor, or other device that is embedded. It is now the standard in the industry when it comes to communications protocol and the most available way to connect industrial electronic devices. Many manufacturer’s use it in various industries. It is mostly used to give off signals from control devices and instrumentation back to system gathering data or main controller. An example could be a system that tells the humidity or temperature back to a computer. A remote terminal unit or RTU within a supervisory control and data acquisition or SCADA system can be connected to a Modbus.

Modbus/TCP can make the definition of slave and master less obvious. That is because the Ethernet can allow for a communication system that works as a peer to peer connection. The client and the server are better known in Ethernet-based networking. When this happens, the slave can become the server and the master can become the client. That allows for more than one client to obtain data from the server. That way there is a chance of having multiple masters and multiple slaves. It allows for a system where the slave and the master are not defined on a physical device.

How does Modbus work?

Serial lines transmit the Modbus between devices. In a simple setup, there is a single serial cable that is connected to two serial posts, the master and the slave. Then the data is sent in bits, which are a series of ones and zeros. They are sent as a voltage. The zeros are positive volts and the ones are negative volts. These bits very quickly sent at a speed of 9600 bits per second called a baud.

Popular terms to know

When dealing with a Modbus communication protocol, you will want to know some popular terms. They will help you understand the concepts better.

  • Hexadecimal: Every block of eight bits which is called a byte. It can be represented by pairs of 256 characters from 00 to FF. Long strings of zeros and ones can be difficult to read. The bits are shown and combined in hexadecimal. Each of the block of four bits are represented by one of the sixteen characters ranging from 0 to F.
  • ASCII: It stands for American Standard Code for Information Interchange. Every eight bits can be represented and combined by one of the 256 ASCII characters just like every 4 bits can be represented and combined by one of the sixteen hexadecimal characters from zero to F.

How is the data stored in a Standard Modbus?

The information is stored in four tables in the slave devices. Two of these tables store the on and off values or coils and two store the numerical values or registers. The registers and coils have a read-write table and a read-only table.

  • Every table has 9999 values
  • Every contact or coil is one bit. Plus, it is assigned an address between 0000 and 270E
  • Every register is one word that equals 16 bits which equals two bytes. They have a data address between 0000 and 270E.
  • Coil and register numbers are thought of as location names that do not appear in the message.

What is a Slave ID?

Every slave in the network gets a unique unit address that is between 1 and 247. When there is data requested from the master, the slave address is the first byte that is sent. The reason why it does that is to tell the master whether to ignore the message or not.

What is the function code?

The master sends the second byte as the function code. It is the number that tells the slave what table to access and if it should write to or read from the table.

What is a Cyclic Redundancy Check or CRC?

The two bytes that are added at the end of the Modbus message designed for error detection. All of the bytes in the message are used to calculate the CRC. The device that is receiving the message calculates the CRC and then it compares it to the sending device’s CRC. It is used for protection. If even one part of the message is incorrectly received, the CRC is different and then the error will result.

What is word and byte ordering?

The way the data is stored in the registers is not defined with the Modbus specification. So, some manufactures have implemented Modbus into their equipment that stores and transmits a higher byte first and then a lower byte next. Other devices transmit and store the lower byte first.

The technology is forever changing and improving. The new methods make it easier for communication between master and slave.

Huge Trends that Affect Industrial Automation

With each new era, there comes new IT issues and manufacturing trends to deal with. The most popular topics that have been featured in many manufacturing publications include:

  • The Internet of Things
  • Big Data
  • Cloud Computing

These trending topics involve devices that are networked together and have a lot of data available to do things. Also, they include a decision on whether the applications are accessed and the data is stored on a server or your computer.

However, there are supporting technologies that work behind them all that have already been developed. Here is what you need to know about each of these topics to manage through them.

industrial automation gateways

  1. The Internet of Things or Connected Industrial Devices

The Internet of Things involves a lot of devices that are industrial that are networked together. This could be plants with thousands of devices that are networked together.

Reasons to network:

  • Everything can be managed from anywhere
  • Reduced hardware costs and complexity because of a the one network
  • Information and control can be moved when needed

The whole point of the Internet of Things is to connect industrial devices to each other so that the connectivity can be used to improve business.

DSC05809Challenges to network:

  • Learning and understanding the new technology
  • Deciding how to design the systems

With the development of this concept, the vendors and groups that set standards will take care of the difficult parts. The evolution of the technology will handle the growth as more wireless ports are added. Security will be upgraded helping with the management of higher traffic levels. Then, more IP addresses are created finalizing the process of continuing the business environment prior to the growth. Plus, your company has to encourage the use of this innovative technology.

 

bigdata-755x566

  1. Big Data

When data sets are incredibly complex and large that the regular applications for data processing are inadequate, this is referred to as Big Data. There is a lot of information that can be used for many different things, but isn’t being used. New software is now used that can analyze the large amounts of data, so that it can be used. Web companies and search engines use this type of technology. The systems measure, record, and interpret the information. For example, Amazon, makes suggestions to their customers about what to buy based on the information that is gathered from past purchases and items that the customers put in their cart. They make suggestions for repeat purchases and send notifications when the price on items that are saved in their cart changes. This is done to initiate a response from the customer to buy some more cologne or buy the tablet that just dropped in price.

Once a company learns how to utilize the data, they are able to build their business and offer more products that the consumers will want.

Connected-Green-Cloud3.Cloud Computing

Cloud computing deals with the computation and storage of your data on another source and not on your computer. Today, the computing power isn’t completely viable for use in an industrial capacity. However, the storage capacity is very strong. It provides a great way to share your data and back up your files.

Gateways can also segment networks into logical segments. They can allow for a clear division for different parts of the facility. If there is a need to optimize performance or maximize availability, the portal’s division can be useful.Industrial gateways allow you to optimize your network whenever your goal is to redesign, configure, or extend an industrial network.

MODBUS & RS485

modbus

Modbus is a messaging protocol that defines the content of that message.

In a short time hundreds of vendors implemented the Modbus messaging system in their devices and Modbus became the de facto standard for industrial communication networks.

Communication between the Modbus nodes was achieved with messages. It was an open standard that described the messaging structure. The physical layer of the Modbus interface was free to choose.

The original Modbus interface ran on RS232, but most later Modbus implementations used RS485 because it allowed longer distances, higher speeds and the possibility of a true multi-drop network. RS485 is hardware serial-interface standard that defines the hardware for carrying a message.

If you need more info on MODBUS check this manual out!