If you want to communicate with Modbus devices using CP341 communication module, you may think that you need a dongle license to enable the Modbus RTU protocol. However, there is a way to use CP341 Modbus without dongle license, by using a custom driver that implements the protocol using the ASCII driver of the CP341. In this article, we will show you how to download and use this driver for your Modbus RTU master or slave applications.
What is Modbus RTU?
Modbus RTU is a serial communication protocol that allows data exchange between devices on a network. It is widely used in industrial automation and control systems, such as PLCs, sensors, meters, valves, etc. Modbus RTU uses binary coding and CRC error checking to ensure reliable data transmission. Modbus RTU devices can be configured as masters or slaves, depending on their role in the network. A master device initiates requests to one or more slave devices, and waits for their responses. A slave device responds to requests from a master device, or sends unsolicited messages if enabled.
CP341 is a communication module that can be installed in a SIMATIC S7-300 PLC rack. It provides an RS-232 or RS-422/485 interface for serial communication with external devices. CP341 supports various protocols, such as ASCII, 3964(R), RK512 and Modbus RTU. However, to use the Modbus RTU protocol, you need a dongle license that plugs into the module and enables the protocol functionality. This dongle license can be expensive and hard to find, especially for older modules.
How to Use CP341 Modbus Without Dongle License?
Fortunately, there is a solution to use CP341 Modbus without dongle license, by using a custom driver that implements the Modbus RTU protocol using the ASCII driver of the CP341. This driver is developed by a forum member TIBI68, who generously shared his work with the community. The driver consists of function blocks that can be used in your S7 program to send and receive Modbus RTU messages. The driver supports S7-300, S7-400 and S7-400H CPUs and does not require any additional hardware.
To use this driver, you need to download the library file for your CP341 module from the forum post[^2^]. You also need to follow the installation, connection and interface configuration instructions for your module from its respective documentation. You can find an example project and a manual for the CP340 version in the same forum post[^2^]. The other versions work in the same way with different function blocks. You can also find useful information and implementation guides about Modbus RTU protocol here: http://www.modbus.org/specs.php
Once you have imported the library file into your SIMATIC Manager, you can use the function blocks in your S7 program to communicate with Modbus devices. You can configure multiple requests to more than one slave device connected to the CP341 module in a daisy-chain/multi-drop network. You can also use the driver as a Modbus RTU slave device by downloading another library file from this forum post[^3^].
In this article, we have shown you how to use CP341 Modbus without dongle license, by using a custom driver that implements the Modbus RTU protocol using the ASCII driver of the CP341. This driver is free and easy to use, and does not require any additional hardware. You can download the driver from the forum posts[^2^] [^3^] and follow the instructions to install and configure it for your CP341 module. You can then communicate with Modbus devices as a master or slave device using your S7 program. 29c81ba772