Introduction to Fieldbus Starting with Modbus

Introduction to Fieldbus Starting with Modbus

Continuing from the previous article,

If you haven’t read the introduction, please click the link below

Essentials丨Introduction to Fieldbus Starting with Modbus!

Recommendation丨Introduction to Fieldbus Starting with Modbus!

Introduction to Fieldbus Starting with Modbus (Part 5)

Previously, we introduced the Modbus serial bus and mentioned the terminal resistor issues of RS485/422, and touched on the shadow of Profibus DP. Given the popularity in industrial control, we should discuss Profibus DP, but after some thought, since we are starting with Modbus, let’s first talk about Modbus Plus. In my personal experience, Modbus Plus is somewhat like Mac OS in operating systems (the operating system for Apple computers). It has rich functionality, is easy to use, and operates stably. With careful study, you will grasp all the basic knowledge of networks without feeling complex, because Modicon has encapsulated each part well, and the documentation is complete and accurate. However, it is not open; there are not many companies that can make third-party devices for Modbus Plus, just Prosoft, Novatech, etc.

Using Modbus Plus communication basically involves a few steps: wiring as required, setting addresses, configuring communication, and processing data. (It seems that other buses are similar…)

Modbus Plus runs on the RS485 bus at a speed of 1Mbps in a token bus network, achieving deterministic delay network communication, which was quite good given the technical conditions at the time. It can basically meet monitoring and control requirements, and in actual use, it can achieve a communication efficiency of 2000 registers (16 bits) per second, which is sufficient for real-time upper-level monitoring. Moreover, since the communication is handled by hardware, it does not increase the burden on the computer. At that time, under Windows systems, the computer often crashed while communication remained normal, which forced me to program specifically to determine if the computer had crashed.

Modbus Plus also supports various communication media such as fiber optics, allowing for the formation of relatively complex networks:

Introduction to Fieldbus Starting with Modbus

Figure 1

Modbus Plus supports 32 nodes per segment, and a single network (meaning if the same network exceeds 32 nodes, a repeater must be added) supports 64 nodes. Therefore, the address setting is from 1 to 64, and the routing information consists of five bytes, allowing communication across up to 4 networks… Thus, concepts such as repeaters (which only enhance signals and are transparent on the software side), gateways (which connect two Modbus Plus networks, each with an address), and bridges (Net bridge, connecting two different networks, like Modbus Plus and Modbus) are all used. An example is shown below:

Introduction to Fieldbus Starting with Modbus

Figure 2

When using it on a computer, it is important to note that each computer supports two Modbus Plus communication cards, so there is a card number setting in the software setup, and older computers also require interrupt and memory address settings.

On the software side, there is a concept similar to Ethernet ports called path, which can distinguish different communication content within the same node. These will be used in communication configuration and programming.

Fault diagnosis of Modbus Plus is also very simple; the main faults can be judged by the flashing frequency of an LED: if there is no wiring, it flashes 3 times and then stops, and if it flashes quickly six times per second, it is normal operation. The rest are shown in the figure below:

Introduction to Fieldbus Starting with Modbus

Figure 3

For communication instability caused by electromagnetic interference, various network communication data can be read through driver tools or programming to diagnose.

Introduction to Fieldbus Starting with Modbus

Figure 4

In summary, Modbus Plus is an efficient, reliable, and easy-to-use fieldbus, which was widely used in the field with Modicon PLCs. Regardless of the reasons, it is now used less and less. The reasons are similar to the discussions we have had regarding PLC standards, and they are certainly multifaceted. Openness and specialization, like the fate of Microsoft and Apple, have their ups and downs. As an industrial control person, the opinions of engineers may not decisively influence the direction of technology and the market, but in any case, different products and technologies will leave us with a unique memory.

Introduction to Fieldbus Starting with Modbus (Part 6)

Having introduced Modbus and Modbus Plus, we continue with TCP-Modbus, which is related to Modbus. The application layer protocols of these three buses are all Modbus, but through different transmission mechanisms and media upgrades, the name Modbus has remained active in industrial sites.

TCP-Modbus is a Modbus message transmission protocol running on TCP/IP. Through this protocol, controllers can communicate with each other over a network (such as Ethernet) and with other devices. The relationship with Modbus is shown in the figure below.

Introduction to Fieldbus Starting with Modbus

Familiar? Surprised? A similar diagram has appeared before. IANA (Internet Assigned Numbers Authority) assigns the TCP port number 502 to the Modbus protocol, which is an essential parameter when setting up gateways and firewalls.

TCP-Modbus is also an open protocol, so gateways on the market are relatively inexpensive, making it easy to achieve interconnection between different networks, especially with Modbus, which basically “removes its disguise” (removes the TCP header) and adds a checksum. The frame format is shown in the figure below (which has appeared in the first article, let’s review).

Introduction to Fieldbus Starting with Modbus

ModbusTCP data frame: Transaction Identifier: Generally, it should be incremented by 1 after each communication to distinguish different communication data packets. Protocol Identifier: 00 00 indicates TCP-Modbus protocol. Length: Indicates the length of the following data, in bytes. Unit Identifier: Device address (often called Unit ID in many software settings). The TCP-Modbus communication process is shown in the figure below:

Introduction to Fieldbus Starting with Modbus

1. connect Establish TCP connection

2. Prepare Modbus message 3. Use send command to send message 4. Wait for response on the same connection 5. Use recv command to read the message, completing one data exchange 6. When the communication task is finished, close the TCP connection

The complete TCP-Modbus communication process involves the client establishing a connection, sending 3 MODBUS requests to the server without waiting for the first request’s response. After receiving all responses, the client normally closes the connection.

Advantages of TCP-Modbus:

Users can obtain the protocol and sample programs for free; network implementation costs are low, and general network components can be used entirely;

It is easy to integrate different devices, and almost any fieldbus can find a gateway to connect to Modbus-TCP; the network transmission capability is powerful, with 100M Ethernet transmission results showing: 4000 Modbus TCP packets per second, with each packet transmitting 125 words (16bit), thus equivalent to 4000×125=500000 analog data (8000000 digital signals!);

As for the disadvantages, just like Modbus, it transmits the values of registers without defining the semantics of the data, so the large amount of data read needs to be verified and processed one by one with the sender, which can lead to a significant workload in modern control systems, and settings are all manual, not object-oriented embedded technology, limiting its efficiency of use in large systems.

Source/China Industrial Control Network Industrial Control Forum

Introduction to Fieldbus Starting with Modbus

Previous Highlights ▼

Call for Original Contributions in Industrial Control

Common Manual for Electrical Cables, There’s Nothing More Comprehensive!

Learn to Understand Control Circuits Easily!

Recommendation丨Introduction to Fieldbus Starting with Modbus!

Essentials丨Introduction to Fieldbus Starting with Modbus!

Compilation丨Master the Working Principles of Encoders in One Article!

What is the Difference Between RS232 and RS485?

Recommended for Collection丨Understand Servo Motion Controllers in One Article!

Recommendation丨Programming Methods for Logic Control Sequential Control

64 Hydraulic and Pneumatic Animations, Those Who Understand All Are Amazing!

Essentials Sharing丨Modbus Communication Programming Examples, the Rhythm of Exciting Serialization!

Rare Engines, Those Who Have Seen All Are Experts!

Introduction to Fieldbus Starting with ModbusIntroduction to Fieldbus Starting with Modbus

To some extent, the shortest distance between industrial control people is just one small secretary apart. Follow me to get more resources and information. The secretary will take you to explore a broader new world of industrial intelligence!

——Information Secretary

Introduction to Fieldbus Starting with Modbus

Click “Read the Original” for more.

Leave a Comment