A method for automatically assigning modbus RTU bus address

A technology of automatic allocation and bus address, applied in the direction of bus network, data exchange through path configuration, digital transmission system, etc., can solve problems such as low efficiency and difficulty in modifying addresses, improve efficiency, increase freedom, and increase subjective initiative Effect

Active Publication Date: 2020-03-20
成都工鼎科技有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the present invention is to provide a Modbus RTU bus address automatic distribution method, which is used to solve the problem that Modbus RTU in the prior art needs to realize the inefficiency caused by the upper computer distribution address and then installation and use, and the difficult problem of modifying the address

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method for automatically assigning modbus RTU bus address
  • A method for automatically assigning modbus RTU bus address
  • A method for automatically assigning modbus RTU bus address

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] combined with figure 1 and figure 2 Shown, a kind of Modbus RTU bus address automatic allocation method comprises the following steps:

[0036] 1) The Modbus master station starts automatically when it is powered on, reads the local configuration information, sets its own address to a fixed site address 0x00, and periodically sends broadcast messages to check whether there is a Modbus slave station connected;

[0037] 2) Waiting for the online Modbus slave station to access the network after the address assignment of the previous Modbus slave station is successful, and after receiving the broadcast message sent by the Modbus master station, send a self-information broadcast;

[0038] 3) The Modbus master station receives the self-information broadcast of the Modbus slave station, assigns an address for the Modbus slave station waiting to be assigned an address or confirms the address for the Modbus slave station with a pre-allocated address, and broadcasts a communica...

Embodiment 2

[0053] On the basis of Example 1, in conjunction with the attached figure 1 and figure 2 As shown, in the step 1), the destination address of the broadcast message is 0xFF, and the information of the broadcast message includes the station address and the attribute of the Modbus slave station existing on the RS-485 bus update cycle and the RS-485 bus.

[0054] The destination address of the broadcast message is set to 0xFF, which ensures that the Modbus slave station can receive the information sent by the Modbus master station, and understand the site address and attributes of the Modbus slave station on the network, but only the Modbus slave station waiting to go online will respond , so that the Modbus master station can check whether there are Modbus slave stations waiting to go online.

Embodiment 3

[0056] On the basis of embodiment 2, in conjunction with the attached figure 1 and figure 2 As shown, the Modbus slave station waiting to go online in the step 2) includes: a. the Modbus slave station whose address is pre-allocated in the upper computer by the user, and b. the Modbus slave station which waits for the Modbus master station to assign an address.

[0057] The Modbus slave station with the pre-allocated address set by the user on the upper computer is the Modbus slave station with the pre-allocated address, and the Modbus slave station waiting for the address assigned by the Modbus master station is the Modbus slave station with the address to be assigned. In this way, the user can use a dedicated The upper computer sets the site address of the Modbus slave station or the Modbus master station automatically assigns the site address to the Modbus slave station, which increases the freedom of user choice.

[0058] Further preferably, the user sets his own site add...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for automatically assigning a Modbus RTU bus address. Station access; 2) Waiting for the online Modbus slave station to access the network after the address assignment of the previous Modbus slave station is successful, and after receiving the broadcast message sent by the Modbus master station, send a self-information broadcast; 3) The Modbus master station receives Self-information broadcast to Modbus slaves, assigning addresses to Modbus slaves waiting to be assigned addresses online or confirming addresses for Modbus slaves with pre-allocated addresses, and broadcasting communication start messages; 4) Waiting to be received by Modbus slaves who are online Broadcast a communication start message, send a response message, and wait for the online status to change to the online status; 5) The Modbus master station establishes communication with the online Modbus slave station. The Modbus master station automatically assigns the bus address to the Modbus slave station, which realizes the plug and play of Modbus RTU equipment and improves the use efficiency.

Description

technical field [0001] The invention relates to the field of industrial communication, in particular to a method for automatically assigning Modbus RTU bus addresses. Background technique [0002] The Modbus network is an industrial communication system, which is composed of a programmable controller with an intelligent terminal and a computer connected through a network. The Modbus network has only one host, and all communications are sent by it. The network can support multiple remote slave controllers. Using the Modbus protocol, the controllers can communicate with each other, and between the controllers and other devices via the network. When communicating on a Modbus network, the Modbus protocol dictates that each controller needs to know their device address to identify messages sent by that address. If a response is required, the controller will generate a feedback message and send it using the Modbus protocol. This protocol supports legacy RS-232, RS-422, RS-485 an...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/12H04L12/40
CPCH04L12/40H04L2012/40228H04L61/50
Inventor 张鹏
Owner 成都工鼎科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products