WO2021093540A1 - 主从通信系统、从机位置识别方法和移动电源的租借装置 - Google Patents

主从通信系统、从机位置识别方法和移动电源的租借装置 Download PDF

Info

Publication number
WO2021093540A1
WO2021093540A1 PCT/CN2020/122831 CN2020122831W WO2021093540A1 WO 2021093540 A1 WO2021093540 A1 WO 2021093540A1 CN 2020122831 W CN2020122831 W CN 2020122831W WO 2021093540 A1 WO2021093540 A1 WO 2021093540A1
Authority
WO
WIPO (PCT)
Prior art keywords
slave
master
information
slaves
host
Prior art date
Application number
PCT/CN2020/122831
Other languages
English (en)
French (fr)
Inventor
梁凯
杨光成
王朝辉
Original Assignee
深圳竹芒科技股份有限公司
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 深圳竹芒科技股份有限公司 filed Critical 深圳竹芒科技股份有限公司
Publication of WO2021093540A1 publication Critical patent/WO2021093540A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F17/00Coin-freed apparatus for hiring articles; Coin-freed facilities or services
    • G07F17/0042Coin-freed apparatus for hiring articles; Coin-freed facilities or services for hiring of objects
    • 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
    • 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/403Bus networks with centralised control, e.g. polling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults

Definitions

  • This application relates to communication technology, in particular, to a method for identifying the position of a slave device of a master-slave communication system and a device for renting a mobile power supply.
  • the master and several slaves perform data transmission through a communication bus.
  • the master and slave need to communicate in a question-and-answer manner to avoid bus confusion, that is, slaves that have not received the host's request are not allowed to occupy the bus.
  • This communication method requires the master to know the location or address of the slave in advance.
  • the maintenance, installation and replacement of the master and slave are flexible and convenient, but after each installation, the master needs to manually enter the address of the corresponding slave again, which is not only cumbersome, but also And error-prone, not suitable for large-scale popularization.
  • the master-slave communication system includes a master and a plurality of slaves, each of the slaves includes a unique coded address, the plurality of slaves are connected to the master in parallel through a parallel line, and the master and the plurality of slaves are connected in parallel to the master.
  • the slaves are connected in series via a serial line headed by the master, wherein the slave that is directly serially connected to the master among the plurality of slaves is the first slave, and the method for identifying the position of the slave includes:
  • the first slave receives the position identification information sent by the master through the serial line, processes the position identification information and obtains its own position information relative to the master; each slave serially connected in sequence receives the previous slave through the serial line.
  • the machine processes and obtains its own position information relative to the master through the processed position identification information sent by the serial line; and the master communicates with each of the slave machines through the parallel line to obtain the coded address of each of the slave machines.
  • a master-slave communication system which includes a master and a plurality of slaves, each of the slaves includes a unique coded address, and the plurality of slaves are connected to all of them in parallel through parallel lines. Said master, and the master and the plurality of slaves are connected in series via a serial line led by the master, wherein the master-slave communication system is configured to execute the slave position identification method mentioned herein.
  • a host for the mobile power lending device is also provided.
  • the host is configured to be serially connected to the plurality of slaves of the mobile power lending device through a serial line in sequence, and the plurality of slaves are connected to the host in parallel through a parallel line, and each of the slaves is configured with A unique coded address
  • the master is configured to send the position identification information for the multiple slaves through a serial line, so that each slave can learn its position information relative to the master; in each of the slaves respectively After obtaining its location information, send address pairing information to each of the slaves through the parallel line; and receive the pairing success information sent by the slave from the parallel line, and extract the corresponding slave's information from the pairing success information.
  • Encoding address Encoding address.
  • a slave machine for a mobile power lending device which is configured with a unique coded address, and the slave machine is connected to the master of the mobile power lending device through a serial line and a parallel line respectively.
  • the serial line is set so that the slave is serially connected to the master and other slaves in sequence
  • the parallel line is set so that the slave can be connected to the master in parallel with other slaves
  • the slave is configured to: receive location identification information through a serial line, process the location identification information and obtain its own location information relative to the host; receive the address pairing information sent by the host through a parallel line and process it to Extract the location information from it; in the case that the extracted location information matches its own location information relative to the host, process the address pairing information to form pairing success information containing the encoded address, and pass the The parallel line sends the pairing success information to the host.
  • the master-slave communication system includes a master and a plurality of slaves, each of the slaves includes a unique coded address, and the master and slaves are both It is connected in parallel via a communication bus, and connected in series via a serial bus with the master as the head; the method for identifying the position of the slave includes the steps:
  • the first slave machine processes and obtains its own position information relative to the master machine according to the position identification information sent by the master machine through the serial bus;
  • the next slave machine processes and obtains its own position information relative to the master machine according to the position identification information processed by the previous slave machine through the serial bus;
  • the host communicates with the slaves at each location through the communication bus, and obtains the coded address of the slave at the corresponding location.
  • the position information is the sequence of the slaves relative to the master.
  • the master communicates with the slaves in each position through the communication bus, and the steps of obtaining the coded address of the slave at the corresponding position include:
  • the host sends address pairing information including location information through the communication bus, and the slave performs processing after receiving the address pairing information to extract the location information;
  • the slave machine processes the address pairing information that is the same as its own location information to form a pairing success message with a coded address, and sends it to the master through the communication bus;
  • the host obtains the coded address of the slave at the corresponding position according to the pairing success information.
  • the step of processing the address pairing information by the slave includes:
  • the slave After receiving the address pairing information, the slave performs processing to extract the location information
  • the slave compares the location information extracted from the address pairing information with the location information obtained from the location identification information, and if the preset address matching conditions are met, the address pairing information is processed;
  • a pairing success message with a coded address is formed, and the pairing success message is sent to the host through the communication bus.
  • the slave position identification method further includes the steps:
  • the master first sends notification information through the communication bus, and the slave waits to receive location identification information after receiving the notification information through the communication bus;
  • the master then sends the position identification information through the serial bus, and each slave performs processing after receiving the position identification information, and sends the processed position identification information to the next slave through the serial bus.
  • the slave position identification method further includes the steps:
  • the master sends notification information through the communication bus, and the slave waits to receive location identification information within a preset time after receiving the notification information through the communication bus;
  • the slave does not receive the position identification information within the preset time, it sends the failure feedback information through the communication bus;
  • the host acquires the number of slaves that have not received the location identification information or the slave's coded address according to the failure feedback information, and the host readjusts the location identification information to meet the corresponding number of slaves, and then sends the location identification information through the serial bus.
  • the master-slave communication system further includes a controllable switch connected in parallel with the transceiver end of the slave serial bus, and the control end of the controllable switch corresponds to The control pin of the slave is connected, the controllable switch is normally open under the control of the slave, and when the slave fails to work normally, the controllable switch is no longer controlled, and the controllable switch enters the normally closed state.
  • the master-slave communication system includes a master and a plurality of slaves, each of the slaves includes a unique coded address, and the master and slaves are connected in parallel through a communication bus , And are connected in series with the master as the head through the serial bus, wherein the master-slave communication system can realize the position identification method of the slave.
  • the master-slave communication system further includes a controllable switch connected in parallel with the transceiver end of the slave serial bus, and the control end of the controllable switch is connected to the control pin of the corresponding slave. Connected, the controllable switch is normally open under the control of the slave machine; wherein, when the slave machine cannot work normally, the controllable switch is no longer controlled, and the controllable switch enters the normally closed state.
  • the application also provides a mobile power lending device, which includes the master-slave communication system and a mobile power placed on the slave.
  • Figure 1 is a schematic diagram of the structure of a master-slave communication system
  • Fig. 2 is a schematic flowchart of a method for identifying the position of a slave according to an example of the present application
  • Fig. 3 is a schematic diagram of a specific flow of a method for identifying the position of a slave according to an example of the present application
  • Fig. 4 is a schematic diagram of a process of processing address pairing information by a slave according to an example of the present application
  • Fig. 5 is a schematic flowchart of a method for identifying the position of a slave machine based on notification information according to an example of the present application
  • Figure 6 is a further schematic flow chart of Figure 5;
  • Fig. 7 is a schematic structural diagram of a master-slave communication system with controllable switches according to an example of the present application.
  • FIG. 1 is a schematic diagram of the structure of a master-slave communication system.
  • the master-slave communication system includes a master 110 and a plurality of slaves 120.
  • Each of the plurality of slave machines 120 is configured with a unique coded address.
  • Each slave 120 is connected to the master 110 in parallel through a parallel line 220.
  • the three slaves 120 illustrated in the figure are connected to the master 110 in a parallel connection manner, so that a communication line is constructed between the master 110 and each slave 120 respectively.
  • the master 110 and the plurality of slaves 120 are serially connected through the serial line 210 with the master 110 first, that is, the master 110 is the first node in the serial connection.
  • the slave that is directly serially connected to the host 110 is called the first slave.
  • FIG. 2 is a flowchart of a method for identifying a position of a slave device according to an example of the present application. The execution of the method for identifying a position of a slave device shown in FIG. 2 will be described below in conjunction with FIG.
  • the first slave of the plurality of slaves 120 receives the location identification information sent by the host 110 through the serial line 210, processes the location identification information, and obtains its own location information relative to the host.
  • the location identification information sent by the host 110 via the serial line 210 includes location information for multiple slaves.
  • Each slave machine connected in series receives the processed position identification information sent by the previous slave machine through the series line through the serial line 210, and processes and obtains its own position information relative to the master.
  • the slaves connected in series are the first slave as the head, including other slaves serially connected in sequence.
  • the previous slave is the slave that sends the position identification information of the current slave.
  • the previous slave is next to the current slave in the serial connection and received earlier The slave of the location identification information.
  • the previous slave is also referred to as the previous slave, and the current slave is relatively referred to as the next slave.
  • step S20 the master 110 communicates with each slave 120 through the parallel line 220 to obtain the coded address of each slave.
  • the coded address is the identification address of each slave.
  • the processing of location identification information by the slave refers to that the slave obtains its own location information relative to the host from the location identification information and deletes its own location information relative to the host from the location identification information (also It is called its own position information). Therefore, the processed position identification information will include the position information of each slave that has not received the position identification information, and no longer include the current position information of the slave itself.
  • the processing of position identification information by the slave means that the slave obtains its own position information relative to the master from the position identification information, and generates information for other slaves according to a preset related algorithm. location information.
  • the manner in which the slave machine processes the position identification information may also be in other forms, as long as each slave machine can have an identifiable position relative to the master machine.
  • the parallel line used for connecting multiple slaves to the master in parallel should only be able to realize the parallel communication between the master and each slave, and this application does not limit its specific implementation.
  • the serial line used for the serial connection of the master and each slave can also be implemented in various ways, as long as the serial connection from the master to the slaves can be realized.
  • the serial interface of the master and the slave are connected in order to realize the serial connection and so on.
  • a serial line for realizing serial connection is called a serial bus
  • a parallel line for realizing parallel connection is called a communication bus.
  • the master-slave communication system includes a master 110 and a plurality of slaves 120. Each of the slaves 120 includes a unique coded address.
  • the master 110 and the slaves The 120 are all connected in parallel through the communication bus 220, and are connected in series with the host 110 as the head through the serial bus 210.
  • a host 110 and a plurality of slaves 120 that cooperate with the host 110 are provided.
  • the host 110 includes a first host pin 111 with a sending function and a second host pin 112 with an information communication function.
  • the slave 120 includes a first slave pin 121 with a receiving function and a second slave with a sending function.
  • the pin 122 and the third slave pin 123 with information communication function wherein the master 110 is connected to the communication bus 220 through the second master pin 112, and the slave 120 is connected to the communication bus 220 through the third slave pin 123 , And, the host 110 is connected to the first slave pin 121 of the slave 120 through the first master pin 111 to realize serial communication.
  • the slave 120 is then connected to the first slave pin 121 of the next slave 120 through the second slave pin 122 to realize serial communication. Both the host 110 and the slave 120 realize "one question and one answer" communication through the communication bus 220. The master 110 and the slave 120 realize sequential serial communication led by the host 110 through the serial bus 210, and transmit the output signal of the host 110 to Each slave 120.
  • processing modules such as processors or processing circuits
  • corresponding processing modules are provided between the host 110 and the slave 120 to implement various functions.
  • the relevant functional operations of the host 110 and the slave 120 proposed in this example are implemented by their internal processing modules by default, and the relevant pins refer to the pins of the processing module.
  • the method for identifying the position of the slave machine includes the steps:
  • Step S10 The slave 120 sequentially receives and processes the position identification information sent from the host 110 through the serial bus 210, and obtains its own position information relative to the host 110;
  • Step S20 The host 110 communicates with the slave 120 at each location through the communication bus 220, and obtains the coded address of the slave 120 at the corresponding location.
  • the position identification information of the master 110 is sequentially sent to the slaves 120 through the serial bus 210, and different position information is obtained according to the receiving order of the slaves 120, so as to obtain the position information of the master 110 relative to the master 110. And, on the basis that each slave 120 knows its own position information, the communication bus 220 is used for address recognition communication, and the coded address corresponding to the slave 120 at each position is obtained, so as to realize that the information of the slave 120 is not known. On the basis of, intelligently obtain the coded address of the slave 120 at each position.
  • the location information is the sequence of each slave relative to the master.
  • step S11 the master 110 sends the position identification information through the serial bus 210, and each slave 120 processes the position identification information after receiving the position identification information, and sends the processed position identification information to the next slave 120 through the serial bus 210.
  • step S12 the slave 120 obtains its own position information relative to the master 110 from the position identification information.
  • step S21 the host 110 sends address pairing information including location information to each corresponding slave through the communication bus 220, and the slave 120 processes the address pairing information to extract the location information after receiving the address pairing information.
  • step S22 the slave 120 processes the address pairing information that is the same as its own location information to form pairing success information with a coded address, and sends the pairing success information to the host 110 through the communication bus 220.
  • the same as its own location information means that the location information contained in the address pairing information is the location information of the slave that has received the address pairing information.
  • Step S23 The host 110 obtains the coded address of the slave 120 at the corresponding position according to the pairing success information.
  • the slave 120 sends position identification information through the serial bus 210, and the position identification information should include the corresponding Position information, or after passing through the slave 120, provide new position information for the next slave 120.
  • the location identification information is a string of consecutive numbers, such as a string sorted from 1 to 9.
  • the slave 120 in the first location obtains the location identification information, it extracts the first number according to a preset algorithm, and then compares all The location identification information is modified, such as deleting the first character string to form new location identification information and sending it to the next slave 120.
  • Each slave 120 will obtain the corresponding location, that is, the location information relative to the location of the host 110.
  • the location identification information is a code
  • the first slave 120 receives the code first, and extracts the location information through a preset algorithm or database, and then the location information of the current slave 120 is considered to be "No. 1" through the code.
  • a preset algorithm or database to modify the code to another new position identification information that can be recognized by the slave 120 and represents "No. 2".
  • each slave 120 can obtain the corresponding position, that is, relative to Location information of the location of the host 110.
  • the communication bus 220 is used to realize the communication between the master 110 and the multiple slaves 120.
  • each slave 120 obtains its own position information relative to the master 110, and is paired by an address containing specific position information.
  • Information, the address corresponding to each location information is obtained, that is, the host 110 communicates with each slave 120 via the communication bus 220, so that the host 110 can obtain the coded address of the slave 120 at each location.
  • the host 110 implements control of the slave 120 corresponding to the encoded address according to the learned encoding address according to intelligent control or remote command control.
  • the master 110 can intelligently obtain the coded address of each slave 120 without knowing the coded address of the slave 120 in advance, thereby improving the flexibility of the structure of the master 110 and the slave 120. Accordingly, in the process of repair, installation and replacement, there is no need for the staff to enter the code address into the host 110 or the general system. Even if the staff changes the position of each slave 120 in the future, the corresponding code can be obtained in time. Address the location of the slave 120.
  • the slave 120 will process the address pairing information that is the same as its own location information by adding its own address to the address pairing information to form pairing success information.
  • the address pairing information is (1) AAA
  • the pairing success information is (1) (XXX) AAA, where (1) belongs to location information, (XXX) belongs to coded address, and AAA belongs to additional information.
  • the address pairing information is (1) AAA
  • the pairing success information is (1XXX) AAA or (1) AXAXAX.
  • the host 110 can encode the address through a specific algorithm. XXX is extracted to prevent signal interference and improve confidentiality performance.
  • both the serial bus 210 and the communication bus 220 can be implemented at high and low levels, which belong to the existing conventional technology of information transmission and will not be described one by one.
  • FIG. 4 is a flowchart of processing address pairing information by the slave 120 according to an example of the present application.
  • the slave 120 receives the address pairing information and performs processing to extract the location information.
  • the slave 120 compares the location information extracted from the address pairing information with the location information obtained from the location identification information, and if the preset address matching conditions are met, the address pairing information is processed.
  • a pairing success message with a coded address is formed, and the pairing success message is sent to the host 110 through the communication bus 220.
  • the slave 120 that has received the address pairing information compares the location information in the address pairing information with the location information obtained from the location identification information to determine whether it matches. This is to avoid misprocessing the address that is not for the slave. Pairing information. For example, if the address pairing information is sent to the slave 120 by the master 110, the slave 120 processes the pairing success information and feeds it back to the master 110. If the address pairing information is sent by the master 110 to the other slaves 120, The slave 120 does not perform processing.
  • the general processing method is to extract the location information of the address pairing information and compare it with the location information of the slave 120 itself. If it is the same, perform subsequent processing, otherwise, it will not be processed.
  • Fig. 5 is a flowchart of a method for identifying the position of a slave device based on notification information according to an example of the present application.
  • Fig. 6 is a further refinement of the method illustrated in Fig. 5.
  • step S31 the master 110 first sends notification information through the communication bus 220, and the slave 120 waits to receive location identification information after receiving the notification information through the communication bus 220; wherein the notification information is used to indicate each slave Waiting to receive location identification information.
  • step S32 the master 110 sends position identification information through the serial bus 210, and each slave 120 processes the position identification information after receiving the position identification information, and sends the processed position identification information to the next slave through the serial bus 210 120.
  • the process of step S32 has been described above in conjunction with various examples, and will not be repeated here.
  • the main function of the notification information is to prevent too many slaves 120.
  • the location identification information of the host 110 cannot enable all the slaves 120 to obtain their own location information, or due to an error in the middle, the location identification information is not transmitted to the corresponding slave 120 in time. in.
  • the host 110 first sends notification information through the communication bus 220 to notify all the slaves 120 connected to the communication bus 220 that the host 110 is about to perform the location information determination step, and the slave 120 enters the corresponding working mode and waits for receiving location identification information.
  • step S311 the host 110 sends notification information through the communication bus 220.
  • step S312 after receiving the notification information via the communication bus 220, the slave 120 waits for receiving location identification information within a preset time.
  • step S33 if the slave 120 does not receive the location identification information within the preset time, it sends feedback information indicating that the location identification information has failed to be received via the communication bus 220.
  • step S34 the host 110 obtains the number of slaves 120 that have not received the location identification information or the coded address of the slaves 120 according to the feedback information indicating that the location identification information has not been received, and the host 110 readjusts the location identification information to make all current
  • the slave 120 can obtain the position information from the position identification information, and send the adjusted position identification information through the serial bus 210 again.
  • the slave 120 when a certain slave 120 does not receive position identification information within a specified time, it can be considered that the slave 120 cannot obtain its own position information, and the slave 120 feeds back to the master 110, that is, the slave 120 sends the position indication through the communication bus 220 Identifies the feedback message that the message has failed to be received.
  • the host 110 obtains the number of slaves 120 that have not received location identification information or the coded address of the slaves 120 according to the failure feedback information, and the host 110 readjusts the location identification information to meet the corresponding number of slaves 120, and sends the location identification again through the serial bus 210 information.
  • the content of the location identification information is intelligently adjusted so that different slaves 120 can obtain their own location information.
  • a master-slave communication system is also provided.
  • the master-slave communication system can be a slave or multiple slaves with a controllable switch connected in parallel with it, and the controllable switch is controlled by the slaves connected in parallel with it. Normally open under controlled conditions; and closed under uncontrolled conditions. The uncontrolled situation occurs when the slave machine connected in parallel with the controllable switch fails or powers off and the slave machine does not work normally.
  • the master-slave communication system includes a controllable switch 300 connected in parallel with the transceiver terminal of the serial bus 210 of the slave 120, and the control terminal of the controllable switch 300 is connected to the control pin of the corresponding slave 120.
  • the controllable switch 300 is normally open under the control of the slave 120, and no longer controls the controllable switch 300 when the slave 120 cannot work normally, and the controllable switch 300 enters the normally closed state.
  • the first slave pin 121 and the second slave pin 122 of each slave 120 are connected by a controllable switch 300, and the controllable switch 300 includes the first slave pin 121 and the second slave pin 121.
  • the switch 310 between the pins 122 of the machine and the controller 320 that controls the on or off of the switch 310.
  • the slave 120 also includes a fourth slave pin 124 that controls the operation of the controller 320.
  • the slave 120 passes through the fourth slave pin 124.
  • the machine pin 124 controls the controller 320 to control the switch 310 to be normally open. And, when the master-slave communication system is powered on, the controllable switch 300 is under the control of the slave 120 and enters the normally open.
  • controller 320 is also grounded to realize the effective transmission of the control signal of the fourth slave pin 124.
  • a rental device for mobile power is also provided.
  • the rental device for mobile power supply includes a master-slave communication system and a mobile power supply placed on the slave.
  • the host computer is controlled by intelligent control or remote command to realize the normal operation of the slave computer as a leased device.
  • the host of the mobile power rental device can be the host 110 described above in conjunction with each example, and the slave of the mobile power rental device includes one or more storage bins for accommodating mobile power, or batteries.
  • the slave 120 described above with reference to the examples can be implemented in the slave of the mobile power lending device. Therefore, the location identification method of the slave device described above in conjunction with the drawings can be realized in the loan device for the mobile power supply, and the slave device can be managed flexibly.
  • This application also provides a host for the mobile power rental device.
  • the host is configured as a plurality of slaves of the mobile power lending device, and the host is connected in series via a serial line in turn, and the plurality of slaves are connected to the host in parallel via a parallel line.
  • Each slave is configured with a unique coded address.
  • the host is implemented as the host 110 as described above in connection with the examples.
  • the host may include a processor and a memory for storing instructions, and the host is configured to execute the part executed by the host 120 in the slave location identification method described above with reference to the accompanying drawings when the instructions are executed by the processor. , To work with the slave machine.
  • the slave machine includes at least one accommodating bin for accommodating the mobile power supply and is configured with a unique coded address.
  • the slave is connected to the master of the mobile power supply lending device through a series line and a parallel line respectively.
  • the series line is arranged such that the slave is connected in series with the master and other slaves in sequence
  • the parallel line is arranged such that The slave can be connected to the master in parallel with other slaves.
  • the slave machine 120 may be the slave machine 120 described in conjunction with the examples of FIGS. 1 to 6.
  • the slave machine may include a processor and a memory for storing instructions. When the processor executes the instructions, the slave machine executes the steps performed by the slave machine 120 as described above with reference to the accompanying drawings, so as to facilitate the cooperation of the master machine. jobs.
  • the slave machine further includes a controllable switch connected in parallel with one or more of the plurality of slave machines, and the controllable switch is normally open under the control of the slave machine connected in parallel with it.
  • the slave machine connected in parallel is closed during control.
  • the slave is implemented as, for example, the slave 120 with a controllable switch described in conjunction with FIG. 7.
  • the example provided in this application allows the host to obtain the arrangement sequence of the slave relative to the host and the corresponding encoding address without the host needing to know the encoding address of the slave in advance, so as to facilitate the management of the device
  • identification improve the flexibility of the host and slave structure, in the process of repair, installation and replacement, there is no need for staff to enter the coded address into the host or the general system, and the staff will change the position of each slave , It can also get the position of the slave machine corresponding to the coded address in time; further, when the slave machine has a problem and cannot work normally, the position identification information ignores the slave machine and directly enters the next slave machine to realize the breakpoint transmission of communication. Improve the reliability of the system.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)
  • Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)
  • Radar Systems Or Details Thereof (AREA)

Abstract

本申请提供用于主从通信系统的从机位置识别方法。所述主从通信系统包括主机和多个从机,所述主机和从机均通过并行线路并联连接,且通过串联线路以主机为首串行连接;从机通过串联线路依次接收及处理从主机发送的位置识别信息,并获取自身相对于主机的位置信息;主机通过并行线路与各位置的从机进行通信,获取对应位置上从机的编码地址。

Description

主从通信系统、从机位置识别方法和移动电源的租借装置 技术领域
本申请涉及通信技术,具体地,涉及主从通信系统的从机位置识别方法和用于移动电源的租借装置。
背景技术
现有的主从通信系统中,主机和若干个从机通过通信总线来进行数据传输。
但是由于通用总线的特性,主从之间需采用一问一答的方式通信,以避免总线混乱,亦即,未收到主机请求的从机不允许占用总线。这种通信方式要求主机必须事先知道从机的位置或地址。
对主从结构而言,主机和从机修护、安装和更换灵活可变且方便,只是每次安装后,都需要以人工录入的方式重新让主机获取对应从机的地址,不仅操作繁琐,且容易出错,不适于大规模普及。
发明内容
本申请提供用于主从通信系统的从机位置识别方法。该主从通信系统包括主机和多个从机,每一所述从机均包括唯一的编码地址,所述多个从机通过并行线路并行连接至所述主机,且所述主机与所述多个从机以主机为首通过串联线路串行连接,其中,所述多个从机中直接与所述主机串行连接的从机为第一从机,所述从机位置识别方法包括:所述第一从机通过串联线路接收所述主机发送的位置识别信息,处理所述位置识别信息并获取自身相对于主机的位置信息;依次串行连接的各从机,分别通过串联线路接收前一从机通过串联线路发 送的处理后的位置识别信息,处理并获取自身相对于主机的位置信息;以及主机通过所述并行线路分别与各所述从机通信以获取各所述从机的编码地址。
根据本申请的另一方面,还提供主从通信系统,其包括主机和多个从机,每一所述从机均包括唯一的编码地址,所述多个从机通过并行线路并行连接至所述主机,且所述主机与所述多个从机以主机为首通过串联线路串行连接,其中,所述主从通信系统被配置为执行在此提到的从机位置识别方法。
根据本申请的再一方面,还提供用于移动电源租借装置的主机。该主机被构造为与所述移动电源租借装置的多个从机通过串联线路依次串行连接,并且所述多个从机通过并行线路并行连接至所述主机,各所述从机被配置有唯一的编码地址,所述主机被配置为通过串联线路发送用于所述多个从机的位置识别信息,以便各从机获知其相对于所述主机的位置信息;在各所述从机分别获知其位置信息后,通过并行线路向各所述从机发送地址配对信息;以及接收所述从机从所述并行线路发送的配对成功信息,并自所述配对成功信息中提取相应从机的编码地址。
根据本申请示例的另一方面,还提供用于移动电源租借装置的从机,其被配置有唯一的编码地址,所述从机分别通过串联线路和并行线路与所述移动电源租借装置的主机连接,所述串联线路设置为使得所述从机与所述主机和其它从机依次串联,所述并行线路设置为使得所述从机能以与其它从机并行的方式连接到所述主机,其特征在于,所述从机被配置为:通过串联线路接收位置识别信息,处理所述位置识别信息并获取自身相对于主机的位置信息;通过并行线路接收所述主机发送的地址配对信息并处理以自其中提取所述位置信息;在所提取的位置信息与自身相对于所述主机的位置信息匹配的情况下,对所述地址配对信息进行处理以形成包含编码地址的配对成功信息,并通过所述并行线 路将所述配对成功信息发送至所述主机。
本申请提供一种主从通讯系统的从机位置识别方法,所述主从通讯系统包括主机和多个从机,每一所述从机均包括唯一的编码地址,所述主机和从机均通过通讯总线并联连接,且通过串联总线以主机为首串联连接;所述从机位置识别方法包括步骤:
第一个从机根据通过串联总线接收主机发送的位置识别信息,处理并获取自身相对于主机的位置信息;
下一个从机根据通过串联总线接收上一个从机处理后的位置识别信息,处理并获取自身相对于主机的位置信息;
主机通过通讯总线与各位置的从机进行通讯,获取对应位置上从机的编码地址。
根据该主从通讯系统的从机位置识别方法,在一些示例中,所述位置信息是各从机相对于主机的先后排列顺序。
根据该主从通讯系统的从机位置识别方法,在一些示例中,主机通过通讯总线与各位置的从机进行通讯,获取对应位置上从机的编码地址的步骤包括:
主机通过通讯总线发送包含位置信息的地址配对信息,从机在接收到地址配对信息后进行处理以提取所述位置信息;
从机将与自身位置信息相同的地址配对信息进行处理,形成具有编码地址的配对成功信息,并通过通讯总线发送至主机;
主机根据配对成功信息获取对应位置上从机的编码地址。
根据该主从通讯系统的从机位置识别方法,在一些示例中,所述从机处理地址配对信息的步骤包括:
从机接收到地址配对信息后进行处理以提取所述位置信息;
从机将从地址配对信息提取的位置信息与从位置识别信息获取的位置信息进行比较,若符合预设地址匹配条件,对地址配对信息进行处理;
形成具有编码地址的配对成功信息,并通过通讯总线发送配对成功信息至主机。
根据该主从通讯系统的从机位置识别方法,在一些示例中,所述从机位置识别方法还包括步骤:
主机先通过通讯总线发送通知信息,从机通过通讯总线接收到通知信息后等待接收位置识别信息;
主机再通过串联总线发送位置识别信息,每一从机在接收到位置识别信息后进行处理,并将处理后的位置识别信息通过串联总线发送至下一个从机。
根据该主从通讯系统的从机位置识别方法,在一些示例中,所述从机位置识别方法还包括步骤:
主机通过通讯总线发送通知信息,从机通过通讯总线接收到通知信息后在预设时间内等待接收位置识别信息;
若从机在预设时间内没有接收到位置识别信息,通过通讯总线发送失败反馈信息;
主机根据失败反馈信息获取没有接收到位置识别信息的从机数量或从机编码地址,且主机重新调整位置识别信息以满足对应数量的从机,再通过串联总线发送位置识别信息。
根据该主从通讯系统的从机位置识别方法,在一些示例中,所述主从通讯系统还包括与从机串联总线的收发端并联的可控开关,所述可控开关的控制端与对应从机的控制引脚连接,所述可控开关在从机的控制下常开,且当从机不能正常工作时不再控制可控开关,可控开关进入常闭状态。
本申请还提供一种主从通讯系统,所述主从通讯系统包括主机和多个从机,每一所述从机均包括唯一的编码地址,所述主机和从机均通过通讯总线并联连接,且通过串联总线以主机为首串联连接,其中,所述主从通讯系统可实现所述的从机位置识别方法。
根据该主从通讯系统,在一些示例中,所述主从通讯系统还包括与从机串联总线的收发端并联的可控开关,所述可控开关的控制端与对应从机的控制引脚连接,所述可控开关在从机的控制下常开;其中,当从机不能正常工作时不再控制可控开关,可控开关进入常闭状态。
本申请还提供一种移动电源的租借装置,所述租借装置包括所述的主从通讯系统,以及放置在从机上的移动电源。
附图说明
下面将结合附图及实施例对本申请作进一步说明,附图中:
图1是一种主从通信系统的结构示意图;
图2是根据本申请示例的从机位置识别方法的流程示意图;
图3是根据本申请示例的从机位置识别方法的具体流程示意图;
图4是根据本申请示例的从机处理地址配对信息的流程示意图;
图5是根据本申请示例的基于通知信息的从机位置识别方法的流程示意图;
图6是图5进一步的流程示意图;
图7是根据本申请示例的带可控开关的主从通信系统的结构示意图。
具体实施方式
为使本申请的上述目的、特征和优点能够更加明显易懂,下文中将结合附图对本发明的具体实施方式做详细说明。下文所描述的各具体实施方式仅为示例,并非用以限制本发明。在不违背本发明精神的情况下,能够实现本申请实施例的各类修改、改进和变换均由本申请所附的权利要求书所涵盖。
在本申请中,术语“通信”有时也使用“通讯”。
图1是一种主从通信系统的结构示意图。如图所示,该主从通信系统包括主机110和多个从机120。多个从机120中的每一个都被配置有唯一的编码地址。各从机120通过并行线路220并行连接到主机110。例如,图中示例的三个从机120,彼此以并行连接的方式连接到主机110,从而在主机110与各从机120之间分别构建通信线路。此外,主机110与多个从机120以主机110位首通过串联线路210串行连接,也就是说,主机110是该串行连接中的第一个节点。在本申请的示例中,将与主机110直接串行连接的从机称呼为第一从机。
图2是根据本申请示例的从机位置识别方法的流程图,下文将结合图1阐述如图2所示的从机位置识别方法的执行。
在步骤S10,多个从机120中的第一从机通过串联线路210接收主机110发送的位置识别信息,处理该位置识别信息并获取自身相对于主机的位置信息。按照本申请的一些示例,主机110通过串联线路210所发送位置识别信息包括用于多个从机的位置信息。
依次串行连接的各从机,分别通过串联线路210接收前一从机通过串联线路发送的处理后的位置识别信息,处理并获取自身相对于主机的位置信息。依次串行连接的各从机是以第一从机为首,包括依次串行的其它从机。在各从机的串行连接中,前一从机是发送给当前从机位置识别信息的从机,按照本申请, 前一从机即串行连接中挨着当前从机且更早接收到位置识别信息的从机。在下文的一些示例中,也将前一从机称作上一个从机,相对地将当前从机称作下一个从机。
在步骤S20,主机110通过并行线路220分别与各从机120通信以获取各从机的编码地址。编码地址是各从机的识别地址。
根据本申请的一些示例,从机对位置识别信息进行处理指的是从机从位置识别信息中获取其自身相对于主机的位置信息并从位置识别信息中删除自身相对于主机的位置信息(也称作自身位置信息),由此,处理后的位置识别信息中将包括尚未收到位置识别信息的各从机的位置信息,而不再包括当前从机自身位置信息。根据本申请的又一些示例,从机对位置识别信息进行处理指的是从机从位置识别信息中获取其自身相对于主机的位置信息,并按照预设的相关算法产生用于其它从机的位置信息。从机对位置识别信息进行处理的方式还可以是其它形式,只要能够使得各从机具有可标识的相对于主机的位置即可。
在本申请中,用于多个从机并行连接到主机的并行线路只要能够实现主机与各从机的并行通信即可,本申请并不对其具体的实现进行限制。同样地,用于主机和各从机串行连接的串联线路也可采用各种实现方式,只要能够实现从主机开始到各从机的串行连接即可。举例来说,通过主机、从机的串行接口依次连接从而实现串行连接等。
下文将同时参照图1至图4阐述根据本申请的一种示例性的从机识别方法。在该示例性的描述中,示例而非限制地,用于实现串行连接的串联线路称作串联总线,用于实现并行连接的并行线路称作通信总线。
一种主从通信系统的从机位置识别方法,所述主从通信系统包括主机110和多个从机120,每一所述从机120均包括唯一的编码地址,所述主机110和 从机120均通过通信总线220并联连接,且通过串联总线210以主机110为首的串联连接。
按照本示例,设置了一个主机110及多个与主机110配合的从机120。主机110包括具有发送功能的第一主机引脚111和具有信息通讯功能的第二主机引脚112,从机120包括具有接收功能的第一从机引脚121、具有发送功能的第二从机引脚122和具有信息通讯功能的第三从机引脚123,其中,主机110通过第二主机引脚112接入通讯总线220,从机120通过第三从机引脚123接入通讯总线220,以及,主机110通过第一主机引脚111与从机120的第一从机引脚121连接,实现串联通信。从机120再通过第二从机引脚122与下一个从机120的第一从机引脚121连接,实现串联通信。主机110和从机120均通过通信总线220实现“一问一答”的通信,主机110和从机120通过串联总线210实现以主机110为首的依次串联通信,将主机110的输出信号依次传输至各从机120中。
其中,主机110和从机120之间均设有对应的处理模块(如处理器或处理电路),以实现各种功能。为了提高语言简洁性,本示例中提出的主机110和从机120的相关功能操作,默认是由其内部的处理模块实现,以及相关引脚是指处理模块的引脚。
参考图2,在本实施例中,所述从机位置识别方法包括步骤:
步骤S10、从机120通过串联总线210依次接收及处理从主机110发送的位置识别信息,并获取自身相对于主机110的位置信息;
步骤S20、主机110通过通信总线220与各位置的从机120进行通信,获取对应位置上从机120的编码地址。
通过串联总线210将主机110的位置识别信息依次发送至各从机120中, 根据各从机120的接收顺序,获取不同的位置信息,从而获取自身相对于主机110的位置信息。以及,再通过各从机120已知自身位置信息的基础上,通过通信总线220进行地址识别通信,获取每一位置上的从机120所对应的编码地址,从而实现在不知道从机120信息的基础上,智能获取各位置上从机120的编码地址。
根据本申请的实施例,所述位置信息是各从机相对于主机的先后排列顺序。
结合图3进一步阐述根据本申请示例的从机位置识别方法。
在步骤S11,主机110通过串联总线210发送位置识别信息,每一从机120在接收到位置识别信息后进行处理,并将处理后的位置识别信息通过串联总线210发送至下一个从机120。
在步骤S12,从机120分别从位置识别信息中获取自身相对于主机110的位置信息。
在步骤S21,主机110再通过通信总线220发送包含位置信息的地址配对信息给各相应的从机,从机120在接收到地址配对信息后进行处理以提取所述位置信息。
在步骤S22,从机120将对与自身位置信息相同的地址配对信息进行处理,形成具有编码地址的配对成功信息,并通过通信总线220发送配对成功信息至主机110。与自身位置信息相同指的是地址配对信息中包含的位置信息即为接收到该地址配对信息的从机的位置信息。
步骤S23、主机110根据配对成功信息获取对应位置上从机120的编码地址。
具体的,通过步骤S11和步骤S12,依靠串联总线210需要经过每一从机120才能到下一从机120的特性,从机120通过串联总线210发送位置识别信 息,位置识别信息应包括对应的位置信息,或在经过从机120后,为下一个从机120提供新的位置信息。例如,位置识别信息为一串连续数字的字符串,如1至9排序的字符串,第一位置的从机120获取位置识别信息后,根据预设算法提取第一位的数字,再将所述位置识别信息修改,如删除第一位字符串形成新的位置识别信息,并发送给下一个从机120,每一从机120将获取对应位置,即相对于主机110位置的位置信息。再例如,位置识别信息为一编码,第一个从机120先接收所述编码,并通过预设算法或数据库提取位置信息,即可通过编码认为当前从机120的位置信息为“1号”,再通过预设算法或数据库将编码修改为另一可被从机120识别且表示“2号”的新的位置识别信息,通过上述操作每一从机120均可获取对应位置,即相对于主机110位置的位置信息。
以及,通过步骤S21至步骤S23,依靠通信总线220实现主机110和多个从机120的通信,例如每一从机120均获取自身相对于主机110的位置信息,通过包含特定位置信息的地址配对信息,获取每一位置信息所对应的地址,即,主机110经由通信总线220分别与各从机120的相互通信,使得主机110能获取每一位置的从机120的编码地址。后续,主机110根据智能控制或远程命令控制,根据已获知的编码地址来实现对对应于该编码地址的从机120的控制。根据本申请示例的从机位置识别方法,主机110可智能获取各从机120的编码地址,而无需要提前知晓从机120编码地址,由此提高了主机110和从机120结构的灵活性。据此,在修护、安装和更换过程中,不需要工作人员特意将编码地址输入至主机110或总系统中,即使后续由于工作人员将各从机120的位置调换,也能及时获取对应编码地址的从机120的位置。
举例来说,从机120将对与自身位置信息相同的地址配对信息进行处理是将自身地址增加至地址配对信息中形成配对成功信息。如地址配对信息是(1) AAA,配对成功信息是(1)(XXX)AAA,其中(1)属于位置信息,(XXX)属于编码地址,AAA属于附加信息。再例如,将自身地址融合至地址配对信息中形成配对成功信息,如地址配对信息是(1)AAA,配对成功信息是(1XXX)AAA或(1)AXAXAX,主机110可通过特定算法将编码地址XXX提取出,防止信号干扰,提高保密性能。当然,所述串联总线210和通信总线220均可通过高低电平实现,这均属于现有信息传输的常规技术,不再一一描述。
图4是根据本申请示例的从机120处理地址配对信息的流程图。如图4所示,在步骤S221,从机120接收到地址配对信息后进行处理以提取所述位置信息。在步骤S222,从机120将从地址配对信息提取的位置信息与从位置识别信息获取的位置信息进行比较,若符合预设地址匹配条件,则对地址配对信息进行处理。在步骤S223,形成具有编码地址的配对成功信息,并通过通信总线220发送配对成功信息至主机110。
在本例中,接收到地址配对信息的从机120将地址配对信息中位置信息与其从位置识别信息中获取的位置信息进行比较以判断是否匹配,是为了避免误处理并非针对本从机的地址配对信息。例如,若地址配对信息是主机110特意发送给该从机120的,该从机120进行处理形成配对成功信息,反馈回主机110,若地址配对信息是主机110特意发送给其他从机120的,该从机120不进行处理。
一般处理方式均是提取所述地址配对信息的位置信息,并与从机120自身的位置信息进行比较,相同就进行后续处理,反之就不处理。
图5是根据本申请示例的基于通知信息的从机位置识别方法的流程图。图6是图5所示例的方法的进一步细化。
参照图5与图1,在步骤S31,主机110先通过通信总线220发送通知信 息,从机120通过通信总线220接收到通知信息后等待接收位置识别信息;其中,通知信息用于指示各从机等待接收位置识别信息。然后,在步骤S32,主机110通过串联总线210发送位置识别信息,每一从机120在接收到位置识别信息后进行处理,并将处理后的位置识别信息通过串联总线210发送至下一个从机120。步骤S32的过程上文已结合各示例描述,不再赘述。
具体的,通知信息最主要作用是防止从机120过多,主机110的位置识别信息无法使全部从机120获取自身位置信息,或者由于中途出错,位置识别信息没有及时传输至对应的从机120中。主机110先通过通信总线220发送通知信息,通知接入通信总线220的所有从机120,主机110将要进行位置信息确定的步骤,从机120进入对应工作模式,等待接收位置识别信息。
参考图6,在步骤S311,主机110通过通信总线220发送通知信息。在步骤S312,从机120通过通信总线220接收到通知信息后,在预设时间内等待接收位置识别信息。在步骤S33,若从机120在预设时间内没有接收到位置识别信息,通过通信总线220发送指示位置识别信息接收失败的反馈信息。在步骤S34,主机110根据指示位置识别信息接收失败的反馈信息获取没有接收到位置识别信息的从机120数量或从机120编码地址,且主机110重新调整位置识别信息,意在使当前所有的从机120都可从位置识别信息中获取位置信息,并再次通过串联总线210发送调整后的位置识别信息。
具体是,当某一从机120在规定时间内未接收到位置识别信息,可认为从机120无法获取自身位置信息,从机120反馈回主机110,即从机120通过通信总线220发送指示位置识别信息接收失败的反馈信息。主机110根据失败反馈信息获取没有接收到位置识别信息的从机120数量或从机120编码地址,且主机110重新调整位置识别信息以满足对应数量的从机120,再次通过串联总 线210发送位置识别信息。智能地调节位置识别信息的内容,以使得不同从机120均可获取自身位置信息。
根据本申请的一些示例,还提供一种主从通信系统。与图1所示的主从通信相比,该主从通信系统可为一个从机或多个从机配置与其并联的可控开关,该可控开关由与其并联的所述从机控制,在受控的情况下,常开;且在未受控的情况下闭合。未受控的情况发生在与该可控开关并联的从机故障、断电等该从机未正常工作的情况下。
如图7所示,所述主从通信系统包括与从机120串联总线210的收发端并联的可控开关300,可控开关300的控制端与对应从机120的控制引脚连接,所述可控开关300在从机120的控制下常开,且当从机120不能正常工作时不再控制可控开关300,可控开关300进入常闭状态。
具体的,每一从机120的第一从机引脚121和第二从机引脚122通过一可控开关300连接,可控开关300包括设置在第一从机引脚121和第二从机引脚122之间的开关310和控制开关310的开启或关闭的控制器320,所述从机120还包括控制控制器320工作的第四从机引脚124,从机120通过第四从机引脚124控制控制器320,以控制开关310常开。以及,在主从通信系统上电时,可控开关300均在从机120控制下,进入常开,当可控开关300脱离从机120的控制,进入常闭,即当从机120有问题不能正常工作,可直接短路第一从机引脚121和第二从机引脚122,使位置识别信息忽略所述从机120,直接进入下一从机120,实现通信的断点传输,提高系统的可靠性。
进一步地,控制器320还接地,实现第四从机引脚124的控制信号的有效传输。
根据本申请的一些示例,还提供用于移动电源的租借装置。
该用于移动电源的租借装置,包括主从通信系统,以及放置于从机的移动电源。主机根据智能控制或远程命令控制,实现从机作为租借设备的正常工作。该用于移动电源的租借装置的主机可采用上文结合各示例描述的主机110,该用于移动电源的租借装置的从机包括一个或多个用于容纳移动电源的容纳仓,或者说电池仓,上文结合各示例描述的从机120可被实现在该用于移动电源的租借装置的从机中。由此,在该用于移动电源的租借装置中可实现上文结合各附图所描述的从机位置识别方法,进而灵活地管理从机。
本申请还提供用于移动电源租借装置的主机。该主机被构造为与移动电源租借装置的多个从机,以主机为首通过串联线路依次串行连接,并且多个从机通过并行线路并行连接至该主机。各从机被配置有唯一的编码地址。该主机被实现为如上文结合各示例描述的主机110。作为示例,该主机可包括处理器和用于存储指令的存储器,该主机被配置为在指令被处理器执行时,执行如上文结合附图描述的从机位置识别方法中主机120所执行的部分,以与从机配合工作。
本申请还提供用于移动电源租借装置的从机。该从机包括至少一个用于容纳移动电源的容纳仓且被配置有唯一的编码地址。该从机分别通过串联线路和并行线路与所述移动电源租借装置的主机连接,所述串联线路设置为使得所述从机与所述主机和其它从机依次串联,所述并行线路设置为使得所述从机能以与其它从机并行的方式连接到所述主机。该从机可采用结合图1到图6各示例所描述的从机120。作为示例,从机可包括处理器和用于存储指令的存储器,该从机在该处理器在执行该指令时执行如上文结合附图所描述的从机120所执行的步骤,以便于主机配合工作。
在一些示例中,该从机还包括与所述多个从机中一个或多个并联的可控开 关,所述可控开关在与其并联的所述从机的控制下常开,在未被与其并联的所述从机控制时闭合。该示例下,该从机被实现为例如结合图7所描述的带可控开关的从机120。
与现有技术相比,本申请提供的示例,可在主机不需要提前知晓从机编码地址的情况下,使主机获取从机相对于主机的排列顺序以及对应的编码地址,便于对设备进行管理和识别,提高主机和从机结构的灵活性,在修护、安装和更换过程中,不需要工作人员特意将编码地址输入至主机或总系统中,后续由于工作人员将各从机的位置调换,也能及时获取对应编码地址的从机的位置;进一步地,当从机有问题不能正常工作,使位置识别信息忽略所述从机,直接进入下一从机,实现通讯的断点传输,提高系统的可靠性。
以上所述者,仅为本申请示例性实施例,并非用于限制本申请的范围,凡依本申请申请专利范围所作的等效变化或修饰,皆为本申请所涵盖。

Claims (14)

  1. 一种用于主从通信系统的从机位置识别方法,其特征在于,所述主从通信系统包括主机和多个从机,每一所述从机均包括唯一的编码地址,所述多个从机通过并行线路并行连接至所述主机,且所述主机与所述多个从机以主机为首通过串联线路串行连接,其中,所述多个从机中直接与所述主机串行连接的从机为第一从机,所述从机位置识别方法包括:
    所述第一从机通过串联线路接收所述主机发送的位置识别信息,处理所述位置识别信息并获取自身相对于主机的位置信息;
    依次串行连接的各从机,分别通过串联线路接收前一从机通过串联线路发送的处理后的位置识别信息,处理并获取自身相对于主机的位置信息;以及
    主机通过所述并行线路分别与各所述从机通信以获取各所述从机的编码地址。
  2. 根据权利要求1所述的从机位置识别方法,其特征在于,所述位置信息是各从机相对于主机的先后排列顺序。
  3. 根据权利要求1所述的从机位置识别方法,其特征在于,所述主机通过并行线路分别与各所述从机通信以获取各所述从机的编码地址包括:
    所述主机通过并行线路分别发送包含位置信息的地址配对信息给相应从机,所述从机在接收到所述地址配对信息后进行处理以自其中提取所述位置信息;
    所述从机在所提取的位置信息与自身位置信息匹配的情况下,对所述地址配对信息进行处理以形成包含编码地址的配对成功信息,并通过所述并行线路将所述配对成功信息发送至所述主机;以及
    所述主机自所述配对成功信息获取所述从机的编码地址。
  4. 根据权利要求1所述的从机位置识别方法,其特征在于,所述从机位置识别方法还包括:
    所述主机在发送所述位置识别信息给所述第一从机之前,通过所述并行线路发送指示各所述从机等待接收所述位置识别信息的通知信息。
  5. 根据权利要求4所述的从机位置识别方法,其特征在于,所述从机位置识别方法还包括:
    各所述从机通过在通过所述并行线路接收到所述通知信息后,若在预设时间内没有接收到所述位置识别信息,则通过所述并行线路发送指示接收失败的反馈信息;
    所述主机根据所述反馈信息确定没有接收到所述位置识别信息的从机数量或从机编码地址;以及
    所述主机基于所确定的从机数量或从机编码地址,调整所述位置识别信息并再次通过所述串联线路发送。
  6. 根据权利要求1至5中任意一项所述的从机位置识别方法,其特征在于,所述主从通信系统还包括与所述多个从机中每个或多个并联的可控开关,所述方法进一步包括:
    在与其并联的所述从机的控制下,所述可控开关常开;以及
    在与其并联的所述从机未控制所述可控开关时,所述可控开关闭合。
  7. 一种主从通信系统,其特征在于,所述主从通信系统包括主机和多个从机,每一所述从机均包括唯一的编码地址,所述多个从机通过并行线路并行连接至所述主机,且所述主机与所述多个从机以主机为首通过串联线路串行连接,其中,所述主从通信系统被配置为执行如权利要求1-5中任一意项所述的 从机位置识别方法。
  8. 根据权利要求7所述的主从通信系统,其特征在于,所述主从通信系统还包括与所述多个从机中一个或多个并联的可控开关,所述可控开关在与其并联的所述从机的控制下常开,在未被与其并联的所述从机控制时闭合。
  9. 一种用于移动电源的租借装置,其特征在于,所述租借装置包括如权利要求7或8所述的主从通信系统,其中,所述从机能放置所述移动电源。
  10. 一种用于移动电源租借装置的主机,其中,所述主机被构造为与所述移动电源租借装置的多个从机通过串联线路依次串行连接,并且所述多个从机通过并行线路并行连接至所述主机,各所述从机被配置有唯一的编码地址,其特征在于,所述主机被配置为:
    通过串联线路发送用于所述多个从机的位置识别信息,以便各从机获知其相对于所述主机的位置信息;
    在各所述从机分别获知其位置信息后,通过并行线路向各所述从机发送地址配对信息;以及
    接收所述从机从所述并行线路发送的配对成功信息,并自所述配对成功信息中提取相应从机的编码地址。
  11. 根据权利要求10所述的用于移动电源租借装置的主机,其特征在于,所述主机进一步被配置为:
    在通过所述并行线路接收到由从机发送的指示接收位置识别信息失败的反馈信息后,根据所述反馈信息确定没有接收到所述位置识别信息的从机数量或从机编码地址;以及
    基于所确定的从机数量或从机编码地址,调整所述位置识别信息并再次通过所述串联线路发送。
  12. 一种用于移动电源租借装置的从机,其被配置有唯一的编码地址,所述从机分别通过串联线路和并行线路与所述移动电源租借装置的主机连接,所述串联线路设置为使得所述从机与所述主机和其它从机依次串联,所述并行线路设置为使得所述从机能以与其它从机并行的方式连接到所述主机,其特征在于,所述从机被配置为:
    通过串联线路接收位置识别信息,处理所述位置识别信息并获取自身相对于主机的位置信息;
    通过并行线路接收所述主机发送的地址配对信息并处理以自其中提取所述位置信息;
    在所提取的位置信息与自身相对于所述主机的位置信息匹配的情况下,对所述地址配对信息进行处理以形成包含编码地址的配对成功信息,并通过所述并行线路将所述配对成功信息发送至所述主机。
  13. 根据权利要求12所述的用于移动电源租借装置的从机,其特征在于,所述从机进一步被配置为:
    在预设时间内没有接收到所述位置识别信息,则通过所述并行线路发送指示接收位置识别信息失败的反馈信息给所述主机。
  14. 根据权利要求12所述的用于移动电源租借装置的从机,其特征在于,其还包括并联的可控开关,所述可控开关在与所述从机的控制下常开,在未被与所述从机控制时闭合。
PCT/CN2020/122831 2019-11-13 2020-10-22 主从通信系统、从机位置识别方法和移动电源的租借装置 WO2021093540A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911109393.9 2019-11-13
CN201911109393.9A CN110830304B (zh) 2019-11-13 2019-11-13 一种主从通讯系统、从机位置识别方法和移动电源的租借装置

Publications (1)

Publication Number Publication Date
WO2021093540A1 true WO2021093540A1 (zh) 2021-05-20

Family

ID=69554913

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/122831 WO2021093540A1 (zh) 2019-11-13 2020-10-22 主从通信系统、从机位置识别方法和移动电源的租借装置

Country Status (3)

Country Link
CN (1) CN110830304B (zh)
TW (1) TWI772963B (zh)
WO (1) WO2021093540A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143139A (zh) * 2021-11-30 2022-03-04 陕西中源智控科技有限公司 基于硬件冗余分组通信的胶带机保护系统及方法
CN115426393A (zh) * 2022-08-05 2022-12-02 杭州和利时自动化有限公司 一种实现无线控制信息交互的方法及装置
CN115883516A (zh) * 2022-11-25 2023-03-31 飞毛腿能源科技有限公司 一种多设备并联主从通讯的自动编址系统及方法
CN117319354A (zh) * 2023-11-28 2023-12-29 天合光能股份有限公司 光伏跟踪支架控制器的地址配置方法和装置
CN117349201A (zh) * 2023-10-13 2024-01-05 芜湖藦卡机器人科技有限公司 一种基于串口通信的多从机控制方法、系统和存储介质

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110830304B (zh) * 2019-11-13 2022-11-11 深圳竹芒科技有限公司 一种主从通讯系统、从机位置识别方法和移动电源的租借装置
CN112087741B (zh) * 2020-09-25 2024-08-09 福建福清核电有限公司 一种核岛内基于一主多从的级联通讯装置
CN112533190B (zh) * 2020-11-20 2023-02-28 歌尔科技有限公司 从设备的控制方法、从设备和计算机可读存储介质
CN112636779A (zh) * 2020-12-17 2021-04-09 深圳街电科技有限公司 一种通信方法和电子设备
CN114093090A (zh) * 2021-11-17 2022-02-25 广东臻享云科技发展有限公司 一种自动化调节分配式充电宝租赁装置
CN114327931B (zh) * 2021-11-30 2023-11-03 苏州浪潮智能科技有限公司 一种整机柜内网络管理设备及整机柜内网络系统
CN114531422A (zh) * 2021-12-30 2022-05-24 如果新能源科技(江苏)股份有限公司 一种总线地址自动分配与识别方法、电子设备、存储介质和程序产品
CN115801494B (zh) * 2023-02-08 2023-04-25 浙江正泰物联技术有限公司 通讯系统及用于通讯系统的组网方法
CN117176506A (zh) * 2023-09-28 2023-12-05 浙江正泰仪器仪表有限责任公司 一种电能表系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222377A (zh) * 2007-11-23 2008-07-16 深圳国人通信有限公司 一种分布式主从机通信中对从机参数的处理方法及装置
CN103454996A (zh) * 2013-08-23 2013-12-18 广州视睿电子科技有限公司 主从机系统及其控制方法
CN106402009A (zh) * 2016-10-26 2017-02-15 华南理工大学 基于主从逻辑的风量控制系统及方法
WO2019020674A1 (de) * 2017-07-28 2019-01-31 Ebm-Papst Mulfingen Gmbh & Co. Kg Drahtlose vergabe von netzwerkadressen
CN110120989A (zh) * 2019-04-19 2019-08-13 珠海格力电器股份有限公司 一种实现设备间自动分配匹配地址的方法及系统
CN110830304A (zh) * 2019-11-13 2020-02-21 深圳市搜电科技发展有限公司 一种主从通讯系统、从机位置识别方法和移动电源的租借装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040225814A1 (en) * 2001-05-29 2004-11-11 Ervin Joseph J. Method and apparatus for constructing wired-AND bus systems
CN101477506A (zh) * 2008-01-04 2009-07-08 鸿富锦精密工业(深圳)有限公司 主设备对从设备的定址系统及其方法
CN102821017B (zh) * 2011-06-08 2018-03-13 中兴通讯股份有限公司 主从式现场总线中从机地址顺序识别的方法及系统
CN103826252B (zh) * 2014-01-16 2017-05-10 京信通信系统(中国)有限公司 主从设备之间获取及发送序列号的方法和系统
CN104951421B (zh) * 2015-05-19 2018-04-03 重庆大学 一种串行总线通信设备的自动编号与类型识别方法及装置
CN106873513A (zh) * 2017-03-01 2017-06-20 深圳市亿维自动化技术有限公司 一种plc系统及其主从连接结构
US10846155B2 (en) * 2018-10-16 2020-11-24 Samsung Electronics Co., Ltd. Method for NVMe SSD based storage service using RPC and gRPC tunneling over PCIe +
CN110401732A (zh) * 2019-07-29 2019-11-01 江西科然科技有限公司 电池管理系统从机地址分配方法、系统、移动终端及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222377A (zh) * 2007-11-23 2008-07-16 深圳国人通信有限公司 一种分布式主从机通信中对从机参数的处理方法及装置
CN103454996A (zh) * 2013-08-23 2013-12-18 广州视睿电子科技有限公司 主从机系统及其控制方法
CN106402009A (zh) * 2016-10-26 2017-02-15 华南理工大学 基于主从逻辑的风量控制系统及方法
WO2019020674A1 (de) * 2017-07-28 2019-01-31 Ebm-Papst Mulfingen Gmbh & Co. Kg Drahtlose vergabe von netzwerkadressen
CN110120989A (zh) * 2019-04-19 2019-08-13 珠海格力电器股份有限公司 一种实现设备间自动分配匹配地址的方法及系统
CN110830304A (zh) * 2019-11-13 2020-02-21 深圳市搜电科技发展有限公司 一种主从通讯系统、从机位置识别方法和移动电源的租借装置

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143139A (zh) * 2021-11-30 2022-03-04 陕西中源智控科技有限公司 基于硬件冗余分组通信的胶带机保护系统及方法
CN115426393A (zh) * 2022-08-05 2022-12-02 杭州和利时自动化有限公司 一种实现无线控制信息交互的方法及装置
CN115883516A (zh) * 2022-11-25 2023-03-31 飞毛腿能源科技有限公司 一种多设备并联主从通讯的自动编址系统及方法
CN117349201A (zh) * 2023-10-13 2024-01-05 芜湖藦卡机器人科技有限公司 一种基于串口通信的多从机控制方法、系统和存储介质
CN117349201B (zh) * 2023-10-13 2024-03-05 芜湖藦卡机器人科技有限公司 一种基于串口通信的多从机控制方法、系统和存储介质
CN117319354A (zh) * 2023-11-28 2023-12-29 天合光能股份有限公司 光伏跟踪支架控制器的地址配置方法和装置

Also Published As

Publication number Publication date
TWI772963B (zh) 2022-08-01
TW202119220A (zh) 2021-05-16
CN110830304B (zh) 2022-11-11
CN110830304A (zh) 2020-02-21

Similar Documents

Publication Publication Date Title
WO2021093540A1 (zh) 主从通信系统、从机位置识别方法和移动电源的租借装置
CN101447894B (zh) 识别分节点物理地址、网络配置及维护方法、网络系统
US20110238188A1 (en) Engineering tool
CN105159109B (zh) 一种plc控制器远程升级系统
CN111969718B (zh) 一种低压配电网设备即插即用接入方法及装置
CN104270273B (zh) 一种自配置通讯管理机
CN103166765B (zh) 一种PoE功率门限切换方法和设备
CN112055096A (zh) 自动设置设备通信地址的方法及装置
CN110224913A (zh) 数据传输方法、装置、数据传输系统和设备
CN103235584A (zh) 智能家居控制方法、装置、mcu及系统
CN106888100A (zh) 以太网供电交换机及其供电方法
CN108647131A (zh) 运行日志的输出系统
CN103217956A (zh) 工业控制系统及其控制方法和控制装置
CN109032673A (zh) 自动回复基本输入输出系统映像档的方法及计算机系统
CN110688263B (zh) 基于fpga的硬盘自动切换装置的应用方法
US9959231B2 (en) Data bus coupler and method of operation
US11108589B2 (en) Battery module, control method, program, and information processing system
WO2022156354A1 (zh) 版本配置方法、装置、设备、系统及存储介质
WO2020257983A1 (zh) 主从模块配对处理系统、装置和方法
CN105741393A (zh) 门锁系统的控制方法与装置、门锁的控制方法与装置
CN109542812A (zh) 数据通信控制方法、装置及终端设备
CN104102512B (zh) 基于外部中断的嵌入式平台io设备动态识别系统及该系统的io设备动态识别方法
CN114422481A (zh) 一种网络设备管理方法及相关装置
CN112530150A (zh) 用于遥控器的配对方法及配对装置、遥控器
US20190286599A1 (en) Dual way communication method, system, and master device thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20887675

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20887675

Country of ref document: EP

Kind code of ref document: A1