CN114097588A - Networking method and device for irrigation device - Google Patents
Networking method and device for irrigation device Download PDFInfo
- Publication number
- CN114097588A CN114097588A CN202111269634.3A CN202111269634A CN114097588A CN 114097588 A CN114097588 A CN 114097588A CN 202111269634 A CN202111269634 A CN 202111269634A CN 114097588 A CN114097588 A CN 114097588A
- Authority
- CN
- China
- Prior art keywords
- slave
- master
- slaves
- inquiry
- address information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 230000002262 irrigation Effects 0.000 title claims abstract description 36
- 238000003973 irrigation Methods 0.000 title claims abstract description 36
- 230000006855 networking Effects 0.000 title claims abstract description 28
- 230000004044 response Effects 0.000 claims abstract description 110
- 230000008569 process Effects 0.000 abstract description 11
- 230000006854 communication Effects 0.000 description 12
- 238000004891 communication Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 10
- 230000009471 action Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000008054 signal transmission Effects 0.000 description 2
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 230000009131 signaling function Effects 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01G—HORTICULTURE; CULTIVATION OF VEGETABLES, FLOWERS, RICE, FRUIT, VINES, HOPS OR SEAWEED; FORESTRY; WATERING
- A01G25/00—Watering gardens, fields, sports grounds or the like
- A01G25/16—Control of watering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0876—Aspects of the degree of configuration automation
- H04L41/0886—Fully automatic configuration
Landscapes
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Water Supply & Treatment (AREA)
- Life Sciences & Earth Sciences (AREA)
- Environmental Sciences (AREA)
- Small-Scale Networks (AREA)
Abstract
The application provides a networking method and a device of an irrigation device, the device comprises a master machine and a plurality of slave machines for irrigation, each slave machine in the plurality of slave machines is provided with address information, the slave machines are configured to be communicated with the master machine, and the networking method comprises the following steps: the master sends inquiry signals to the plurality of slaves; the master machine receives responses of the plurality of slave machines to the inquiry signals and records address information of the slave machines which have responded; and the host sends the recorded address information of the slave which has responded to the user side. By adopting the technical scheme provided by the application, the automatic addition of the slave machine address information can be realized, and the process of manually adding the slave machine information to the user side is complicated.
Description
Technical Field
The application relates to the field of irrigation, in particular to a networking method and device of an irrigation device.
Background
In the irrigation field, it is often necessary for a master to control slaves distributed throughout using communications. The user side issues an instruction to control the slave machines with the specified numbers, so that the slave machines can irrigate after receiving the instruction.
Before the master machine controls the slave machine, communication between the master machine and the slave machine needs to be established firstly. The relevant slave address information needs to be added to the relevant user end, and then the point-to-point communication between the master and each slave is realized. Before adding the slave addresses, the master needs to know different slave addresses, in a common scheme, the slave addresses need to be added one by one artificially, however, hundreds of slave machines are hung downwards in the whole irrigation network, and therefore, it is very troublesome to add numbers one by one from a user end manually.
Disclosure of Invention
In order to solve the technical defects in the background art in the field, an embodiment of the present application is directed to provide a networking method and device for an irrigation device, so as to solve the technical problem that a host of an existing irrigation device needs to be manually and automatically added.
In order to achieve the above object, the embodiments of the present application provide the following specific solutions.
In a first aspect, the present application provides a method for networking an irrigation device.
Embodiments of the first aspect of the present application provide a networking method for an irrigation device, the device comprising a master and a plurality of slaves for implementing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the networking method comprising: the master sends inquiry signals to the plurality of slaves; the master machine receives responses of the plurality of slave machines to the inquiry signals and records address information of the slave machines which have responded; and the host sends the recorded address information of the slave which has responded to the user side.
In this embodiment, the operation mainly performed by the master end of the device includes, as a first step, sending an inquiry signal to a plurality of slaves, and starting to inquire whether the corresponding slaves exist. And the second step is that the master receives the responses of the plurality of slaves to the inquiry signals and records the address information of the slave which has responded, the master receives the response signals after the inquiry signals sent by the master are responded by the slaves in the last step, the received information contains the address information of the slave which responds, and the master also records the address information of the slave which responds when receiving the response signals. And thirdly, the host computer sends the recorded address signal of the slave computer which has responded to the user side, and in the step, the host computer executes a sending task and sends the address information of the slave computer to the client side. And finally, the automatic addition of the address information of the slave computer on the client is realized, so that the problem that the process of manually adding the slave computer to the host computer is too complicated is effectively solved.
Further, the master sends inquiry signals to the plurality of slaves, including: the master machine sequentially sends inquiry data packets to each slave machine according to the slave machine address information; the inquiry packet includes: address information of the destination slave, and inquiry information inquiring whether the slave exists.
In the embodiment of the present application, the master sends the inquiry packets to each slave in a certain order, specifically, the inquiry packets are sent in the order of the address information of the slave, and the inquiry is sequentially made to the slave. The present embodiment describes the specific content of the data packet in detail, and besides the address information, there is also a query message for communicating the query for the presence of the slave to the slave. In an optional example, the address information of the slave includes a number of the slave, and the number of the slave is obtained when the slave leaves a factory.
In an alternative example, the number of the slave in the technical solution of the present application may adopt the SN number of the slave product or the last several bits of the SN number. In the embodiment, the slave machine number is not changed, and when the slave machine leaves the factory, the SN number is already solidified in the slave machine, so that the SN number cannot be changed, the slave machines without the same number in the same network can be ensured, and the communication can be prevented from generating collision.
In an alternative embodiment, the query packet includes: address information of the destination slave, and inquiry information inquiring whether the slave exists.
In the present embodiment, the specific content of the packet is described in detail, and there is also one inquiry message in addition to the address information, so as to transmit an inquiry as to whether or not the slave exists to the slave.
Further, the method further includes that after the limited response time of the inquiry signals sent by the master computer to the plurality of slave computers, if the response data packet sent by the slave computer is not received, it is determined that the corresponding slave computer does not exist.
In this embodiment, a limited response time is set, and if the slave exists, the master receives the response packet sent from the slave within the limited response time, and if the slave does not exist, the master does not receive the response packet sent from the slave after the limited response time has elapsed.
Further, the responses of the plurality of slaves to the interrogation signal further includes: the slave state judging information of whether the slave is failed, and the method further comprises the following steps: and the master machine sends the corresponding slave machine state information of the responded slave machine to the user side.
In this embodiment, the response message received by the master includes not only the message for determining whether the slave exists, but also the status determination message for determining the fault of the slave. After the host collects the status information of the answering slave, the status information needs to be sent to the user side. In an alternative example, in the step of sending the recorded address information of the responded slave to the user side by the master, the master only sends the address information of the corresponding slave of the slaves having no fault information in the slave status information to the user side.
In an optional example, the content of the information sent by the host to the user side is limited, and after the host receives the state information sent by the corresponding slave, only the address information and the state information of the slave showing that the state is failure-free are selectively sent to the user side.
Further, the execution time of the networking method comprises: after the access of the slave is completed, after the slave is newly added, after the slave is removed, and after the request of the user terminal is received.
In this embodiment, the optimal execution time of the networking method is determined, specifically, after the slave is accessed, newly added to the slave, removed from the slave, and receives the user side request, which is summarized in the following description, when the number of slave accesses is changed or an operator actively needs to perform networking, but the execution time of the technical scheme of the present application is not limited to the time.
In a second aspect, embodiments of the present application provide an irrigation device networking device, the device including a master and a plurality of slaves for implementing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the master including: an inquiry module for sending inquiry signals to the plurality of slaves; the response receiving module is used for receiving response conditions of the plurality of slaves to the inquiry signals and recording responded slave address information; and the information sending module is used for sending the recorded responded slave address information to the user side.
The operation of the host part of the device is performed according to the method provided in the first aspect of the application.
In a third aspect, an embodiment of the present application provides a networking method for an irrigation device, where the device includes a master and a plurality of slaves for irrigation, each of the slaves has address information, and the slaves are configured to communicate with the master, and the networking method includes: the plurality of slaves receive inquiry signals sent by the master; the plurality of slaves transmits a response to the inquiry signal to the master.
In this embodiment, the slave mainly performs two operations, the first step is to receive the inquiry signal sent from the master, and only the existing slave can complete the action of receiving the inquiry signal. The second step is that the plurality of slave machines send responses to the inquiry signal to the master machine, and the slave machines execute the step after receiving the inquiry signal of the master machine.
Further, the responses of the plurality of slaves to the interrogation signal include: and the response data packet is sent from the slave to the master, wherein the response data packet comprises address information of the response slave and response information of the existence of the slave.
In this embodiment, the content of the data packet of the response signal sent by the slave is specifically described, and the response data packet includes response information existing in the slave and address information corresponding to the responding slave.
Further, the inquiry signal sent by the master comprises an inquiry data packet, wherein the inquiry data packet comprises address information of a target slave and inquiry information for inquiring whether the slave exists or not; after the plurality of slaves receive the inquiry signal sent by the master, the method further comprises the steps that the slaves analyze the address information of the target slave in the data packet and verify whether the address information of the target slave is matched with the address information of the slaves, and if the address information of the target slave is not matched with the address information of the slaves, the slaves do not respond to the inquiry signal.
In this embodiment, after receiving an inquiry packet sent by the host, the slave first parses the packet to obtain address information corresponding to the packet, and then compares the address information of the slave with the parsed address information to determine whether the address information of the packet matches the address information of the slave, and only when the address information matches, the slave responds to the inquiry signal.
In a fourth aspect, embodiments of the present application provide an irrigation device networking device, the device including a master and a plurality of slaves for implementing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the slaves including: the inquiry receiving module is used for receiving an inquiry signal sent by the host; and a reply module for sending a reply to the interrogation signal to the host.
The working process of the slave part of the device is carried out according to the method provided in the third aspect of the present application.
Preferably, in the embodiment of the application, a communication protocol including scanning response, solenoid valve control response, sensor data acquisition, and the like may be used, and a communication idea and a data packet protocol are used to facilitate communication between the master and the slave during irrigation networking and control of the slave by the master after irrigation networking.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic diagram illustrating a host-side method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram illustrating a slave-end method according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating steps performed by an overall method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a host-side device according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a slave device according to an embodiment of the present application;
fig. 6 is a schematic view of an overall apparatus provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Fig. 1 is a schematic diagram illustrating steps executed by a host-side method according to an embodiment of the present application, as shown in fig. 1, the method includes:
step 101: the master sends interrogation signals to the plurality of slaves.
In the specific implementation process of step 101, the master is a part of an irrigation device including a master and a plurality of slaves for irrigation implementation, and in this step, a signal transmission function is executed, the signal transmission may be a one-to-one accurate transmission or a one-to-many transmission at the same time, and the master may simultaneously transmit inquiry signals to a plurality of possible slaves in a certain order.
Step 102: and the master machine receives the responses of the plurality of slave machines to the inquiry signals and records the address information of the slave machines which have responded.
In the specific implementation process of step 102, the master performs a receiving task, specifically, responses to signals sent by the plurality of slaves, where the signals are responses to the inquiry signals sent by the slaves after receiving the inquiry signals sent by the master in the previous step, and are referred to as response signals, the response signals include address information of the relevant slaves responding, and the master also records the address information of the slaves while receiving the response signals.
Step 103: and the host sends the recorded address information of the responded slave to the user side.
In the specific implementation process of step 103, the host already receives the response signal of the slave in response and records the address information of the corresponding slave in the previous step, and in this step, the host needs to execute a sending task, the sending target in this step is the user side, and the host sends the response signal of the corresponding slave recorded in the previous step to the user side.
In an embodiment of the present invention, in step 101, the master sends inquiry signals to the plurality of slaves, and during the sending of the inquiry signals, the master sends inquiry packets to each slave according to the slave address information in sequence. The content of the inquiry packet includes address information of the target slave and inquiry information on whether the target slave exists. The master sends inquiry data packets to the possible slaves according to the address information, and sends inquiries to the corresponding slaves by using the content in the data packets. The master can send signals to each possible slave in a one-to-one manner or in a random order, or can send signals one to many at the same time, and the signals are sent in a certain order. The address information of the slave includes the number of the slave, in this embodiment, the number of the slave can be used as one of the address information of the slave, and the specific corresponding slave can be easily obtained according to the number of the slave. In an embodiment of the invention, the number of the slave is already obtained when the slave leaves the factory, preferably, the number of the slave is the last four digits of the SN number of the slave of the irrigation device, and the number is unique, and it is generally difficult for one irrigation network to reach ten thousand slaves, so that, generally, 9999 numbers are enough, slaves with the same number cannot be provided in the same network, otherwise, communication conflicts. Preferably, the numbering is not changeable, and the slave factory SN is already solidified inside and therefore not modifiable. The slave serial number is a fixed address of slave communication, and the equipment is solidified in a chip when being shipped. Without the concept of an interface, the numbered address is bound to the slave device. If the user clearly knows the number range of the slave device to be inquired, the address information range scanned by the slave device can be properly adjusted according to the corresponding range, so that the time for searching the slave device is reduced. The address information of the slave can be obtained according to the interface with the master, namely the number of the slave itself is not used as the address information, for example, for the interface No. 0001 of the master, the address information of the slave is determined to be No. 0001 No. no matter which slave is connected to the interface No. 0001, and the like.
In another embodiment of the present invention, the master defines the address information of the slaves according to the order in which the slaves feed back the master inquiry signals and the order in which the master receives the slave responses, that is, the slave that sends the response to the master first is defined as address information 0001, and so on.
In an embodiment of the present invention, also in step 101, the inquiry signal sent by the master to the slave refers to an inquiry packet, and the content of the inquiry packet includes address information of the target slave and inquiry information about whether the target slave exists. The master sends inquiry data packets to the possible slaves according to the address information, and sends inquiries to the corresponding slaves by using the content in the data packets.
In an embodiment of the present invention, in step 102, after the master sends the limited response time of the inquiry signal to the plurality of slaves, if the slave does not receive the response data packet sent from the slave, it is determined that the corresponding slave does not exist. The master machine is set with limited response time when receiving the response signal of the slave machine, under the normal condition, when the corresponding slave machine exists, the master machine sends an inquiry signal to the slave machine, the whole time length of the response signal of the slave machine is relatively fixed and is less than a certain time length, the time length is set as the limited response time, when the master machine sends the inquiry signal to the slave machine, and the response signal is not received after the response time is exceeded, the response time is abnormal, and the corresponding slave machine is judged to be absent.
In an embodiment of the present invention, in step 101-. When the host sends the recorded slave state information to the user side, the corresponding state information is also sent to the user side in addition to the existing slave address information.
In one embodiment of the present invention, in step 103, the master may send the corresponding status of the corresponding slave to the user side, but the status sent here is only "no fault", and when the master receives the fault information sent by the slave, the master records the slave number and the fault information, and sends only the slave address whose status is "no fault" to the user side, and the slave number and the status information that have fault are not sent to the user side.
In an embodiment of the present invention, in the steps 101-103, the steps are executed under specific conditions, specifically, after the slave access is completed, after the slave is newly added, after the slave is removed, and after the client request is received, the steps 101-103 are executed under the above four conditions.
Fig. 2 is a schematic diagram illustrating steps executed by a slave-end method according to an embodiment of the present application, and as shown in fig. 2, the method includes:
step 201: the plurality of slaves receive the inquiry signal sent by the master.
In the specific implementation process of step 201, a plurality of slaves receive an inquiry signal sent from the master, and only the existing slaves of the plurality of slaves receive the inquiry signal sent from the master.
Step 202: the plurality of slaves send responses to the interrogation signals to the master.
In the specific implementation of step 202, since the existing slave receives the inquiry signal sent by the master in the previous step, the slave needs to respond to the master.
In one embodiment of the present invention, in step 202, the response signal from the slave to the master includes sending a response packet to the master, where the response packet includes address information of the slave and response information of the slave.
In one embodiment of the present invention, in step 201, the inquiry signal received by the slave includes an inquiry packet, and the inquiry packet includes address information of the destination slave and inquiry information for inquiring whether the slave exists. After receiving the inquiry data packet, the slave analyzes the address information of the target slave in the data packet and verifies whether the address information of the target slave is matched with the address information of the slave, and if not, the slave does not respond to the inquiry signal. The inquiry data packet contains address information, each slave machine is bound with the address information, the slave machines analyze the inquiry data packet after receiving the inquiry data packet, firstly, the address information of the data packet and the address information of the slave machines are verified to see whether the two address information are matched, and the slave machines carry out response operation only when the two address information are matched with each other.
Fig. 3 is a schematic diagram illustrating an overall method implementation procedure provided in an embodiment of the present application.
Step 301: the master sends interrogation signals to the plurality of slaves.
In the implementation of step 301, a master first initiates an inquiry to a plurality of slaves.
Step 302: the plurality of slaves receive the inquiry signal sent by the master.
In the implementation of step 302, if the corresponding slave exists, the corresponding slave receives the inquiry signal sent by the master.
Step 303: the plurality of slaves transmit responses to the inquiry signals to the master.
In the specific implementation of step 303, when the slave receives the inquiry signal sent by the master in the previous step, the slave needs to respond to the master after receiving the inquiry signal, and the specific response form is that the slave sends a response signal to the master.
Step 304: and the master machine receives the responses of the plurality of slave machines to the inquiry signals and records the address information of the slave machines which have responded.
In the specific implementation process of step 304, if the slave sends the response signal to the master in the previous step, the master needs to receive the response signal sent by the slave, and record the address information corresponding to the slave sending the response signal while receiving the response signal.
Step 305: and the host sends the recorded address information of the responded slave to the user side.
In the specific implementation process of step 305, the master executes the sending task and sends the slave address information recorded in the previous step to the user side.
Fig. 4 is a schematic diagram of a host device according to an embodiment of the present disclosure.
Referring to fig. 4, the host 400 is the host 400 for the irrigation device networking device. It should be understood that the host 400 may correspond to the method embodiment of fig. 1 described above, and may be capable of executing various steps related to the method embodiment of fig. 1, and specific functions of the host 400 may be referred to the description of the related embodiments above in this application, and are appropriately omitted here to avoid repetition. In addition, the master 400 may also perform different master-slave matching methods according to its modules without departing from the scope of the present invention.
The host 400 includes, in total: an interrogation module 401 for sending interrogation signals to the plurality of slaves. Under the action of the module 401, the master side sends inquiry signals to the plurality of slaves to execute a task of initiating inquiry. This module performs a signaling function, the signaling is not an exact one-to-one transmission, and the module 401 sends inquiry signals to a plurality of possible slaves in a certain order.
And a response receiving module 402, configured to receive response situations of the multiple slaves to the inquiry signal and record slave address information that has been responded. The module 402 performs a receiving task, specifically, responses to signals sent by the plurality of slaves, where the signals are responses to the inquiry signals sent by the slaves after receiving the inquiry signals sent by the master in the previous step, and are referred to as response signals, the response signals include address information of the relevant slaves that respond to the responses, and the module 402 also records the address information of the slaves while receiving the response signals.
And an information sending module 403, configured to send the recorded responded slave address information to the user side. The host has already received the response signal of the slave in response and recorded the address information of the corresponding slave in the previous step, in this step, the module 403 needs to execute the sending task, the sending object in this step is the user side, and the module 403 sends the response signal of the corresponding slave recorded in the previous step to the user side.
Optionally, in this embodiment of the present application, the query module 401 sends a query signal to the plurality of slaves, and in the sending process of the query signal, the module 401 sends a query packet to each slave in the order of the slave address information. The content of the inquiry packet includes address information of the target slave and inquiry information on whether the target slave exists. The module 401 sends an inquiry packet to a slave that may exist according to the address information, and uses the content in the packet to send an inquiry whether the corresponding slave exists. The inquiry module can send signals to each possible slave in a one-to-one manner or in a random order, or send signals one to many at the same time, and the signals are sent in a certain order.
Optionally, the address information of the slave includes the number of the slave, and in this embodiment, the number of the slave may be used as one of the address information of the slave, and the specific slave can be easily obtained according to the number of the slave.
Optionally, the inquiry signal sent by the module 401 to the slave is an inquiry packet, and the content of the inquiry packet includes address information of the target slave and inquiry information about whether the target slave exists. The module 401 sends an inquiry packet to a slave that may exist according to the address information, and uses the content in the packet to send an inquiry whether the corresponding slave exists.
Optionally, after the module 402 sends the limited response time of the inquiry signal to the plurality of slaves, if the response data packet sent from the slave is not received yet, it is determined that the corresponding slave does not exist. The module 402 is set with limited response time when receiving the response signal of the slave, under normal condition, when the corresponding slave exists, the slave 401 sends the inquiry signal to the response signal responded by the slave, the whole time length is relatively fixed and is lower than a certain time length, the time length is set as the limited response time, when the module 401 sends the inquiry signal to the slave and still does not receive the response signal after exceeding the response time, the abnormal condition is determined, and the module 402 judges that the corresponding slave does not exist.
Optionally, the module 401 sends the query signal to determine whether the corresponding slave device is functioning normally in addition to determining whether the corresponding slave device is present, and therefore, the response signal received by the module 402 also includes a status response to whether the slave device is faulty. When the module 403 sends the recorded slave status information to the user end, in addition to sending the existing slave address information, the corresponding status information is also sent to the user end. The module 403 may send the corresponding state of the corresponding slave to the user side, but the sent state is only "no fault", when the module 402 receives the fault information sent by the slave, the module 402 records only the slave number and the fault information, and sends only the slave address whose state is "no fault" to the user side, and the module 403 does not send the slave number and the state information with fault to the user side.
Optionally, the module 401 and 403 may execute the above functions in a specific case, specifically, after the slave is accessed, after the slave is newly added, after the slave is removed, and after the user end request is received.
Fig. 5 is a schematic diagram of a slave device according to an embodiment of the present application.
Referring to fig. 5, the slave 500 is a slave that requests for a networking device for irrigation devices. It should be understood that the slave 500 corresponds to the above-mentioned embodiment of the method in fig. 2, and is capable of executing the steps related to the embodiment of the method in fig. 2, and specific functions of the slave 500 may be referred to the description of the related embodiments above in this application, and are appropriately omitted here to avoid repetition. In addition, the slave 500 may also perform different master-slave matching methods according to its module without departing from the scope of the present invention.
The slave 500 comprises in total: an inquiry receiving module 501, configured to receive an inquiry signal sent by the host. The inquiry receiving module 501 receives an inquiry signal sent from the master, and only the module 501 of the existing slave receives the inquiry signal sent from the master, and obviously, if the corresponding slave does not exist, the corresponding module 501 cannot receive the inquiry signal sent from the master.
A reply module 502 for sending a reply to the interrogation signal to the host. Since the existing slave corresponding module 501 receives the inquiry signal sent by the master, it needs to respond to the master, and in this step, the module 502 sends a response signal to the master as a response to the master.
Optionally, the module 502 sends the response signal to the master device includes sending a response packet to the master device, where the response packet includes address information of the slave device and response information of the slave device.
Optionally, the inquiry signal received by the module 501 includes an inquiry packet, where the inquiry packet includes address information of the destination slave and inquiry information for inquiring whether the slave exists. After receiving the inquiry packet, the module 501 parses the address information of the destination slave in the packet, and verifies whether the address information of the destination slave matches the address information of the destination slave, and if not, the module 502 does not respond to the inquiry signal. The inquiry data packet includes address information, each slave machine also binds address information, when the module 501 receives the inquiry data packet, the module analyzes the inquiry data packet, firstly verifies the address information of the data packet and the address information of the slave machine to see whether the two address information are matched, and only when the two address information are matched with each other, the module 502 performs response operation.
Fig. 6 is a schematic view of an overall apparatus provided in an embodiment of the present application.
Referring to fig. 6, the device 600 includes a master and a slave of an irrigation device networking device. It should be understood that the apparatus 600 corresponds to the above-mentioned embodiment of the method in fig. 3, and is capable of executing the steps related to the embodiment of the method in fig. 3, and the specific functions of the apparatus 600 may be referred to the description of the related embodiments above in this application, and are appropriately omitted here to avoid repetition. In addition, the device 600 may also perform different master-slave matching methods according to its modules without departing from the scope of the present invention.
The apparatus 600 comprises in combination: master module 610, slave module 620, slave module 630, slave module 640, slave module 650. In the slave modules 620 and 650, each module has 2500 slaves, which are in bidirectional communication with the master module 610. The slave module 620 has the same internal structure as the other three slaves, and as an example, is shown in fig. 6, and the slave 620 internally includes an inquiry receiving module 622 and a response module 624. The host 610 includes an inquiry module 612, a response receiving module 614 and an information sending module 616.
An interrogation module 612 for sending interrogation signals to the plurality of slaves. In the specific implementation of block 612, an inquiry to multiple slaves (slave 620 and 650) is first initiated.
And an inquiry receiving module 622 for receiving the inquiry signal sent by the inquiry module 612 in the host 610. In the implementation of the module 622, if the corresponding slave exists, the inquiry receiving module 622 in the corresponding slave receives the inquiry signal sent by the master.
A reply module 624 for sending a reply to the interrogation signal to the host. In the implementation of block 624, block 622 has received the inquiry signal from the host before that, and after receiving the inquiry signal, block 624 needs to reply to the host, specifically, in the form of a reply signal sent by block 624 to the host.
And a response receiving module 614, configured to receive responses from the multiple slaves to the inquiry signal, and record address information of the slaves that have responded. In the specific implementation process of the module 614, if the module 624 in the slave sends a response signal to the master before, the module 614 in the master needs to receive the response signal sent by the slave, and record the address information corresponding to the slave sending the response signal at the same time of receiving the response signal.
And an information sending module 616, configured to send the recorded address information of the slave that has responded to the user side. In the specific implementation of block 616, block 616 executes the sending task and sends the slave address information recorded in block 614 to the user side.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A networking method of an irrigation device, the device comprising a master and a plurality of slaves for performing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the networking method comprising:
the master sends inquiry signals to the plurality of slaves;
the master machine receives responses of the plurality of slave machines to the inquiry signals and records address information of the slave machines which have responded; and
and the host sends the recorded address information of the slave machine which has responded to the user side.
2. The method of claim 1, wherein the master sends interrogation signals to the plurality of slaves, comprising: the master machine sequentially sends inquiry data packets to each slave machine according to the slave machine address information;
wherein the query packet comprises: address information of the destination slave, and inquiry information inquiring whether the slave exists.
3. The method of claim 1, further comprising:
and after the host computer sends the inquiry signals to the plurality of slave computers within the limited response time, if the response data packet sent by the slave computer is not received, judging that the corresponding slave computer does not exist.
4. The method of claim 1, wherein the responses of the plurality of slaves to the interrogation signal further comprises: slave state judging information indicating whether the slave is in fault;
the method further comprises the following steps: and the master machine sends the corresponding slave machine state information of the responded slave machine to the user side.
5. The method of claim 1, wherein the execution time of the networking method comprises: after the access of the slave is completed, after the slave is newly added, after the slave is removed, and after the request of the user terminal is received.
6. A networking method of an irrigation device, the device comprising a master and a plurality of slaves for performing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the networking method comprising:
the plurality of slaves receive inquiry signals sent by the master;
the plurality of slaves transmits a response to the inquiry signal to the master.
7. The method of claim 6, wherein the responses of the plurality of slaves to the interrogation signal include: and the response data packet is sent from the slave to the master, wherein the response data packet comprises address information of the response slave and response information of the existence of the slave.
8. The method according to claim 6, wherein the inquiry signal sent by the master comprises an inquiry data packet, wherein the inquiry data packet comprises address information of a destination slave and inquiry information for inquiring whether the slave exists; after the plurality of slaves receive the inquiry signal sent by the master, the method further comprises the following steps:
and the slave machine analyzes the address information of the target slave machine in the data packet and verifies whether the address information of the target slave machine is matched with the address information of the slave machine, and if not, the slave machine does not respond to the inquiry signal.
9. An irrigation device networking device, the device comprising a master and a plurality of slaves for performing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the master comprising:
an inquiry module for sending inquiry signals to the plurality of slaves;
the response receiving module is used for receiving response conditions of the plurality of slaves to the inquiry signals and recording responded slave address information; and
and the information sending module is used for sending the recorded responded slave address information to the user side.
10. An irrigation device networking device, the device comprising a master and a plurality of slaves for performing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the slaves comprising:
the inquiry receiving module is used for receiving an inquiry signal sent by the host; and
a reply module for sending a reply to the interrogation signal to the host.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111269634.3A CN114097588B (en) | 2021-10-29 | 2021-10-29 | Networking method and device of irrigation device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111269634.3A CN114097588B (en) | 2021-10-29 | 2021-10-29 | Networking method and device of irrigation device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114097588A true CN114097588A (en) | 2022-03-01 |
CN114097588B CN114097588B (en) | 2023-10-31 |
Family
ID=80379408
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111269634.3A Active CN114097588B (en) | 2021-10-29 | 2021-10-29 | Networking method and device of irrigation device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114097588B (en) |
Citations (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07177161A (en) * | 1993-12-21 | 1995-07-14 | Hitachi Denshi Ltd | Polling selecting method |
JPH0823586A (en) * | 1994-07-05 | 1996-01-23 | Toshiba Syst Technol Kk | Polling method in monitoring control system |
JPH1174915A (en) * | 1997-08-29 | 1999-03-16 | Nec Corp | Automatic setting method for ip address in tcp/ip network |
JP2003124946A (en) * | 2001-10-10 | 2003-04-25 | Nec Corp | Microwave radio communication system and automatic address allocation method |
US6700877B1 (en) * | 1997-08-05 | 2004-03-02 | Siemens Aktiengesellschaft | Method and bus system for automatic address allocation |
WO2008052685A2 (en) * | 2006-10-31 | 2008-05-08 | Moeller Gmbh | Method and arrangement for communication on an lin bus |
CN101247290A (en) * | 2008-03-14 | 2008-08-20 | 中兴通讯股份有限公司 | Ethernet switchboard high temperature ageing real-time monitoring method and system |
JP2008301140A (en) * | 2007-05-31 | 2008-12-11 | Yokogawa Electric Corp | Address acquisition system |
US20140165182A1 (en) * | 2012-12-06 | 2014-06-12 | Owl Computing Technologies, Inc. | System for secure transfer of information from an industrial control system network |
US20140173013A1 (en) * | 2012-12-19 | 2014-06-19 | Motech Industries, Inc. | Method for setting addresses of slave devices in communication network |
CN104811339A (en) * | 2015-04-23 | 2015-07-29 | 光一科技股份有限公司 | Intelligent networking method based on arbitration-free bus |
WO2015196654A1 (en) * | 2014-06-26 | 2015-12-30 | 中兴通讯股份有限公司 | Distributed management method and device for network management |
CN105578383A (en) * | 2015-05-25 | 2016-05-11 | 上海归墟电子科技有限公司 | 2.4G-based networking communication system and communication method |
CN105743757A (en) * | 2016-01-27 | 2016-07-06 | 南京埃斯顿自动化股份有限公司 | Free networking method of RS485 communication terminal |
KR20170135266A (en) * | 2016-05-31 | 2017-12-08 | 유넷시스템주식회사 | Key management device |
CN107580085A (en) * | 2017-10-26 | 2018-01-12 | 北京科技大学 | A kind of internet of things networking method |
CN108199867A (en) * | 2017-12-20 | 2018-06-22 | 北京城市系统工程研究中心 | A kind of network-building method and data transmission method of wired sensor network |
CN108833602A (en) * | 2018-05-24 | 2018-11-16 | 湖北文理学院 | A kind of bus address auto-allocation method and system based on component manufacturing variation |
CN108848199A (en) * | 2018-05-28 | 2018-11-20 | 浙江嘉宏电力科技有限公司 | A kind of peer-to-peer network automatic seeking main system and method |
CN109698871A (en) * | 2018-12-20 | 2019-04-30 | 京信通信系统(中国)有限公司 | A kind of optical fiber distributed type access system and its management method |
CN111541596A (en) * | 2020-04-20 | 2020-08-14 | 广州致远电子有限公司 | Relay response automatic numbering method, device, equipment and storage medium |
CN111756610A (en) * | 2020-05-29 | 2020-10-09 | 宁波三星医疗电气股份有限公司 | RS485 bus communication time sequence control method |
CN112199316A (en) * | 2020-10-10 | 2021-01-08 | 海尔海斯(西安)控制技术有限公司 | Configuration method and communication method of chain type master-slave serial port communication device |
CN113094321A (en) * | 2021-04-30 | 2021-07-09 | 中煤科工集团重庆研究院有限公司 | RS485 bus communication method based on group call and time slot allocation |
CN113099431A (en) * | 2021-03-24 | 2021-07-09 | 瀚云科技有限公司 | Communication method and device based on LoRa channel and LoRa host |
-
2021
- 2021-10-29 CN CN202111269634.3A patent/CN114097588B/en active Active
Patent Citations (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07177161A (en) * | 1993-12-21 | 1995-07-14 | Hitachi Denshi Ltd | Polling selecting method |
JPH0823586A (en) * | 1994-07-05 | 1996-01-23 | Toshiba Syst Technol Kk | Polling method in monitoring control system |
US6700877B1 (en) * | 1997-08-05 | 2004-03-02 | Siemens Aktiengesellschaft | Method and bus system for automatic address allocation |
JPH1174915A (en) * | 1997-08-29 | 1999-03-16 | Nec Corp | Automatic setting method for ip address in tcp/ip network |
JP2003124946A (en) * | 2001-10-10 | 2003-04-25 | Nec Corp | Microwave radio communication system and automatic address allocation method |
WO2008052685A2 (en) * | 2006-10-31 | 2008-05-08 | Moeller Gmbh | Method and arrangement for communication on an lin bus |
JP2008301140A (en) * | 2007-05-31 | 2008-12-11 | Yokogawa Electric Corp | Address acquisition system |
CN101247290A (en) * | 2008-03-14 | 2008-08-20 | 中兴通讯股份有限公司 | Ethernet switchboard high temperature ageing real-time monitoring method and system |
US20140165182A1 (en) * | 2012-12-06 | 2014-06-12 | Owl Computing Technologies, Inc. | System for secure transfer of information from an industrial control system network |
US20140173013A1 (en) * | 2012-12-19 | 2014-06-19 | Motech Industries, Inc. | Method for setting addresses of slave devices in communication network |
WO2015196654A1 (en) * | 2014-06-26 | 2015-12-30 | 中兴通讯股份有限公司 | Distributed management method and device for network management |
CN104811339A (en) * | 2015-04-23 | 2015-07-29 | 光一科技股份有限公司 | Intelligent networking method based on arbitration-free bus |
CN105578383A (en) * | 2015-05-25 | 2016-05-11 | 上海归墟电子科技有限公司 | 2.4G-based networking communication system and communication method |
CN105743757A (en) * | 2016-01-27 | 2016-07-06 | 南京埃斯顿自动化股份有限公司 | Free networking method of RS485 communication terminal |
KR20170135266A (en) * | 2016-05-31 | 2017-12-08 | 유넷시스템주식회사 | Key management device |
CN107580085A (en) * | 2017-10-26 | 2018-01-12 | 北京科技大学 | A kind of internet of things networking method |
CN108199867A (en) * | 2017-12-20 | 2018-06-22 | 北京城市系统工程研究中心 | A kind of network-building method and data transmission method of wired sensor network |
CN108833602A (en) * | 2018-05-24 | 2018-11-16 | 湖北文理学院 | A kind of bus address auto-allocation method and system based on component manufacturing variation |
CN108848199A (en) * | 2018-05-28 | 2018-11-20 | 浙江嘉宏电力科技有限公司 | A kind of peer-to-peer network automatic seeking main system and method |
CN109698871A (en) * | 2018-12-20 | 2019-04-30 | 京信通信系统(中国)有限公司 | A kind of optical fiber distributed type access system and its management method |
CN111541596A (en) * | 2020-04-20 | 2020-08-14 | 广州致远电子有限公司 | Relay response automatic numbering method, device, equipment and storage medium |
CN111756610A (en) * | 2020-05-29 | 2020-10-09 | 宁波三星医疗电气股份有限公司 | RS485 bus communication time sequence control method |
CN112199316A (en) * | 2020-10-10 | 2021-01-08 | 海尔海斯(西安)控制技术有限公司 | Configuration method and communication method of chain type master-slave serial port communication device |
CN113099431A (en) * | 2021-03-24 | 2021-07-09 | 瀚云科技有限公司 | Communication method and device based on LoRa channel and LoRa host |
CN113094321A (en) * | 2021-04-30 | 2021-07-09 | 中煤科工集团重庆研究院有限公司 | RS485 bus communication method based on group call and time slot allocation |
Non-Patent Citations (6)
Title |
---|
周志敏等, 中国电力出版社 * |
张垒等: "基于随机数发生器的设备地址自动分配方法", 《自动化与仪表》 * |
张垒等: "基于随机数发生器的设备地址自动分配方法", 《自动化与仪表》, no. 11, 30 November 2017 (2017-11-30), pages 41 - 44 * |
潘永雄: "《STM8S系列单片机原理与应用》", vol. 2, 28 February 2015, 西安电子科技大学出版社, pages: 213 - 214 * |
红-萝-卜: "MOSBUS-RTU协议从机地址分配", Retrieved from the Internet <URL:https://blog.csdn.net/zhuangjitongxue/article/details/> * |
胡文等: "一种PLC扩展板寻址方法的实现", 制造业自动化, vol. 1, no. 11, pages 152 - 38 * |
Also Published As
Publication number | Publication date |
---|---|
CN114097588B (en) | 2023-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110912944B (en) | CAN equipment safety test system and test method | |
US11063855B2 (en) | Monitoring of the data transmission in a client/server-based device access system | |
CN1745371A (en) | Interface module for use with a fieldbus device network and modbus device network | |
CN110704265A (en) | Early warning information active reporting method and system based on Modbus protocol | |
CN114422288B (en) | Communication system based on Modbus protocol | |
US6449289B1 (en) | Multi-processor bus protocol system | |
US11537485B2 (en) | Test sequencing method, configuration generating method, and configuration generating apparatus for testing devices according to their communication protocols | |
CN103186440A (en) | Method, device and system for detecting in-place state of sub cards | |
CN112015163B (en) | Method and device for quickly identifying diagnostic subject on CAN bus | |
CN107453844B (en) | Method and device for automatically networking intelligent equipment | |
CN114097588B (en) | Networking method and device of irrigation device | |
CN112165422A (en) | One-master multi-slave temperature control system and address automatic matching method | |
CN116126613A (en) | Position detection method and device of PCIe (peripheral component interconnect express) equipment, electronic equipment and storage medium | |
CN115980554A (en) | Chip testing method and electronic equipment thereof | |
US10459816B2 (en) | Communication setting notification apparatus | |
CN115454896A (en) | SMBUS-based SSD MCTP control message verification method and device, computer equipment and storage medium | |
CN112178881B (en) | Self-checking method and device of RS485 network | |
US11171857B2 (en) | Identifying an electronic device connected to a communication network that has XCP enabled | |
CN114326673A (en) | Vehicle remote diagnosis method and device, connector and storage medium | |
CN106803848B (en) | Battery testing device middle position machine management method and device | |
CN117914642A (en) | Modbus bus sharing monitoring device | |
JP2001333083A (en) | Setting method for newly adding and deleting field device, and method for newly adding field device | |
KR101268677B1 (en) | Apparatus and method for reprogramming a plurality of ECUs | |
US9081743B2 (en) | Communication system and communicaton method | |
US8619778B2 (en) | Method for automatic address allocation to a communication partner and a communication partner |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |