odot DPM01 User Manual

Modbus-rtu/ascii to profibus-dp protocol converter

Advertisement

Quick Links

Modbus-RTU/ASCII to Profibus-DP
Protocol Converter
DPM01
User Manual
V1.0
2024.04.18
DPM01
http: //
www.odotautomation.com
TEL: +86-0816-2538289

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DPM01 and is the answer not in the manual?

Questions and answers

Summary of Contents for odot DPM01

  • Page 1 Modbus-RTU/ASCII to Profibus-DP Protocol Converter DPM01 User Manual V1.0 2024.04.18 DPM01 http: // www.odotautomation.com TEL: +86-0816-2538289...
  • Page 2 2024-04 Copyright ©2024 Odot Automation all rights reserved http: // www.odotautomation.com TEL: +86-0816-2538289...
  • Page 3 The product and text described in this document are under constant development and refinement. Odot Automation System Co., Ltd. has the right to modify this document without notifying users.
  • Page 4: Table Of Contents

    目 录 1 Product Overview ....................... 3 1.1 Product Functions .................... 3 1.2 Main technical parameters ................3 2 Hardware Description ....................4 2.1 Product Appearance ..................4 2.2 Indicator Description ..................5 2.3 DIP Switch ....................... 5 2.4 Profibus-DP Interface ..................6 2.5 Terminal definition ...................
  • Page 5 7.2.2 RS422 ....................77 7.2.3 RS485 ....................79 http: // www.odotautomation.com TEL: +86-0816-2538289 2 / 76...
  • Page 6: Product Overview

    1 Product Overview 1.1 Product Functions The DPM01 gateway is a Modbus-RTU/ASCII to Profibus-DP Protocol converter. It could realize data transmission from Modbus-RTU/ASCII to Profibus-DP protocols. Any device with an RS485 interface that supports the Modbus-RTU/ASCII protocol can be interconnected with the fieldbus Profibus-DP using this product. Such as: PLC,...
  • Page 7: Hardware Description

    15.Size: 110*27.5*110(Length*width*height, Unit: mm) 16. Ingress protection rating IP20 17.Product certifications: CE 2 Hardware Description 2.1 Product Appearance http: // www.odotautomation.com TEL: +86-0816-2538289 4 / 76...
  • Page 8: Indicator Description

    2.2 Indicator Description There are total 4 LED status indicators. The symbol definition and status description are shown in “Table 2.2”. Table 2.2 LED indicator description Symbol Definition Status Description The system power supply is normal. Power supply indicator (RED) The system power supply is abnormal.
  • Page 9: Profibus-Dp Interface

    2.4 Profibus-DP Interface Profibus-DP port is 9 Pin terminals and its Pin definition is as follows: RS-485 Definition Description Shield Earthing of Shield M24V B/B' RXD/TXD-P Data line B CNTR-P Direction control-P C/C' DGND Signal Grounded VP(+) P 24V A/A' RXD/TXD-N Data line A CNTR-N...
  • Page 10: External Terminal Resistance

    RS232 Sending Power terminals are defined as follows: Symbol Definition Grounding terminal Power Input Negative Power Input Positive 2.6 External terminal resistance According to the site situation, the gateway serial port side needs an external 120 Ω terminal resistance. The RS485 bus supports a maximum of 32 nodes without relay. The "daisy chain"...
  • Page 11: Installation Dimension

    2.7 Installation dimension http: // www.odotautomation.com TEL: +86-0816-2538289 8 / 76...
  • Page 12: Product Application Topology

    3 Product application topology The typical network topology of the RS485 interface in Modbus RTU master mode (as shown below). Typical network topology of RS485 interface set to Modbus RTU slave mode (as shown below) http: // www.odotautomation.com TEL: +86-0816-2538289 9 / 76...
  • Page 13 http: // www.odotautomation.com TEL: +86-0816-2538289 10 / 76...
  • Page 14: Testing Application In Siemens Step 7

    If not, please contact the supplier to request them. If the following files exist, copy them to C:\Program Files\Siemens\Step7\S7DATA\GSD 2. Open Step7 software,create a new project,name DPM01-TEST. There should be no Chinese characters in the storage path http: // www.odotautomation.com...
  • Page 15 3. Right click on the project name, insert a new object, select "SIMATIC 300 Site", click "SIMATIC 300", and then double-click "Hardware" on the right to enter the hardware configuration interface. http: // www.odotautomation.com TEL: +86-0816-2538289 12 / 76...
  • Page 16 GSD File", click "Browse" in the pop-up box, and navigate to the directory where DPM01_V2.GSD is located. In this case, it is C: \ Users \ Administrator \ Desktop \ DPM01 GSD. In the "Install GSD File" interface, click "Install", and then click "Yes". http: // www.odotautomation.com...
  • Page 17 5. Click on "Options" in the toolbar and then click on "Update Catalog" in the drop-down menu. 6. Gateway device “DPM01 V2.0”can be found in “PROFIBUS-DP”-“Additional Field Devices”-“Gateway”. http: // www.odotautomation.com TEL: +86-0816-2538289 14 / 76...
  • Page 18 7. Start configuring the hardware, first place the Rail, and then place the power module and CPU module in slots 1 and 2 respectively. When adding a CPU, a PLC Ethernet interface parameter window will pop up, fill in the IP address of the PLC, and create a new subnet.
  • Page 19 After adding the CPU, double-click on CPU 315-2 PN/DP, click on Cycle/Clock Memory in the pop-up interface, and modify the process image input/output area size. Default 128, increase to 2000. 8. Double click on "X1 MPI/DP", select the interface type: PROFIBUS, and a PROFIBUS interface parameter box will pop up.
  • Page 20 9. Drag and drop the gateway device DPM01 directly onto the DP bus, and a PROFIBUS interface parameter window will pop up. Fill in the DPM01 address, which should be consistent with the address set on the DPM01 gateway hardware dial switch.
  • Page 21 10. Double click on the gateway icon and the following configuration will appear: Click "Assign Parameters" again to set the Modbus parameters for the gateway (which must match the RS485 device connected to the user). After setting, click the "OK" button, as shown in the following figure: http: // www.odotautomation.com TEL: +86-0816-2538289 18 / 76...
  • Page 22 11. Device specific parameter settings: Modbus Mode工作模式: Master Mode 主站模式。 Baudrate波特率: Serial baud rate, optional range 1200~115200bps, default 9600bps. Parity校验位: You can choose no parity, odd parity, or even parity, with no parity by default. Data_Bit数据位: Fixed to 8-bit data. Stop_Bit停止位:...
  • Page 23 related to the baud rate). Slave Timeout从站响应超时: The time it takes for the slave station to respond after the master station sends a command. 10ms~5000ms optional, default to 100ms. Timeout Mode超时处理方式: After reading data from the station timeout, the data processing method can be selected as "data reset"...
  • Page 24 Double click on the added function block "Read 8 Words (3xxxx)" to configure its parameters. The Slave ID slave number must be consistent with the corresponding Modbus address set by the slave, and the "start address" refers to the starting address of the Modbus cache area that needs to be read.
  • Page 25 PLC address. At this time, "start address" is the actual PLC address in the address table minus 1. When the slave address code starts from 0, "start address" is the actual encoded address in the address table. According to the actual situation, other data modules can be inserted into the later slots.
  • Page 26 14. Right click on the "8AI" module in slot 3, then click "Monitor/Modify", and select "Monitor" in the pop-up board to read the values of each channel. The red box in the figure below is the value read in this example. The above figure shows the use of AI modules, which are similar to DI, DO, AO http: // www.odotautomation.com TEL: +86-0816-2538289...
  • Page 27 modules, and other standard Modbus devices. (Note: I and Q addresses can be changed by oneself) 15. Mater diagnostic module The Master diagnostic module is a selectable module and can only be used in Modbus Master mode. The Master diagnostic module is divided into two types: "Slot Status Input"...
  • Page 28 with the lowest serial number in the error slot. Right click on slots 0 and 1, select "Monitor/Modify", and check "Monitor" in the pop-up panel to display module status and error codes. As shown in the above figure, when the corresponding slot module fails, the module status corresponding bit is set to 1.
  • Page 29 Check parity, baud rate, stop bit, and 0x07 parity error hardware connection status Slave response message CRC calculation 0x09 CRC verification error error, check the working status of the slave Increase the timeout time, check the Slave device response hardware connection status, and view 0x0B timeout communication parameter settings such as...
  • Page 30: Modbus Rtu Slave Mode

    4.2 Modbus RTU Slave Mode 1.Modbus Slave Mode Data Address Table Data area Effective address range Zone 0(0XXXX) 0~1951 Zone 1(1XXXX) 0~1951 Zone 3(3XXXX) 0~121 Zone 4(4XXXX) 0~121 2→10 Refer to 4.1 (Master Station Mode)的1→9。 11. Double click on the gateway icon and the following configuration will appear.
  • Page 31 Modbus Mode工作模式: Slave Mode从站模式。 Baudrate波特率: Serial baud rate, optional range 1200~115200bps, default 9600bps. Parity校验位: You can choose no parity, odd parity, or even parity, with no parity by default. Data_Bit数据位: Fixed to 8-bit data. Stop_Bit停止位: 1 or 2 stop bits are optional, default to 1 stop bit. Send Delay报文发送间隔:...
  • Page 32 Timeout Mode超时处理方式: This parameter is invalid for the slave mode. Data Out Mode数据输出模式: This parameter is invalid for the slave mode. Slave ID: Slave ID number, valid range is 1-247, default value is 1. Slave Respond Delay从站响应延迟: The response delay time of the slave station is when the slave station receives a request message from the master station, processes the data, delays for a certain length of time, and then replies to the data message.
  • Page 33 15. Download the configuration program to the PLC after saving and compiling. http: // www.odotautomation.com TEL: +86-0816-2538289 30 / 76...
  • Page 34 16. Right click on slots 2 and 3, click "Monitor/Modify", and then select "Monitor" to see the DP input data. The monitoring data value is consistent with the data written by the Modbus Poll (used to simulate the RS485 device master station) master station, as shown in the following figure.
  • Page 35 shown in the following figure. Modbus Poll reads data from Modbus slave station: DP output data: 18. Modbus slave status module The Modbus slave status module can only be used in slave mode, and the DP side can read the slave status to determine the working status of the Modbus slave. When the slave station is working normally, the error code is 0.
  • Page 36 Data length error, data length beyond the Max. Illegal data value 0x03 allowed value 125(Word) or 2000(Bit), modify the length Check parity, baud rate, stop bit, and hardware 0x07 parity error connection status Slave response message CRC calculation error, 0x09 CRC verification error check the working status of the slave Response message length...
  • Page 37: Testing Application In Siemens Tia V16

    TIA as the configuration software to illustrate the configuration method of DPM01. 5.1 Modbus RTU Master Mode 1. Download the GSD folder of DPM01 from the official website and confirm that there are the following files in the folder. If not, please contact the supplier to request them.
  • Page 38 http: // www.odotautomation.com TEL: +86-0816-2538289 35 / 76...
  • Page 39 http: // www.odotautomation.com TEL: +86-0816-2538289 36 / 76...
  • Page 40 4. Under Project Number Device DPMO1-TEST, click Add New Device, select CPU 315-2 PN/DP for testing in the pop-up window, and click OK. http: // www.odotautomation.com TEL: +86-0816-2538289 37 / 76...
  • Page 41 5. In the device view, select the network port of the PLC, set properties, add a new subnet, and modify the IP address. http: // www.odotautomation.com TEL: +86-0816-2538289 38 / 76...
  • Page 42 Select the MPI/DP interface of the PLC, set properties, select PROFIBUS interface type, and click to add a new subnet. For the S7-300 series PLC, when using the gateway, it is necessary to modify the size of the process image input and output area. The default value is 128. Increase this value according to the customer's own needs.
  • Page 43 6. Click to enter the network view, find the newly installed DPM01 in the hardware directory on the right, and drag it to the network view. 7. Select the gateway and assign a master station to it. Select the PROFIBUS-DP interface and modify the PROFIBUS parameters.
  • Page 44 The default PROFIBUS address is 3. Check if the gateway hardware ID is dialed to 3. (The ID filled in here should be consistent with the actual hardware dialing) 8. Click on the specific parameters of the gateway device and set the gateway MODBUS parameters (which must match the serial port parameters of the RS485 device connected to the user).
  • Page 45 with technical support. Specific meanings of parameters: Modbus Mode工作模式: Master RTU Mode 主站RTU模式。 Baudrate波特率: Serial baud rate, optional range 1200~115200bps, default 9600bps. Parity校验位: You can choose no parity, odd parity, or even parity, with no parity by default. Data_Bit数据位: Fixed to 8-bit data. Stop_Bit停止位:...
  • Page 46 The time it takes for the slave station to respond after the master station sends a command. 10ms~5000ms optional, default to 100ms. Timeout Mode超时处理方式: After reading data from the station timeout, the data processing method can be selected as "data reset" or "data hold". The default "data hold" mode is only valid for Modbus read commands.
  • Page 47 The main station diagnostic module is divided into two types: "Slot Status Input" and "Slot Error Code Input Module ErrCode Input". Two types of modules can only be plugged in at most one each. And insert it into the slot at the front position. The status module can monitor the working status of each data slot.
  • Page 48 Modbus Master Error Code Table Error Code Fault description Troubleshooting method 0x00 Working properly The device does not support the current function code, please refer to the slave Illegal function code 0x01 manual to select the corresponding function code module If the device data exceeds its address Illegal data address 0x02...
  • Page 49 This document provides a simple demonstration. The first four commands use default values, changing the starting address of the fifth command to 20 and the starting address of the sixth command to 30. Simulate on-site 485 devices using Modbus Slave software. 12.
  • Page 50 13. After downloading, open the monitoring table, fill in the command address corresponding to the gateway, open Modbus Slave software, simulate the slave station, and set the serial port parameters to 9600/N/8/1. 14. Turn the TIA project online, click the online monitoring button on the monitoring table, and you can check that the PLC collected data is consistent with the 485 serial port side data.
  • Page 51 485 side will receive data issued by the PLC. At this point, the gateway is in a normal working state, and both the input status address value and the error code address value display 0. http: // www.odotautomation.com TEL: +86-0816-2538289 48 / 76...
  • Page 52 15. When the input status address value and error code address value are not 0, analyze the fault location based on the actual displayed value and the error code, as shown in the following figure:% IB0=2 # 00100000,% IW256=16 # 0602, indicating that the sixth read and write command in the gateway configuration is faulty and has an invalid data address.
  • Page 53: Modbus Rtu Slave Mode

    5.2 Modbus RTU Slave Mode 1.Modbus Slave Mode Data Address Table Data area Effective address range Zone 0 ( 0XXXX ) 0 ~ 1951 Zone 1 ( 1XXXX ) 0 ~ 1951 Zone 3 ( 3XXXX ) 0 ~ 121 Zone 4 (...
  • Page 54 Data_Bit数据位: Fixed to 8-bit data. Stop_Bit停止位: 1 or 2 stop bits are optional, default to 1 stop bit. Send Delay报文发送间隔: This parameter is invalid for the slave mode. Receive Delay接收字符间隔: The frame interval detection time when receiving a message is optional from 1.5t to 200t, with a default of 3.5t (t is the time for transmitting a single character, which is related to the baud rate).
  • Page 55 Modbus Slave Error Code Table Error Code Fault description Troubleshooting method 0x00 Working properly The device does not support the current function code, please refer to the slave manual Illegal function code 0x01 to select the corresponding function code module If the device data exceeds its address range, Illegal data address 0x02...
  • Page 56 Note: The starting address for bit reading and writing is a byte address 12. After setting up, save, compile, and download the project. 13. After downloading, open the monitoring table, fill in the command address corresponding to the gateway, open Modbus Poll software, simulate the main station, establish a connection, default RTU protocol, serial port parameters 9600/N/8/1.
  • Page 57 From the Modbus poll message, it can be seen that the communication connection has been established. 14. Transfer the TIA project online and click on the monitor table The online monitoring button allows you to view that the data collected by the PLC is consistent with the serial port data of the 485 main station.
  • Page 58 At this time, the gateway is in a normal working state, and the input status address value shows 0. http: // www.odotautomation.com TEL: +86-0816-2538289 55 / 76...
  • Page 59: Modbus Ascii Master Mode

    5.3 Modbus ASCII Master Mode Refer to 4.1 MODBUS RTU master station mode configuration. Just change the gateway working mode to: Master Station ASCII mode. Save compilation download. When using Modbus Slave software for testing, choose the ASCII protocol when establishing a connection.
  • Page 60 modified value column with the value to be output, click Immediately modify the ownership at once, and the 485 side of the main station will receive data issued by the PLC. http: // www.odotautomation.com TEL: +86-0816-2538289 57 / 76...
  • Page 61: Modbus Ascii Slave Mode

    5.4 Modbus ASCII Slave Mode Refer to 4.2 MODBUS RTU slave mode configuration Just change the gateway working mode to: Slave ASCII mode. Save compilation download. When using Modbus Poll software for testing, choose the ASCII protocol when establishing a connection. Transfer the TIA project online and click on the monitoring table The online monitoring button allows you to view that the data collected by the PLC is consistent...
  • Page 62 modified value column with the value to be output, click Immediately modify the ownership at once, and the 485 side of the main station will receive data issued by the PLC. http: // www.odotautomation.com TEL: +86-0816-2538289 59 / 76...
  • Page 63: Test Application In Beckhoff Twincat 2

    CX5120. See diagram below. Right-click Device 2 (EL6731)—Append Box, in the dialog box that pops up, select Generic Profibus Box (GSD)—OK, locate the file where the GSD file of DPM01 resides, click to open, the gateway is automatically attached to the EL6731 module.
  • Page 64 Select the DPM01. On the right side of PrmData, set the serial port parameters of the gateway. Gateway working mode select Slave mode, that is, the gateway 485 side is the Slave of 485. http: // www.odotautomation.com TEL: +86-0816-2538289 61 / 76...
  • Page 65 Right-click DPM01—Append Module, in the dialog box that appears, select Read and Write Commands. Because the working mode of the gateway is Slave, select the read and write commands with S: in the front of. After the command is added, it will be attached to the lower side of the gateway DPM01.
  • Page 66 Select the added command, and set the corresponding start address of 485 device in PrmData on the right, and the start address of both test commands is 0. http: // www.odotautomation.com TEL: +86-0816-2538289 63 / 76...
  • Page 67 2. Open the PLC Control interface, create a new project, default options, and click Edit a simple program, define variables, and the program logic is Q0 alternately assigned 85 or 170, Q1=I1. Compile all the programs, and a file CX5120-TEST.tpy will appear in the program save directory.
  • Page 68 3.Return the System Manager interface, right-click PLC Configuration—Append PLC Project, in the dialog box that pops up, select the file that was compiled in the PLC Control interface earlier CX5120-TEST.tpy, click the OK. Expand the PLC Configuration drop-down menu, see the following figure, it could see the input and output variables.
  • Page 69 master output address 30000. Double-click MAIN.Q1, in the pop-up dialog box, could select the corresponding 485 master output address 30001. http: // www.odotautomation.com TEL: +86-0816-2538289 66 / 76...
  • Page 70 5.Return the System Manager interface, click Active –Set/Reset TwinCAT to Run Mode, at this point, DPM01 and Beckhoff's DP adapter set up DP communication. 6、 Online monitoring, open the MODBUS POLL software, simulate the master system connected to the gateway 485.
  • Page 71 http: // www.odotautomation.com TEL: +86-0816-2538289 68 / 76...
  • Page 72: Annex

    7 Annex 7.1 Modbus-RTU Protocol Introduction For user, it is important to understand that Modbus has 8 important function codes corresponding to 4 areas: 4 read, 2 write a single bit or register, and 2 write multiple bits or multiple registers (Address description adopts PLC address). 7.1.1 Modbus Storage Area The storage area of the controller (or Modbus device) involved in Modbus is identified by 0XXXX, 1XXXX, 3XXXX and 4XXXX.
  • Page 73 In this example: read the output coil of the slave station No. 0x11, the register start address is 0x13=19, and the number of coils is 0x0025H=37. Therefore, the function of this query message is: read the output coil 00019-00055 of the slave station No.
  • Page 74 Register Start Register Start Number of Number of Function Address Address Address Registers Registers Code High Byte Low Byte High Byte Low Byte 0x11 0x03 0x00 0x6B 0x00 0x03 xxxx Function: Read slave station holding register 4XXXX value. Note: The starting address of some device registers is 40000, which corresponds to the address 40001 in the device, and the sequence is postponed.
  • Page 75 Function Input Register 30008 Input Register 30008 Address Byte Count Code High Byte Low Byte 0x11 0x04 0x02 0x01 0x01 xxxx Function: The slave station returns to the value of the input register 30008;(30008) =0x0101 (5) Force a single coil Function code: 05H Master station query message format: Function...
  • Page 76 sequence is postponed. Example: Preset the value of the single holding register 40135 of No. 17 slave device to 0x039E; Response format: return to the original text Register Start Register Start Number of Number of Function Address Address Address Registers Registers Code High Byte...
  • Page 77 (8) Preset multiple registers Function Code: 10H Master station query message format: Start Number Number Start Register Data Data Data Data Addre Functio Register Byte Address Register Register High High n Code Address Count s High s Low Byte Byte Byte Byte High Byte...
  • Page 78: Brief Introduction Of Serial Port Network Topology

    7.2 Brief introduction of serial port network topology 7.2.1 RS232 RS232 is one of serial communication interfaces controlled by industry. It is widely used to connect computer serial interface with peripherals. RS232 using a signal and a signal transmission form, return lines were in the land of the three wire connection mode, can realize full-duplex communications, the transmission signals for single ended, the total transmission of easy to generate common-mode interference, so the noise resistance is weak, the transmission distance is limited, RS232 interface...
  • Page 79 9-pin RS232 serial port(DB9) Name Function Carrier detect Receive data Send data Data terminal ready Signal ground Data ready Request to send Clear to send Ring alert As the RS232 interface has the above electrical characteristics, it can only realize point-to-point communication.
  • Page 80 7.2.2 RS422 The full name of RS422 interface standard is "Electrical Characteristics of Balanced Voltage Digital Interface Circuit", which defines the characteristics of the interface circuit. RS422 adopts four-wire plus ground wire (T+, T-, R+, R-, GND), full-duplex, differential transmission, multi-point communication data transmission protocol. It USES a balanced transmission line that is unidirectional/non-reversible, with or without an enabling end.
  • Page 81 The RS422 pin definition: RS422(9 Pin) Function Remark Receive negative Must connect Send negative Must connect Receiving positive Must connect Send positive Must connect The upper left corner is 1, the lower right corner is 9. The RS422 communication wiring diagram is shown in the figure: http: // www.odotautomation.com TEL: +86-0816-2538289 78 / 76...
  • Page 82 7.2.3 RS485 Since the RS-485 is developed from the RS-422, many electrical provisions of the RS-485 are similar to those of the RS-422.If they all adopt the balanced transmission mode, they all need to connect the final resistance on the transmission line, etc. The RS-485 can adopt two - wire and four - wire mode, and the two - wire system can realize real multi - point two - way communication.
  • Page 83 Ground wire The RS485 communication wiring diagram is shown in the figure: ________________________________________________________ Odot Automation System Co., Ltd. Add: Plant No. 204 MianYang Comprehensive Bonded Zone, Eastern section of FeiYun Avenue, MianYang,Sichuan Province,China.621000 Tel: +86-0816-2538289 Zip Code: 621000 Email: sales@odotautomation.com Web: www.odotautomation.com...

Table of Contents