Share this

A Fan's Perspective: Yiwei CP341 ModBus Communication Applications - A Beginner's Guide

2026-04-06 05:17:14 · · #1

To understand the ModBus communication applications of UniMAT CP341, we first need to have a basic understanding of ModBus communication. After reading the following article, you will have a preliminary answer.

ModBus, invented by Modicon (now a brand of Schneider Electric) in 1979, is the world's most popular protocol in the industrial field, supporting traditional RS-232, RS-422, RS-485, and Ethernet devices. Many industrial devices, including PLCs, DCSs, and smart meters, use the ModBus protocol as their communication standard. Through ModBus, control devices from different manufacturers can be connected to form an industrial network for centralized monitoring.

ModBus is an application-layer message transport protocol (OSI layer 7). It defines a Protocol Data Unit (PDU) independent of the communication layer, i.e., PDU = Function Code + Data Field. ModBus can be applied to different types of buses or networks. Corresponding to different buses or networks, ModBus introduces additional fields mapped to Application Data Units (ADUs), i.e., ADU = Additional Fields + PDU. Currently, ModBus has the following three communication modes:
(1) Ethernet, the corresponding communication mode is MODBUS TCP.
(2) Serial transmission (various media such as wired RS-232/422/485; fiber optic, wireless, etc.), the corresponding communication mode is MODBUS RTU or MODBUS ASCII.
(3) High-speed token passing network, the corresponding communication mode is Modbus PLUS.

The Modbus RTU and ASCII protocols will be introduced below.

1. Modbus RTU

The MODBUS RTU communication protocol is the most widely used in industrial applications. Modbus is a master-slave protocol, meaning that there is only one master device in a system, and all operations are initiated by the master device. Communication is achieved through a polling and responding mechanism.

(1) Query

The function code in the query message tells the selected slave device what function to perform. The data segment contains any additional information about the function the device is to perform. For example, function code 03 requests the slave device to read holding registers and return their contents. The data segment must contain information to tell the slave device: which register to start reading from and the number of registers to read. The error detection field provides the slave device with a way to verify the correctness of the message content.

(2) Response

If the device generates a normal response, the function code in the response message is the same as the function code in the query message. The data segment includes data collected from the device, such as register values ​​or status. If an error occurs, the function code will be modified to indicate that the response message is erroneous, and the data segment contains codes describing this error information. The error detection field allows the master device to confirm whether the message content is valid.

(3) Commonly used function codes include:

2. ASCII Protocol

The ASCII protocol used by the CP341 module is a relatively flexible protocol. It allows for communication with other custom protocols.

The ASCII protocol supports the following features:

(1) Supports baud rates of 300-115200 and supports parity/stop bit configuration.

(2) Supports 485/422 interface and disconnection detection function

(3) Supports three frame end determination methods: timeout method, fixed byte number method, and end-of-frame marker method.

(4) Frame buffer queue with a maximum of 250 frames

The 300CPU host lacks a Modbus communication interface, requiring the CP341 communication module to be configured when connecting to a Modbus network. Similar products on the market, such as the CP341 with a hardware dongle, cost over 9000 RMB. To address this, Yiwei Automation has dedicated itself to developing the CP341 product, eliminating the need for an external hardware dongle and significantly reducing user costs.

Let's first unveil the true nature of the EVE CP341. In the next article, we will focus on introducing the product features and applications of the EVE CP341. Stay tuned!

---------------------------------------------------------------------------------------

We are dedicated to creating a high-value exchange and sharing platform for industrial control engineers. You can find us and join us in our exchange and sharing efforts through our QQ group (316281458) or WeChat subscription account (UniMAT2004)! We also welcome everyone to contribute articles through this platform, and we have ongoing essay contests with prizes.

Read next

CATDOLL Kara Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22