[go: up one dir, main page]

CN110677334B - Adaptive configuration method and device for underwater robot system - Google Patents

Adaptive configuration method and device for underwater robot system Download PDF

Info

Publication number
CN110677334B
CN110677334B CN201910922000.XA CN201910922000A CN110677334B CN 110677334 B CN110677334 B CN 110677334B CN 201910922000 A CN201910922000 A CN 201910922000A CN 110677334 B CN110677334 B CN 110677334B
Authority
CN
China
Prior art keywords
address
configuration
baud rate
station
slave station
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.)
Active
Application number
CN201910922000.XA
Other languages
Chinese (zh)
Other versions
CN110677334A (en
Inventor
刘可安
张定华
尚敬
刘浩平
彭勃
杨鸣远
肖伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuzhou CRRC Times Electric Co Ltd
Original Assignee
Zhuzhou CRRC Times Electric Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhuzhou CRRC Times Electric Co Ltd filed Critical Zhuzhou CRRC Times Electric Co Ltd
Priority to CN201910922000.XA priority Critical patent/CN110677334B/en
Publication of CN110677334A publication Critical patent/CN110677334A/en
Application granted granted Critical
Publication of CN110677334B publication Critical patent/CN110677334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J11/00Manipulators not otherwise provided for
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1679Programme controls characterised by the tasks executed
    • B25J9/1689Teleoperation

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Selective Calling Equipment (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a self-adaptive configuration method and a device of an underwater robot system, which comprise the following steps: determining a self-adaptive mode according to system configuration information; determining a target slave station according to the self-adaptive mode; sending a configuration request to a target slave station to enable the target slave station to carry out self-adaptive configuration to obtain configuration information; receiving a configuration response which is sent by the target slave station and comprises configuration information; the configuration information is confirmed with the target slave station. The invention can realize the self-adaptive configuration of the slave station, and has flexible configuration and convenient maintenance.

Description

Adaptive configuration method and device for underwater robot system
Technical Field
The invention relates to the technical field of underwater robots, in particular to a self-adaptive configuration method and a self-adaptive configuration device for an underwater robot system.
Background
The underwater robot is a limit operation robot working underwater, different types of underwater robots can be used for executing different tasks, and the underwater robot is widely applied to a plurality of fields such as maritime affairs, customs, nuclear power, water and electricity, marine oil, fishery, marine rescue, marine scientific research and the like.
An underwater robotic system generally comprises an underwater portion and an above-water portion, the underwater portion comprising a master station and a plurality of slave stations, the master station communicating with the slave stations and the master station communicating with a monitoring station of the above-water portion. In the existing system design, before each slave station is initially installed in a system, technicians manually configure configuration information of each slave station, the system is accessed after configuration is completed, and an underwater part is driven to work by 1-6 kilometers deep underwater after the system configuration is completed. The method is not flexible enough in configuration and is very inconvenient for later maintenance.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for adaptive configuration of an underwater robot system, which can implement adaptive configuration of the system and facilitate later maintenance.
Based on the above purpose, the invention provides an adaptive configuration method of an underwater robot system, which is applied to a master station and comprises the following steps:
determining a self-adaptive mode according to system configuration information;
determining a target slave station according to the self-adaptive mode;
sending a configuration request to the target slave station to enable the target slave station to carry out self-adaptive configuration to obtain configuration information;
receiving a configuration response which is sent by the target slave station and comprises configuration information;
and confirming the configuration information with the target slave station.
Optionally, the adaptive mode is a full adaptive mode, and the target slave station is all slave stations.
Optionally, the adaptive mode is a partial adaptive mode, the target slave station is a reconfiguration slave station, and the reconfiguration slave station includes a new slave station and/or an existing slave station that needs to be reconfigured.
Optionally, the configuration request at least one of the following requests:
a baud rate configuration request used for enabling the target slave station to carry out baud rate self-adaptive configuration;
and the address configuration request is used for enabling the target slave station to carry out address self-adaptive configuration.
The embodiment of the invention also provides a self-adaptive configuration method of the underwater robot system, which is applied to a slave station and comprises the following steps:
receiving a configuration request sent by a master station;
carrying out self-adaptive configuration to obtain configuration information;
transmitting a configuration response including the configuration information to the primary station;
and confirming the configuration information with the master station.
Optionally, the receiving a configuration request sent by the master station, performing adaptive configuration to obtain configuration information includes:
setting different baud rates in turn according to a set time interval;
receiving a baud rate configuration request sent by the master station;
stopping alternately setting the baud rate, and taking the currently set baud rate as the configured baud rate.
Optionally, the receiving a configuration request sent by the master station, performing adaptive configuration to obtain configuration information includes:
receiving an address configuration request sent by the master station;
randomly generating a sub-address;
transmitting a configuration response to the primary station including the sub-address.
The embodiment of the invention also provides a self-adaptive configuration device of the underwater robot system, which comprises the following components:
the mode determining module is used for determining an adaptive mode according to the system configuration information;
the slave station determining module is used for determining a target slave station according to the self-adaptive mode;
the first data sending module is used for sending a configuration request to the target slave station so as to enable the target slave station to carry out self-adaptive configuration and obtain configuration information;
a first data receiving module, configured to receive a configuration response including the configuration information sent by the target slave station;
and the first confirmation module is used for confirming the configuration information with the target slave station.
Optionally, the adaptive mode includes a full adaptive mode and a partial adaptive mode; in the full self-adaptive mode, the target slave stations are all slave stations; and under the partial self-adaptive mode, the target slave station is a reconfiguration slave station, and the reconfiguration slave station comprises a new slave station and/or an existing slave station needing reconfiguration.
The embodiment of the invention also provides a self-adaptive configuration device of the underwater robot system, which comprises the following components:
the second data receiving module is used for receiving the configuration request sent by the master station;
the configuration module is used for carrying out self-adaptive configuration to obtain configuration information;
a second data sending module, configured to send a configuration response including the configuration information to the master station;
and the second confirmation module is used for confirming the configuration information with the main station.
From the above, the adaptive configuration method and device for the underwater robot system provided by the invention determine the adaptive mode according to the system configuration information; determining a target slave station according to the self-adaptive mode; sending a configuration request to a target slave station to enable the target slave station to carry out self-adaptive configuration to obtain configuration information; receiving a configuration response which is sent by the target slave station and comprises configuration information; the configuration information is confirmed with the target slave station. The target slave station can be configured in a self-adaptive mode, the configuration is flexible, the later maintenance is very convenient, and the practicability is high.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a block diagram of an underwater robotic system;
fig. 2 is a schematic flow chart of an adaptive configuration method applied to a primary station according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a system boot process according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a fully adaptive mode method according to an embodiment of the present invention;
FIG. 5 is a networking topology diagram of an embodiment of the present invention;
FIG. 6 is a flow chart of a partial adaptive mode method according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating an adaptive configuration method applied to a secondary station according to an embodiment of the present invention;
FIG. 8 is a flow chart of a baud rate configuration method according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating an address configuration method according to an embodiment of the present invention;
FIG. 10 is a block diagram of an apparatus according to an embodiment of the present invention;
fig. 11 is a block diagram of an apparatus according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
Fig. 1 is a networking topology diagram of an underwater robot system, and fig. 2 is a flow diagram of an adaptive configuration method applied to a master station according to an embodiment of the present invention. As shown in the figure, an embodiment of the present invention provides an adaptive configuration method for an underwater robot system, which is applied to an underwater robot system, the system includes an underwater portion, the underwater portion includes a master station and a plurality of slave stations, in a starting process of the master station, adaptive configuration of each slave station can be realized, and the adaptive configuration method applied to the master station includes:
s20: determining a self-adaptive mode according to system configuration information;
s21: determining a target slave station according to the self-adaptive mode;
s22: sending a configuration request to a target slave station to enable the target slave station to carry out self-adaptive configuration to obtain configuration information;
s23: receiving a configuration response which is sent by the target slave station and comprises configuration information;
s24: and after the master station and the target slave station confirm the configuration information, completing the self-adaptive configuration.
According to the self-adaptive configuration method of the underwater robot system, the main station determines the self-adaptive mode according to the system configuration information.
In one embodiment, the adaptive mode may include a full adaptive mode and a partial adaptive mode, in the full adaptive mode, the target slave station is determined to be all slave stations, the master station sends a configuration request to all slave stations, all slave stations receive the configuration request, perform adaptive configuration, generate configuration information, send a configuration response including the configuration information to the master station after configuration is completed, and after the master station confirms the configuration information with all slave stations, adaptive configuration of all slave stations is completed. And under a partial self-adaptive mode, determining that the target slave station is a reconfiguration slave station, sending a configuration request to the reconfiguration slave station by the master station, receiving the configuration request by the reconfiguration slave station, performing self-adaptive configuration, generating configuration information, sending a configuration response comprising the configuration information to the master station after the configuration is completed, and completing the self-adaptive configuration of the reconfiguration slave station after the master station and the reconfiguration slave station confirm the configuration information. The invention can realize the self-adaptive configuration of the target slave station according to the self-adaptive mode, and has flexible configuration and convenient maintenance.
Fig. 3 is a schematic system startup flow diagram according to an embodiment of the present invention. As shown, the start-up procedure of the underwater part of the underwater robot system is:
s30: powering up a master station;
s31: the master station reads system configuration information;
s32: determining an adaptive mode according to the system configuration information, if the adaptive mode is a full adaptive mode, executing step S3210, and if the adaptive mode is a partial adaptive mode, executing step S3220;
in the process of electrifying and starting the main station, firstly, reading system configuration information, and determining the self-adaptive mode of the system according to the system configuration information, wherein the self-adaptive mode comprises a full self-adaptive mode and a partial self-adaptive mode.
The system is constructed, the networking of the master station and the slave stations is completed, and when the master station and the slave stations are powered on and started for the first time, a full-adaptive mode can be adopted, the target slave stations are all the slave stations in the full-adaptive mode, and all the slave stations need to perform an adaptive configuration process to determine respective configuration information.
When one or more slave stations need to be replaced, maintained, upgraded and the like, or newly added slave stations exist, the slave stations are used as reconfiguration slave stations, the reconfiguration slave stations adopt a partial self-adaptive mode, the target slave station is the reconfiguration slave station in the partial self-adaptive mode, and the reconfiguration slave station needs to be subjected to a self-adaptive configuration process so as to re-determine configuration information of the reconfiguration slave station.
The system configuration information is set and obtained when the main station leaves a factory for the first time, or is manually set and obtained by maintenance personnel after the main station leaves the factory for the first time. In practical application, the system configuration information may include serial port setting information such as baud rate of the master station, check mode and the like, system adaptive mode, total substation number, substation type code, substation adaptive mode, number of substations and the like.
The system adaptive mode can be divided into a full adaptive mode, a partial adaptive mode and a normal starting mode. The substation adaptive mode can be divided into a full adaptive mode, a partial adaptive mode and a normal startup mode, and each substation configures its own substation adaptive mode. For example, the system adaptive mode is a fully adaptive mode, and the substation adaptive modes of all the substations are fully adaptive modes, all the substations need to perform an adaptive configuration process; if the system self-adaptive mode is a partial self-adaptive mode and the substation self-adaptive mode of a partial substation (a reconfiguration substation) is a partial self-adaptive mode, the partial substation needs to perform a self-adaptive configuration process; if the self-adaptive mode of the system is a normal starting mode and the self-adaptive modes of all the substations are normal starting modes, all the substations can be directly started without a self-adaptive configuration process, and the normal starting mode can be adopted for the condition that the system is not started for the first time and the slave stations are not reconfigured.
In one application, the underwater portion of an underwater robotic system includes a master station and a plurality of sub-stations, such as a powered propulsion system, a pan and tilt control system, a navigational positioning system, a light control system, an MVPE multi-function valve bank control system, and the like. Each seed station corresponds to a seed station type code, one or more seed stations can be configured according to functional requirements, the seed stations can be identified by the number of the sub-stations, and the sum of the number of all the sub-stations is identified by the total number of the sub-stations.
After the system configuration information is set, the system configuration information can be stored in a storage module of a main controller of the main station, when the main station is powered on and started, the system configuration information is read from the storage module, the self-adaptive mode is determined according to the system configuration information, and self-adaptive configuration is carried out according to the self-adaptive mode. The storage module is, for example, a FLASH module, and even if the system is powered off, data stored in the FLASH module cannot be lost.
S3210: sending configuration requests to all the slave stations to enable all the slave stations to carry out self-adaptive configuration to obtain configuration information;
s3211: receiving configuration responses including configuration information sent by each slave station;
s3212: confirming configuration information with all slave stations; then, step S33 is executed;
in the full-adaptive mode, a master station sends configuration requests to all slave stations, each slave station receives the configuration requests to perform adaptive configuration, each slave station obtains respective configuration information after the adaptive configuration is completed, and each slave station sends configuration responses comprising the configuration information to the master station.
And after receiving the configuration responses of all the slave stations, the master station sends configuration confirmation responses to all the slave stations so as to confirm the configuration information of all the slave stations. Under the full-adaptive mode, the self-adaptive configuration process of the master station to all the slave stations can be realized.
S3220: sending a configuration request to a reconfiguration slave station to enable the reconfiguration slave station to carry out self-adaptive configuration to obtain configuration information;
s3221: receiving a configuration response including configuration information sent by the reconfiguration slave station;
s3222: confirming the configuration information with the reconfiguration slave station; then, step S33 is executed;
in a partial adaptive mode, the master station sends a configuration request to the reconfiguration slave station, the reconfiguration slave station receives the configuration request and performs adaptive configuration, after the adaptive configuration is completed, the reconfiguration slave station obtains reconfigured configuration information, and then the reconfiguration slave station sends a configuration response comprising the configuration information to the master station. Since the partial adaptive mode only needs to adaptively configure the reconfigured secondary stations, and does not need to adaptively configure all the secondary stations, the system starting efficiency can be improved.
And after receiving the configuration response of the reconfiguration slave station, the master station sends a configuration confirmation response to the reconfiguration slave station so as to confirm the configuration information of the master station and the reconfiguration slave station.
S33: handshaking with all slave stations;
s34: and (5) successfully initializing and starting normal operation.
After the master station and the slave stations (the full-adaptation mode is all the slave stations, and the partial-adaptation mode is the reconfiguration slave stations) confirm the corresponding configuration information, handshaking is carried out between the master station and all the slave stations, and after the handshaking is completed, the system is initialized successfully, and normal work is started.
In one application, the normal start-up mode may be employed in the event that the system is not first started and there is no reconfiguration of the slave station. In this case, the adaptive mode is determined according to the system configuration information, if the adaptive mode is the normal start mode, each slave station does not need to perform the adaptive configuration process, the master station and each slave station perform handshake, and after the handshake is completed, initialization is completed, and normal operation can be started. In the first starting process of the system, each slave station determines respective configuration information through a self-adaptive configuration process, and the slave stations are not reconfigured, so that in a normal starting mode, the master station and each slave station can start normal work only by confirming the normal state of each slave station through handshaking, the starting time can be shortened, and the starting efficiency of the system is improved.
The handshake between the master station and the slave station means that the master station sends a handshake request to the slave station, and the slave station sends a handshake response to the master station after receiving the handshake request. If the master station does not receive the handshake response or response abnormity sent by the slave station, the system starts alarm prompt if the slave station is considered to be abnormal.
Fig. 4 is a flowchart illustrating a fully adaptive mode method according to an embodiment of the invention. As shown, for the fully adaptive mode, the start-up procedure of the system is:
s40: powering up a master station;
s41: the master station reads system configuration information;
s42: determining a full self-adaptive mode according to system configuration information;
s43: according to the system configuration information, the master station performs configuration;
for the fully adaptive mode, in the process of starting the system for the first time, the master station needs to be configured according to system configuration information, and the configuration comprises configuration of the baud rate of the master station, a verification mode, configuration of the type of the slave station, the total number of the slave stations, the number of the substations and the like. And after the master station completes configuration according to the system configuration information, the master station restarts in power failure, and after the master station restarts, the master station sends configuration requests to all the slave stations so as to enable all the slave stations to carry out self-adaptive configuration.
S44: sending configuration requests to all the slave stations to enable all the slave stations to carry out self-adaptive configuration to obtain configuration information;
in one case, the configuration information of the secondary station includes information such as an address and a baud rate. The configuration request sent by the master station to the slave station is divided into an address configuration request and a baud rate configuration request. The master station sends an address configuration request to the slave station, and the slave station configures an address according to the received address configuration request; the master station sends a baud rate configuration request to the slave station, and the slave station configures the baud rate in a self-adaptive mode according to the received baud rate configuration request.
In one embodiment, the address of the slave station comprises a main address and a sub-address, wherein the main address is the number of the slave station, and the sub-address is a random number.
Fig. 5 is a networking topology diagram of an embodiment of the present invention. As shown in the figure, in a specific embodiment, the underwater robot system includes five slave stations, the master station is connected to the five slave stations through 485 serial buses, the five slave stations are respectively a power propulsion system, a pan-tilt control system, an mvpe (multi-valve) multi-valve set control system (for controlling a hydraulic system of the underwater robot to realize robot operation driving), a navigation positioning system, and a light control system, and addresses of the five slave stations are as shown in the following table:
name of slave station Slave station master address Slave station address
Power propulsion system 1 Random number between 1 and 8
Cloud platform control system 2 Random number between 1 and 8
MVPE valve group control system 3 Random number between 1 and 8
Navigation positioning system 4 Random number between 1 and 8
Lamp control system 5 Random number between 1 and 8
TABLE 1 Address planning scheme for five Slave stations
In this embodiment, the format of the data request and response is defined as follows:
1) baud rate configuration request: 33333333333333
2) An address configuration request: slave station master address 5555 frame length CRC check code
3) And address configuration response: CRC (cyclic redundancy check) code for length of frame of slave station master address and slave station slave address 6666
4) Address acknowledgement response: 8888 frame length CRC check code of slave station master address and slave station slave address
5) Handshake request: slave station master address and slave station slave address 999999 frame length CRC check code
6) Handshake response: slave station main address and slave station sub address AA AA AA frame length CRC check code
7) Random address generation request: slave station master address 3535 frame length CRC check code
8) And (3) maintenance request: 39393939393939
The CRC check code in the request and response may be used to check the corresponding request and response. The CPC check procedure is not described in detail.
S45: receiving configuration responses including configuration information sent by each slave station;
s46: sending confirmation responses to all the slave stations;
s47: the master station sends handshake requests to all the slave stations;
s48: after receiving handshake responses sent by all slave stations, the system is initialized and starts to work normally.
In this embodiment, after all the slave stations have configured baud rates and addresses in a self-adaptive manner, the master station performs handshake with all the slave stations, the master station sends a handshake request to the slave stations, and the slave stations send handshake responses to the master station after receiving the handshake request. If the master station does not receive the handshake response or response abnormity sent by the slave station, the system starts alarm prompt if the slave station is considered to be abnormal.
FIG. 6 is a flowchart illustrating a partial adaptive mode method according to an embodiment of the present invention. As shown in the figure, in the embodiment of the present invention, if part of the slave stations need to be reconfigured, for example, operations such as replacement, maintenance, and upgrade need to be performed on existing slave stations, or a new slave station is added, for the reconfigured slave station, adaptive configuration is performed in a partial adaptive mode, where the method includes:
s60: powering up a master station;
s61: the master station reads system configuration information;
s62: determining a partial self-adaptive mode according to system configuration information;
s63: determining a reconfiguration slave station according to the system configuration information;
s64: sending maintenance requests to all slave stations;
in a partial self-adaptive mode, the master station determines which slave stations belong to the reconfiguration slave stations according to system configuration information and need to perform self-adaptive configuration, then, the master station sends maintenance requests to all the slave stations for multiple times according to a preset time interval, after all the slave stations receive the maintenance requests, the reconfiguration slave stations send maintenance responses to the master station, and the non-reconfiguration slave stations do not send maintenance responses.
S65: sending a configuration request to a reconfiguration slave station to enable the reconfiguration slave station to carry out self-adaptive configuration to obtain configuration information;
s66: receiving a configuration response including configuration information sent by the reconfiguration slave station;
s67: sending an acknowledgement response to the reconfiguration slave station;
s68: sending handshake requests to all slave stations;
s69: after receiving handshake responses sent by all slave stations, the system is initialized and starts to work normally.
In a partial self-adaptive mode, only the reconfiguration slave station needs to perform self-adaptive configuration in the system starting process, so that the reconfiguration slave station can be ensured to normally work after being accessed into the system through the self-adaptive configuration, the system starting efficiency can be improved, and the later maintenance is very convenient and flexible.
Fig. 7 is a flowchart illustrating an adaptive configuration method applied to a secondary station according to an embodiment of the present invention. As shown in the figure, the adaptive configuration method of the secondary station comprises the following steps:
s70: receiving a configuration request sent by a master station;
s71: carrying out self-adaptive configuration to obtain configuration information;
s72: sending a configuration response including configuration information to the master station;
s73: and confirming the configuration information with the master station.
The configuration request sent by the main station comprises at least one of an address configuration request and a baud rate configuration request. Wherein,
as shown in fig. 8, the receiving, by the slave station, the baud rate configuration request sent by the master station, adaptively configuring the baud rate, including:
s80: setting different baud rates in turn according to a set time interval;
s81: receiving a baud rate configuration request, and verifying the baud rate configuration request;
s82: if the verification is passed; stopping alternately setting the baud rate, and taking the currently set baud rate as the configured baud rate.
In this embodiment, the slave station sets 9600, 19200, 38400 three different baud rates in turn according to a set time interval; when a baud rate configuration request sent by the master station is received, the baud rate configuration request is verified according to a CRC (cyclic redundancy check) address check code in the baud rate configuration request, if the baud rate configuration request passes the verification, the baud rate configuration request is analyzed according to the data format shown in the step 1), when two continuous 33 baud rates are received, the slave station stops alternately setting the baud rate, and when the complete baud rate configuration request is received, the currently set baud rate is used as the baud rate of the self-adaptive configuration. And after the configuration of the baud rate is finished, the baud rate is stored in the storage module, when the system is started next time, if the system is in a normal starting mode, the baud rate is directly read from the storage module, and the master station and the slave station perform data transmission according to the configured baud rate.
As shown in fig. 9, the receiving, by the slave station, the address configuration request sent by the master station, adaptively configuring an address, includes:
s90: receiving an address configuration request, and checking the address configuration request;
s91: if the verification is passed, randomly generating a sub-address;
s92: an address configuration response including the sub-address is sent to the master station.
In this embodiment, after receiving the address configuration request sent by the master station, the slave station checks the address configuration request according to the CRC address check code therein, and if the check is passed, the slave station randomly generates a sub-address, and then sends an address configuration response including the sub-address to the master station.
If the master station receives the address configuration response and the address configuration response is correct, the master station stores the slave station and the corresponding configuration address thereof according to the received address configuration response; if the master station does not receive the address configuration response or the received address configuration response is abnormal, for example, the CRC check fails, the master station continues to send an address random generation request to the slave station, and the address adaptive configuration method of the slave station further includes:
receiving an address random generation request, and verifying the address random generation request; then, the above steps S91, 92 are performed, that is, if the check is passed, the sub-address is randomly generated, and then an address configuration response including the sub-address is sent to the master station.
The master station receives the address configuration response sent by each slave station, judges whether a conflict address exists according to the address configured by each slave station, if the address conflict slave station exists, the master station sends an address regeneration request to the address conflict slave station, the slave station receiving the address regeneration instruction reconfigures each sub-address, then the sub-addresses generated by reconfiguration are sent to the master station in the address configuration response, and the master station configures a flag bit for each slave station with the completed address configuration.
In one embodiment, the data format of the address regeneration request sent by the primary station is: and the slave sub-address conflict of the slave main address identifies the slave sub-address optional by the slave sub-address of the address conflict to adapt the zone bit. For example:
the address regeneration request sent by the master station is as follows: 01000809070B 0D 0E 02555555
Wherein, the slave station master address is 01; the address conflict mark is 00; the slave station addresses with the address conflict are 08, 09 and 07; the optional slave station sub-address is 0B 0D 0E 02, that is, the sub-address generated by the re-adaptation can be any one of 0B 0D 0E 02; the re-adaptation flag is 555555.
The self-adaptive configuration method of the underwater robot system provided by the embodiment of the invention can also realize the reset control of the slave station, and the reset control is divided into the following two types:
(1) the master station receives a reset instruction sent by the monitoring station on the water, and controls the slave station to reset according to the reset instruction.
As shown in fig. 1, the monitoring station sends a reset instruction to the master station, the master station sends reset instructions to all the slave stations, and each slave station performs reset restart after receiving the reset instruction.
(2) Self-reset of slave station
In the operation process of the substation, when the main controller of the substation judges that the self-reset condition is met, the substation can carry out self-reset. Wherein the self-resetting conditions are: the current fault or abnormal triggering condition of the substation automatically disappears, and meanwhile, the substation is judged not to influence the normal operation of the system due to self-reset. The substation can be ensured to operate in a normal state through self-resetting, and the normal operation of the whole system is not influenced.
Fig. 10 is a block diagram of an apparatus according to an embodiment of the present invention. As shown in the drawings, the adaptive configuration device of the underwater robot system provided in the embodiment of the present invention is configured at a master station, and includes:
the mode determining module is used for determining an adaptive mode according to the system configuration information;
the slave station determining module is used for determining a target slave station according to the self-adaptive mode;
the first data sending module is used for sending a configuration request to the target slave station so as to enable the target slave station to carry out self-adaptive configuration and obtain configuration information;
the first data receiving module is used for receiving a configuration response which is sent by the target slave station and comprises configuration information;
and the first confirmation module is used for confirming the configuration information with the target slave station to complete the self-adaptive configuration.
Fig. 11 is a block diagram of an apparatus according to another embodiment of the present invention. As shown in the drawings, the adaptive configuration device of the underwater robot system provided in the embodiment of the present invention is configured at a slave station, and includes:
the second data receiving module is used for receiving the configuration request sent by the master station;
the configuration module is used for carrying out self-adaptive configuration to obtain configuration information;
the second data sending module is used for sending a configuration response comprising configuration information to the master station;
and the second confirmation module is used for confirming the configuration information with the master station.
Wherein the configuration request comprises at least one of a baud rate configuration request and an address configuration request.
When the baud rate is configured in a self-adaptive mode, the self-adaptive configuration device of the underwater robot system further comprises
The second data receiving module is used for receiving a baud rate configuration request;
the verifying module is used for verifying the baud rate configuration request;
the baud rate setting module is used for alternately setting different baud rates according to a set time interval; and if the baud rate configuration request passes the verification, stopping alternately setting the baud rate, and taking the currently set baud rate as the configured baud rate.
When the address is configured in a self-adaptive manner, the self-adaptive configuration device of the underwater robot system further comprises:
the second data receiving module is used for receiving an address configuration request;
the verification module is used for verifying the address configuration request;
the address setting module is used for randomly generating a sub-address if the address configuration request passes the verification;
and the second data sending module is used for sending a configuration response comprising the sub-address to the main station.
The apparatus of the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
The apparatus of the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the invention, also features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity.
In addition, well known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures for simplicity of illustration and discussion, and so as not to obscure the invention. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the invention, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the present invention is to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the invention, it should be apparent to one skilled in the art that the invention can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The embodiments of the invention are intended to embrace all such alternatives, modifications and variances that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements and the like that may be made without departing from the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (14)

1. An underwater robot system self-adaptive configuration method is applied to a master station and is characterized by comprising the following steps:
determining a self-adaptive mode according to system configuration information;
determining a target slave station according to the self-adaptive mode;
sending a baud rate configuration request and/or an address configuration request to the target slave station, so that the target slave station stops setting different baud rates in turn according to a preset time interval according to the baud rate configuration request, and uses the currently set baud rate as a configured baud rate, and/or randomly generates a sub-address according to the address configuration request;
receiving a configuration response including the configured baud rate and/or the sub-address sent by the target slave station;
confirming said configured baud rate and/or said sub-address with said target slave station.
2. The method of claim 1, wherein the system configuration information comprises a system adaptation mode, a secondary station adaptation mode and a total number of secondary stations, and wherein the target secondary station is all secondary stations when the system adaptation mode is a fully adaptive mode and the secondary station adaptation modes of all secondary stations are fully adaptive modes.
3. The method of claim 2, wherein the system adaptation mode is a partially adaptive mode, wherein the secondary station adaptation mode of a reconfigured secondary station is a partially adaptive mode, wherein the target secondary station is the reconfigured secondary station, and wherein the reconfigured secondary station comprises a newly added secondary station and/or an existing secondary station to be reconfigured.
4. The method of claim 2, wherein the system adaptation mode is a normal start mode, wherein the secondary station adaptation modes of all secondary stations are normal start modes, and wherein all secondary stations start directly.
5. The method of claim 1, wherein after receiving the configuration response including the sub-address sent by the target slave station, further comprising:
judging whether address conflict exists according to the addresses of the target slave stations;
if the address conflict exists, sending an address regeneration request to the slave station with the address conflict;
and receiving a configuration response which is sent by the slave station with the address conflict and comprises the reconfigured generated sub-address.
6. The method of claim 1, wherein after confirming the configured baud rate and/or the sub-address with the target secondary station, further comprising:
handshaking with all slave stations;
the handshake is completed and the initialization is successful.
7. The method of claim 3, wherein the target secondary station is the reconfiguration secondary station, and wherein after determining the target secondary station, the method further comprises:
sending maintenance requests to all slave stations;
and receiving the maintenance response sent by the reconfiguration slave station.
8. The method of claim 1, further comprising:
receiving a reset instruction sent by a monitoring station on the water;
and controlling the slave station to reset according to the reset instruction.
9. An adaptive configuration method of an underwater robot system is applied to a slave station, and is characterized by comprising the following steps:
receiving a baud rate configuration request and/or an address configuration request sent by a master station;
according to the baud rate configuration request, stopping alternately setting different baud rates according to a preset time interval, and taking the currently set baud rate as the configured baud rate; and/or the presence of a gas in the gas,
randomly generating a sub-address according to the address configuration request;
sending a configuration response to the primary station comprising the configured baud rate and/or the sub-address;
confirming the configured baud rate and/or the sub-address with the master station.
10. The method of claim 9, wherein the address of the secondary station comprises a primary address and the secondary address, and wherein the primary address is a number of the secondary station.
11. The method of claim 9, wherein stopping alternately setting different baud rates at predetermined time intervals according to the baud rate configuration request, and using the currently set baud rate as the configured baud rate, comprises:
setting three baud rates of 9600, 19200 and 38400 in turn according to the time interval;
according to the baud rate configuration request, stopping alternately setting different baud rates according to a preset time interval, and taking the currently set baud rate as the configured baud rate, wherein the baud rate configuration request comprises the following steps:
verifying the baud rate configuration request according to an address verification code in the baud rate configuration request;
if the verification is passed, analyzing the baud rate configuration request, and stopping alternately setting the baud rate when a preset character is obtained through analysis;
and when the complete baud rate configuration request is obtained through analysis, taking the currently set baud rate as the configured baud rate.
12. The method of claim 9, further comprising:
when the self-reset condition is met, self-reset is carried out; wherein the self-resetting condition is: the current fault or abnormal triggering condition of the slave station automatically disappears, and meanwhile, the self-reset of the slave station is judged not to influence the normal operation of the system.
13. An underwater robot system adaptive configuration device, comprising:
the mode determining module is used for determining an adaptive mode according to the system configuration information;
the slave station determining module is used for determining a target slave station according to the self-adaptive mode;
the first data sending module is used for sending a baud rate configuration request and/or an address configuration request to the target slave station so that the target slave station stops setting different baud rates in turn according to a preset time interval according to the baud rate configuration request, the currently set baud rate is used as the configured baud rate, and/or a sub-address is randomly generated according to the address configuration request;
a first data receiving module, configured to receive a configuration response including the configured baud rate and/or the sub-address sent by the target slave station;
and the first confirmation module is used for confirming the configured baud rate and/or the sub-address with the target slave station.
14. An underwater robot system adaptive configuration device, comprising:
the second data receiving module is used for receiving a baud rate configuration request and/or an address configuration request sent by the master station;
the configuration module is used for stopping alternately setting different baud rates according to a preset time interval according to the baud rate configuration request and taking the currently set baud rate as the configured baud rate; and/or randomly generating a sub-address according to the address configuration request;
a second data sending module, configured to send a configuration response including the configured baud rate and/or the sub-address to the master station;
and the second confirmation module is used for confirming the configured baud rate and/or the sub-address with the main station.
CN201910922000.XA 2019-09-27 2019-09-27 Adaptive configuration method and device for underwater robot system Active CN110677334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910922000.XA CN110677334B (en) 2019-09-27 2019-09-27 Adaptive configuration method and device for underwater robot system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910922000.XA CN110677334B (en) 2019-09-27 2019-09-27 Adaptive configuration method and device for underwater robot system

Publications (2)

Publication Number Publication Date
CN110677334A CN110677334A (en) 2020-01-10
CN110677334B true CN110677334B (en) 2021-08-24

Family

ID=69079743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910922000.XA Active CN110677334B (en) 2019-09-27 2019-09-27 Adaptive configuration method and device for underwater robot system

Country Status (1)

Country Link
CN (1) CN110677334B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102566517A (en) * 2010-12-15 2012-07-11 上海电科电器科技有限公司 Detection method capable of automatically identifying state of controlled equipment through photovoltaic data collector
CN106130856A (en) * 2016-08-17 2016-11-16 天津市英贝特航天科技有限公司 A kind of self adaptation baud rate RS485 communications protocol
CN109361585A (en) * 2018-12-22 2019-02-19 沈阳阿尔特科技发展有限公司 A kind of method that child node baud rate and address is arranged in host node automatically

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI516059B (en) * 2013-05-09 2016-01-01 緯創資通股份有限公司 Setup method and system for client and server environment
CN106788907A (en) * 2017-03-24 2017-05-31 湖南浩奇通讯技术有限公司 Master-salve station communication baud rate Auto-matching
CN108768995B (en) * 2018-05-22 2021-06-08 广东电网有限责任公司电力调度控制中心 Substation self-adaptive master station access method
CN109684155B (en) * 2018-08-27 2022-11-15 平安科技(深圳)有限公司 Monitoring configuration method, device, equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102566517A (en) * 2010-12-15 2012-07-11 上海电科电器科技有限公司 Detection method capable of automatically identifying state of controlled equipment through photovoltaic data collector
CN106130856A (en) * 2016-08-17 2016-11-16 天津市英贝特航天科技有限公司 A kind of self adaptation baud rate RS485 communications protocol
CN109361585A (en) * 2018-12-22 2019-02-19 沈阳阿尔特科技发展有限公司 A kind of method that child node baud rate and address is arranged in host node automatically

Also Published As

Publication number Publication date
CN110677334A (en) 2020-01-10

Similar Documents

Publication Publication Date Title
TWI772963B (en) Master-slave communication system, slave position recognition method and power bank rental device
CN109654666B (en) Method, device and equipment for debugging unit
US7912558B2 (en) PLC for distributed control and distributed control system
JP2010186795A (en) Photoelectric cell device and method for determining failure
US9693174B2 (en) Wireless device, wireless communication system, wireless module, interface module, and communication method
CN102722420A (en) Self-diagnosis terminal, detection method and remote maintenance system
CN101820359B (en) Fault processing method and equipment for network equipment
CN105140886A (en) Protective relaying system and method for gathering data using thereof
CN106547645A (en) Automatically the method and server system of image shelves are repaired
CN110677334B (en) Adaptive configuration method and device for underwater robot system
CN104158714B (en) The main equipment of Process FieldbusROFIBUS distribution ancillary equipment
JP2005354626A (en) Method for making redundant and switching multi-hop data transfer path, and network system
CN110809002A (en) Method for protocol conversion between robot and welding equipment and protocol conversion module
JP2009019780A (en) Electrical equipment, service method of electrical equipment
CN106954064A (en) Monitor the Fault Locating Method and system of cloud platform
CN116185429B (en) Firmware upgrading method, device, receiving terminal equipment and storage medium
JP4401207B2 (en) Identification information setting method, identification information setting device, and connector device with control function
CN111247494A (en) Control method and device for movable platform and movable platform
CN112650099A (en) Control method and control system of battery monitoring platform
JP2006295585A (en) Communication terminal device address setting method and communication terminal device inspection device using the same
JP2020141192A (en) Disaster prevention wireless cooperation device management system, method, and program
CN117013609B (en) Power grid black start system and power grid black start method based on offshore direct current transmission
JPH0265416A (en) Standby line connection device for station monitoring system
CN111123780B (en) Number configuration method and device, electronic equipment and storage medium
CN119104889A (en) Motor diagnosis method, device, motor diagnosis equipment and motor diagnosis system

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