Multi-point round-robin efficient control method and device
By adopting the combined structure of core board and expansion board and multi-point round-robin efficient control method in the host-slave system, the problem of poor anti-interference ability and control timeliness is solved, and stable and efficient control of large and complex projects is achieved, which is suitable for for various application scenarios.
Patent Information
- Application Number
- CN202410395078.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-04-02
AI Technical Summary
The existing host-slave control system is difficult to achieve long-distance communication due to poor anti-interference ability in large and complex escape room and interactive brick projects, and traditional protocols such as RS485 and SPI have control timeliness and adaptability issues, limiting The application scenarios and practicality of the system are revealed.
It adopts the combined structure of core board and expansion board and connects hand-in-hand through the RS-485 input and output interface to realize an efficient multi-point polling control method. The host runs the polling program to obtain and send control instructions, and processes the feedback data through the slave machine. , generate alternative feedback data to ensure accurate transmission of control instructions and exception handling.
It improves the anti-interference ability and control stability of the system, reduces wiring complexity, ensures the safety and efficient execution of the equipment, and is suitable for communication needs of different scales and complexity.
Smart Images

Figure CN118193440B
Abstract
Description
Technical Field
[0001] The present application relates to a method and device for controlling a slave by a host. Background Art
[0002] Interactive brick systems and escape room systems generally use a host-slave control system, in which the host is a main control board and the slave is a function expansion board. The host controls the slave. The host has relatively complete functional units such as processor, memory, I / O, network module, etc., and the slave is generally only an interface controller for receiving signals from the host and feeding back its own signals.
[0003] However, this type of device has poor long-distance anti-interference ability, which greatly limits its application scenarios. For example, for escape room systems, this traditional host-slave system can only achieve short-distance communication layout, so it is difficult to realize large-scale, complex functional escape room projects; for interactive brick systems, it is also difficult to realize large-scale, complex functional interactive brick projects due to its limited communication distance.
[0004] The host-slave system using protocols such as RS485 and SPI also has deficiencies in control methods. For example, under the same protocol, if the RS485 protocol is used for a one-host-multiple-slave question-and-answer control method, the host repeatedly sends similar data or occupies a large bus, and it takes a long time to complete a round of control, and there is no good control over the timeliness of the control; under different protocols, such as using the SPI protocol for a one-master-multiple-slave control method, it is necessary to consider the adaptability of the hardware, and when applied, it will be limited by the complexity and length of the line, and the practicality and versatility are not high. Summary of the invention
[0005] One of the purposes of the present application is to provide a master-slave system, which can realize an interference-resistant master-slave control system.
[0006] To this end, some embodiments of the present application provide a host-slave system, which includes a host and at least one slave, wherein the core board includes a main controller and a third RS-485 input and output interface coupled to the main controller; the slave is an input expansion board or an output expansion board, wherein the input expansion board includes a first microcontroller, a first RS-485 input and output interface coupled to the first microcontroller, a first power supply unit, and an input interface unit; the output expansion board includes a second microcontroller, a second RS-485 input and output interface coupled to the second microcontroller and a second power supply unit, and an output interface unit coupled to the second microcontroller through an isolation unit; wherein the first RS-485 input and output interface, the second RS-485 input and output interface, and the third RS-485 input and output interface are connected hand in hand.
[0007] One of the purposes of the present application is to provide an improved control method applicable to a master-slave system.
[0008] The present application provides a multi-point round-robin efficient control method for controlling a host-slave system, wherein the host is connected to the slave via a communication protocol connection line, and the host runs a round-robin program to perform the following operations: obtain control instructions for all slaves; send the control instructions to a directly connected slave via a host communication interface, and sequentially send the control instructions to other slaves via the slave; wait for and sequentially receive feedback data from each slave to the control instructions, wherein the feedback data includes normal feedback data received from the slave communication interface and / or abnormal feedback data received from a first configuration port; process the received feedback data to determine whether there is abnormal feedback data; if it is determined that the received feedback data from the slave has abnormal feedback data, the host responds to the source slave of the abnormal feedback data, and / or generates correct alternative feedback data for the control instruction corresponding to the abnormal feedback data, and replaces the abnormal feedback data with the alternative feedback data.
[0009] In some embodiments, the correct substitute feedback data is stored in the cache address of the abnormal feedback data to replace the abnormal feedback data, so that in the subsequent processing judgment step, the substitute feedback data will be judged to have no abnormality, so that the host program can proceed smoothly.
[0010] In some embodiments, if there is no abnormal feedback data, it continues to determine whether all slave data has been received. If it has been received, a control instruction sending cycle ends and subsequent cycles are executed. If it has not been received, it continues to wait for subsequent slave feedback data.
[0011] In some embodiments, the slave runs a slave program to perform the following operations: receiving data from the host communication interface of the slave; determining whether the received data is a control instruction from the host; if it is a control instruction from the host, controlling the slave according to the control instruction; determining whether the slave is the first slave directly connected to the host; if it is the first slave, sending the first feedback data of the slave to the host through the slave communication interface; if it is determined that the slave is not the first slave, waiting to receive data from the directly connected second slave; determining whether the data is the second feedback data from other slaves, and step 2. At the same time, in the step of determining whether the received data is a control instruction from the host, if it is determined that the received data is not from the host, continuing to determine whether the data is the second feedback data from other slaves, if it is the second feedback data from other slaves, forwarding the second feedback data to the host, if it is not the second feedback data from other slaves, that is, the data is neither the control instruction from the host nor the second feedback data, it is assumed that the data is abnormal data; and then the abnormal feedback data is fed back to the first configuration port of the host through the second configuration port of the slave.
[0012] Other embodiments of the present application provide a multi-point round-robin efficient control method, wherein the host and the slave are connected via a communication protocol connection line, and the round-robin program running on the host performs the following operations: first, obtain control instructions for all slaves, that is, full-machine control instructions; send the control instructions to the directly connected slaves through the host communication interface, and send them to other slaves sequentially through the slaves; wait for feedback data from the slaves received in sequence; make a first judgment to determine whether the reception has timed out, and if so, record the exception and wait for alternative feedback data sent by subsequent slaves; continue to make a second judgment to determine whether the waiting for reception has timed out again, and if not, end a control instruction sending cycle and execute subsequent cycles.
[0013] In some embodiments, if the result of the first determination of whether the reception has timed out is no timeout, or the result of the second determination of whether the reception has timed out is timeout, a determination is made as to whether data processing is incorrect. If an error occurs, the host responds to the source slave of the abnormal feedback data, and / or generates a correct alternative feedback data for the control instruction corresponding to the abnormal feedback data, and replaces the abnormal feedback data with the alternative feedback data.
[0014] In some embodiments, a slave program is run for any slave, including receiving data from the slave communication interface of the slave; starting a response process after receiving a host control instruction; the response process includes determining whether the slave itself is a sequential slave; if so, sending feedback data of the slave; if not, waiting for feedback data sent by a previous slave; determining whether receiving the previous feedback data has timed out; if so, the slave generates a substitute feedback data and sends it to the host, and after sending the substitute feedback data, the slave's own data needs to be sent to ensure that subsequent slave rounds proceed normally.
[0015] Other embodiments of the present application also provide a multi-point round-robin efficient control device, which includes at least one processor and at least one memory including computer program code, wherein the at least one memory and the computer program code are configured to work with the at least one processor to enable the device to at least execute any one of the above-mentioned multi-point round-robin efficient control methods.
[0016] The beneficial effects of the present application are as follows: the host-slave system provided by the embodiments of the present invention can reduce the wiring in the room: it is implemented based on industrial protocols such as RS485 and CAN, especially the core board and each expansion board communicate through the RS485 protocol, and the communication anti-interference ability from each room to the main controller is strong; this round of answer-help-answer control mechanism is applied in the host-slave control method proposed in some embodiments of the present application, so as to improve the execution efficiency of tasks when controlling multiple slaves, timely understand slave abnormalities; quickly determine the working status of the slave; do not interfere with the control of normal slaves, ensure the stability of control, and effectively improve the control stability and safety of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic diagram of the structure of a host-slave system according to an embodiment of the present application;
[0018] Figure 2 is a structural principle diagram of an input expansion board of a host-slave system according to an embodiment of the present application;
[0019] Figure 3 is a structural principle diagram of an output expansion board of a host-slave system according to an embodiment of the present application;
[0020] Figure 4 A schematic structural diagram of a core board of a host-slave system according to an embodiment of the present application;
[0021] Figure 5 It is a flowchart of a host program of a first embodiment of a multi-point round-robin efficient control method according to an embodiment of the present application;
[0022] Figure 64 is a flowchart of a slave program according to a first embodiment of a multi-point round-robin efficient control method of an embodiment of the present application.
[0023] Figure 7 It is a flowchart of a host program of a second embodiment of a multi-point round-robin efficient control method according to an embodiment of the present application;
[0024] Figure 8 4 is a flowchart of a slave program of a second embodiment of a multi-point round-robin efficient control method according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] The specific implementation methods of the present application are described in detail below with reference to the accompanying drawings.
[0026] like Figure 1 As shown, the universal input and output expansion system proposed in the present application includes a core board 100, at least one input expansion board 200, and at least one output expansion board 300. The core board 100, the input expansion board 200, and the output expansion board 300 are connected in a hand-in-hand manner. There are many ways to connect the core board 100 and the input expansion board 200 and the output expansion board 300. Figure 1 As shown, the output end 1022 of the third RS485 input / output interface 102 of the core board is connected to the input end 2021 of the first RS485 input / output interface 202 of the input expansion board 200, and the output end 2022 of the first RS485 input / output interface 202 is connected to the output end 3021 of the second RS485 input / output interface 302. In other hand-in-hand connection modes, an output expansion board is first connected from the core board, and then the input expansion board corresponding to the output expansion board is connected. In other hand-in-hand connection modes, all input expansion boards are first connected one by one from the core board, and then all output expansion boards are connected one by one.
[0027] In some embodiments, the connection between the first RS-485 input / output interface, the second RS-485 input / output interface, and the third RS-485 input / output interface is realized by using an RJ45 standard network cable. The connection between the first RS-485 input / output interface, the second RS-485 input / output interface, and the third RS-485 input / output interface is called an RS485 protocol connection line.
[0028] Core board
[0029] like Figure 4As shown, the core board 100 includes a main controller 101 and a third RS-485 input / output interface 102 coupled to the main controller; wherein the main controller may be an embedded processor GD32F470ZIT6; the third RS-485 input / output interface 102 includes an input terminal 1021 and an output terminal 1022. The core board 100 also includes a power module 103, a network module 104, a storage module 105, a display module 106, a CAN interface module 107, a sound module 108, and an alarm module 109 coupled to the main controller 101. Among them, the power module 103 can provide a variety of voltage outputs for powering each module; the network module 104 can be a WIFI network module for communicating with an external network board; the storage module 105 can be, for example, an SD card, etc., for storing the control program of the core board; the display module 106 can be, for example, based on an OLED screen to provide operating information of the core board; the CAN interface module 107 is used to realize communication between the core board and the CAN protocol device; the sound module 108 can be configured to provide foreground sound, background sound or a mixture of the two; the alarm module 109 can be based on a buzzer, used to provide a buzzer when the main controller needs an alarm.
[0030] Input expansion board
[0031] like Figure 2 As shown, the input expansion board 200 includes a first microcontroller 201, a first RS-485 input / output interface 202 coupled to the first microcontroller 201, a first power supply unit 203, and an input interface unit 204. The first microcontroller may be a GD32F103RGT6 single-chip microcomputer. The first RS-485 input / output interface 202 may include an input terminal 2021 and an output terminal 2022. The first power supply unit 203 may include a 5V power supply module for powering the first RS-485 input / output interface 202, and a 3.3V power supply module for powering the first microcontroller. A current acquisition module may also be included for monitoring the current of the second microcontroller and the 5V power supply module. The input interface unit 204 may be a thirty-two-way input detection port for providing an expansion of the input interface. In addition, the input expansion board may also include a configuration port 205 coupled to the first microcontroller for configuring the first microcontroller.
[0032] Output expansion board
[0033] like Figure 3As shown, the output expansion board 300 includes a second microcontroller 301, a second RS-485 input / output interface 302 and a second power supply unit 303 coupled to the second microcontroller 301, and an output interface unit 305 coupled to the second microcontroller through an isolation unit 304. The second microcontroller may be a GD32F103RGT6 single-chip microcomputer. The second RS-485 input / output interface 302 may include an input terminal 3021 and an output terminal 3022. The second power supply unit 303 may include a 5V power supply module for powering the second RS-485 input / output interface 302, and a 3.3V power supply module for powering the second microcontroller. A current acquisition module may also be included for monitoring the current of the second microcontroller and the 5V power supply module. The isolation unit 304 may be a thirty-two-way two-stage MOS isolation, and the output interface unit 305 may be a thirty-two-way output control port for providing an expansion of the output interface. In addition, the output expansion board may further include a breathing light 306 coupled to the second microcontroller for displaying a working status, and a configuration port 307 for configuring the second microcontroller.
[0034] The first, second and third RS485 input and output interfaces mentioned above can be referred to as RS485 interfaces for short.
[0035] Turn Control
[0036] like Figure 5 As shown, in some embodiments, the round-robin program of the host is used to send control information to each slave and obtain feedback from the slave to ensure fast and accurate transmission of control information. To this end, the round-robin program running on the host first obtains control instructions for all slaves, that is, full-machine control instructions, step S101, sends the control instruction to the directly connected slave through the host RS485 interface, that is, the host communication interface, and sequentially sends it to other slaves through the slave, step S102, then waits and sequentially receives feedback data of each slave to the control instruction, the feedback data includes normal feedback data received from the RS485 interface and / or abnormal feedback data received from the first configuration port; step S103, processes the received feedback data to determine whether there is abnormal feedback data, step S104, if there is no abnormal feedback data, continue to determine whether all slave data has been received, step S106, if the reception is complete, end a control instruction sending cycle and execute subsequent cycles, if not, return to execute step S103, and continue to wait for subsequent slave feedback data.
[0037] If it is determined in step S104 that the feedback data received from the slave machine contains abnormal feedback data, the host responds to the source slave machine of the abnormal feedback data, step S105A, and / or generates a correct alternative feedback data of the control instruction corresponding to the abnormal feedback data, and replaces the abnormal feedback data S105B with the alternative feedback data, for example, storing it in the cache address of the abnormal feedback data to replace the abnormal feedback data. In this way, in the subsequent processing judgment step S104, it will be determined that the alternative feedback data has no abnormality, so that the host program can proceed smoothly.
[0038] For any slave, whether it is the input expansion board or the output expansion board, the slave program is run, such as Figure 6 As shown, the slave program may include receiving data from the RS485 interface of the slave, that is, the slave communication interface, step S201; judging whether the received data is a control instruction from the host, step S202; if it is a control instruction from the host, controlling the slave according to the control instruction, step S221, and then judging whether the slave is the first slave directly connected to the host, step S203, if it is the first slave, sending the first feedback data of the slave to the host through the RS485 interface, step S204, if it is judged that the slave is not the first slave, waiting to receive data from the second slave directly connected, step S205, and then judging whether the data comes from other slaves The second feedback data of the machine, step S206; at the same time, in the step S202 of judging whether the received data is the control instruction from the host, if it is judged that the received data is not from the host, then continue to judge whether the data is the second feedback data from other slaves, step S206; if it is the second feedback data from other slaves, the second feedback data is forwarded to the host, step S261; if it is not the second feedback data from other slaves, that is, the data is neither the control instruction from the host nor the second feedback data, then it is assumed that the data is abnormal data, step S262; then the abnormal feedback data is fed back to the first configuration port of the host through the second configuration port of the slave, step S207.
[0039] In the control method proposed in this application, the slave feeds back its normal feedback data of the control instruction to the host, for example, the data is within the control protocol, and transmits the normal feedback data from other slaves through the slave to the host. For abnormal feedback data, for example, if the data sent to the protocol connection line is non-protocol data, or the data within the protocol is incomplete, the host mounted on the RS485 protocol connection line identifies it as abnormal data and directly responds, that is, not through the configuration port, but the host directly intervenes when receiving abnormal data.
[0040] The control method of the present application realizes the round-robin response of the slave to the control command of the host, thereby improving the response efficiency. Furthermore, a method for the host to generate alternative feedback information is proposed, which solves the problem that if a device is offline during the round-robin response, the subsequent device cannot effectively control and know whether it is working normally, realizes the smooth completion of the round-robin response process, and enhances the robustness of the host-slave system.
[0041] The round-robin control method provides more options for implementing the master-slave control mode. For example, one master and multiple slaves, or multiple masters and multiple slaves, can use the round-robin and help-answer methods to transmit and feedback control instructions and judge slave abnormalities.
[0042] In the control of one host and multiple slaves, or multiple hosts and multiple slaves, this method is relatively simple but highly secure and easy to maintain. The flexibility and scalability of the system also enable it to adapt to communication needs of different scales and complexities.
[0043] In another embodiment, the host's answering program is used to send control information to each slave and obtain feedback from the slave to ensure fast and accurate transmission of control information. To this end, the answering program running on the host first obtains control instructions for all slaves, that is, full-machine control instructions, step S111, and sends the control instructions to the directly connected slave through the RS485 interface, and then sends them to other slaves in sequence through the slave, step S112; wait for the feedback data from the slaves received in sequence, step S113; determine whether the reception has timed out, step S117, if it has timed out, record the exception and wait for the subsequent slave to send alternative feedback data, step S171; subsequently determine whether the waiting for reception has timed out again, step S118, if If it has not timed out, then end a control instruction sending cycle and execute subsequent cycles; if the result of the first judgment on whether the reception has timed out in the above step S117 is not timed out, or the result of the second judgment on whether the reception has timed out in step S118 is timed out, then execute a judgment on whether there is an error in data processing, step S114, if there is an error, the host responds to the source slave of the abnormal feedback data, and / or generates a correct alternative feedback data of the control instruction corresponding to the abnormal feedback data, and replaces the abnormal feedback data with the alternative feedback data, step S115.
[0044] For any slave, whether it is an input expansion board or an output expansion board, run the slave program. The slave program, such as Figure 8As shown, it includes receiving data from the RS485 interface of the slave, step S211; starting the response process after receiving the host control instruction, step S212; the response process includes, judging whether the slave itself is a sequential slave, step S213; if so, sending the feedback data of the slave, step S214; if not, waiting for the feedback data sent by the previous slave, step S215; judging whether the reception of the previous feedback data has timed out, step S216; if it has timed out, the slave generates a substitute feedback data and sends it to the host, and after sending the substitute feedback data, it is also necessary to send the slave's own feedback data to ensure that the following slave rounds are normal, step S217.
[0045] It should be understood that although the method in the present application is described in an embodiment of a host and slave system communicating based on an RS485 protocol connection line, other embodiments of the present application may also be based on the CAN protocol.
[0046] It should be understood that the embodiments of the present application may also include a device corresponding to the method, and the device may include a computer program module corresponding to each process of the above method.
[0047] In some example embodiments, the functionality of any method, process, signaling diagram, algorithm or flow chart described herein may be implemented by software and / or computer program code or code portions stored in a memory or other computer-readable or tangible media and executed by a processor.
[0048] In some example embodiments, an apparatus may include or be associated with at least one software application, module, unit or entity configured for arithmetic operations, or as a program or part thereof (including added or updated software routines), executed by at least one operating processor. Programs, also referred to as program products or computer programs, including software routines, applets and macros, may be stored in any apparatus-readable data storage medium and may include program instructions for performing specific tasks.
[0049] A sequence is a unit of data structure, which can include strings, lists, tuples, etc.
[0050] A computer program product may include one or more computer executable components that are configured to perform some example embodiments when the program is run. The one or more computer executable components may be at least one software code or code portion. Changes and configurations for implementing the functionality of the example embodiments may be performed as routines that may be implemented as added or updated software routines. In one example, the software routines may be downloaded to the device.
[0051] As an example, the software or computer program code or a portion of the code may be in source code form, object code form or some intermediate form and may be stored on some carrier, distribution medium or computer readable medium, which may be any entity or device capable of carrying the program. For example, such a carrier may include a recording medium, a computer memory, a read-only memory, an optoelectronic and / or electrical carrier signal, a telecommunication signal and / or a software distribution package. Depending on the processing power required, the computer program may be executed in a single electronic digital computer or may be distributed among multiple computers. The computer readable medium or computer readable storage medium may be a non-transitory medium.
[0052] In other example embodiments, the functions may be performed by circuits, such as by using an application specific integrated circuit (ASIC), a programmable gate array (PGA), a field programmable gate array (FPGA), or any other hardware and software combination. In yet another example embodiment, the functions may be implemented as a signal, such as a non-tangible means that may be carried by an electromagnetic signal downloaded from the Internet or other network.
[0053] According to example embodiments, an apparatus such as a node, device or response component may be configured as a circuit, a computer or a microprocessor (such as a single-chip computer element) or a chipset, which may include at least a memory for providing storage capacity for arithmetic operations and / or an operation processor for performing arithmetic operations.
[0054] The example embodiments described herein apply equally to singular and plural implementations, regardless of whether the language used to describe certain embodiments is singular or plural. For example, an embodiment describing the operation of a single computing device is also applicable to an embodiment including multiple instances of a computing device, and vice versa.
[0055] Those skilled in the art will readily appreciate that the example embodiments described above may be implemented with operations in a different order and / or with hardware elements in a configuration different from that disclosed. Therefore, although some embodiments have been described based on these example embodiments, it will be apparent to those skilled in the art that certain modifications, variations, and alternative constructions will be apparent while still within the spirit and scope of the example embodiments.
Claims
1. A multi-point round-robin efficient control method for controlling a host-slave system. Features: The host is connected to the slave via a communication protocol connection line, and the host runs a round-robin program to perform the following operations: Obtain control instructions for all slaves, step S101; The control instruction is sent to a directly connected slave through the host communication interface, and is sequentially sent to other slaves through the slave, step S102; Waiting for and sequentially receiving feedback data from each slave machine to the control instruction, the feedback data including normal feedback data received from the host communication interface and / or abnormal feedback data received from the first configuration port, step S103; The received feedback data is processed to determine whether there is abnormal feedback data, step S104, If it is determined in step S104 that the feedback data received from the slave machine contains abnormal feedback data, the host responds to the source slave machine of the abnormal feedback data, step S105A, and / or generates correct alternative feedback data of the control instruction corresponding to the abnormal feedback data, and replaces the abnormal feedback data with the alternative feedback data, step S105B.
2. The multi-point round-robin efficient control method according to claim 1, Features: The correct substitute feedback data is stored in the cache address of the abnormal feedback data to replace the abnormal feedback data, so that in the subsequent processing judgment step, it is judged that the substitute feedback data has no abnormality, so that the host program can be carried out smoothly.
3. The multi-point round-robin efficient control method according to claim 1, Features: If there is no abnormal feedback data, continue to determine whether all slave data has been received, step S106. If the reception is complete, end a control instruction sending cycle and execute subsequent cycles. If the reception is not complete, return to step S103 and continue to wait for subsequent slave feedback data.
4. The multi-point round-robin efficient control method according to claim 1, Features: Run the slave program on the slave machine to perform the following operations, Receive data from the communication receiving interface of the slave, step S201; Determine whether the received data is a control instruction from the host, step S202; If it is a control instruction from the host, the slave is controlled according to the control instruction, step S221, Then determine whether the slave is the first slave directly connected to the host, step S203, if it is the first slave, send the first feedback data of the slave to the host through the host communication interface, step S204, if it is determined that the slave is not the first slave, wait to receive data from the second slave directly connected, step S205; Then determine whether the data is the second feedback data from other slaves, step S206; at the same time, in the step S202 of determining whether the received data is the control instruction from the host, if it is determined that the received data is not from the host, continue to determine whether the data is the second feedback data from other slaves, step S206; if it is the second feedback data from other slaves, forward the second feedback data to the host, step S261; if it is not the second feedback data from other slaves, that is, the data is neither the control instruction from the host nor the second feedback data, it is assumed that the data is abnormal data, step S262; and then feed back the abnormal feedback data to the first configuration port of the host through the second configuration port of the slave, step S207.
5. The multi-point round-robin efficient control method according to claim 1, Features: Perform a first judgment to determine whether the reception of the feedback data has timed out, step S117; if so, record the abnormality and wait for the replacement feedback data sent by the subsequent slave, step S171; A second judgment is continued to be performed to determine whether the reception of the feedback data has timed out again, step S118, if it has not timed out, then a control instruction sending cycle is terminated and a subsequent cycle is executed.
6. The multi-point round-robin efficient control method according to claim 5, Features: If the result of the first judgment on whether the reception has timed out is not timed out, or the result of the second judgment on whether the reception has timed out is timed out, a judgment is performed on whether there is an error in data processing, step S114. If there is an error, the host responds to the source slave of the abnormal feedback data, and / or generates a correct alternative feedback data of the control instruction corresponding to the abnormal feedback data, and replaces the abnormal feedback data with the alternative feedback data, step S115.
7. The multi-point round-robin efficient control method according to claim 6, Features: For any slave, a slave program is run, and operations after the slave program is executed include receiving data from the host communication interface of the slave, step S211; After receiving the host control command, the response process is started, step S212; The response process includes determining whether the slave itself is a sequential slave, step S213; If yes, the feedback data of the slave is sent, step S214; if no, the feedback data sent by the previous slave is waited, step S215; Determine whether the feedback data received from the previous stage has timed out, step S216; if so, the slave generates a substitute feedback data and sends it to the host, and after sending the substitute feedback data, it is also necessary to send the slave's own data to ensure that the following slave rounds proceed normally, step S217.
8. The control device of the host-slave system, Features: The device comprises at least one processor and at least one memory comprising computer program code, wherein the at least one memory and the computer program code are configured to, together with the at least one processor, enable the device to at least execute the multi-point round-robin efficient control method of any one of claims 1 to 7.
