Communication methods, operating system, and storage media of the working system
By saving and resending task packets on the motherboard and using a one-packet-send-two-packet-response mode, the communication interference problem between the motherboard and the work board is solved, and the communication stability and efficiency are improved.
Patent Information
- Application Number
- CN202111676275.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In the existing technology, the communication interference problem between the motherboard and the motion board cannot be effectively solved, resulting in communication instability and the terminal needing to frequently resend work tasks.
When the motherboard does not receive a feedback packet from the work board, it pre-saves the task packet and resends it, adopting a mode of sending one packet and receiving two replies. Through the collaborative work between the motherboard and the work board, the frequency of resending by the terminal is reduced.
It effectively solved the communication interference problem between the motherboard and the working board, reduced the frequency of terminal retransmission of work tasks, and improved the stability and efficiency of communication.
Smart Images

Figure CN116414754B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a communication method, operating system, and storage medium for a working system. Background Technology
[0002] In a working system comprising a computer, motherboard, and motion board, tasks sent by the computer are forwarded to the motion board via the motherboard. The motion board then executes the task upon receiving it. Normally, the motion board sends a corresponding response to the computer upon receiving the task, operating in a send-response mode. If the computer does not receive a response, it resends the task to the motion board. However, this resending mode only addresses communication instability caused by interference between the computer and motherboard; it cannot resolve potential interference issues between the motherboard and the motion board. Summary of the Invention
[0003] Based on this, this application provides a communication method for a working system, a working system, and a storage medium.
[0004] In a first aspect, this application provides a communication method for a working system, the working system comprising a terminal, a motherboard, and a work board connected in sequence for communication, the method comprising:
[0005] The control terminal sends the task package to the work board via the motherboard, so that the work board executes the task in the task package;
[0006] The control panel returns a corresponding feedback package based on the task package;
[0007] If the motherboard does not receive the corresponding feedback packet from the workboard, it controls the motherboard to resend the saved task packet to the workboard.
[0008] Secondly, this application provides a working system, which includes a terminal, a motherboard, and a work board connected in sequence for communication. The working system also includes a memory and a processor. The memory is used to store a computer program. The processor is used to execute the computer program and, when executing the computer program, implement the communication method of the working system as described above.
[0009] Thirdly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, enables the processor to implement the communication method of the working system described above.
[0010] This application provides a communication method, a working system, and a storage medium for a working system. A control terminal sends a task package to a working board via a motherboard, causing the working board to execute the task in the task package. The control working board returns a corresponding feedback package based on the task package. If the motherboard does not receive the corresponding feedback package from the working board, it resends the saved task package to the working board. Compared to related technologies where the terminal simply resends the task when no feedback package is received, this application's embodiment pre-saves the task package after receiving it from the terminal. When the motherboard does not receive the corresponding feedback package from the working board, it indicates a potential communication problem between the motherboard and the working board. In this case, the motherboard resends the saved task package to the working board. This effectively addresses potential interference issues between the motherboard and the working board, and the increased motherboard retransmission significantly reduces terminal retransmission, thus reducing communication time.
[0011] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0012] Figure 1 This is a flowchart illustrating an embodiment of the communication method of the working system of this application;
[0013] Figure 2 This is a schematic diagram illustrating the communication relationship between the computer, motherboard, and motion board in one embodiment of the communication method of the working system of this application;
[0014] Figure 3 This is a schematic diagram of RAM storage space segmentation in one embodiment of the communication method of the working system of this application;
[0015] Figure 4 This is a schematic diagram of a task packet in one embodiment of the communication method of the working system of this application;
[0016] Figure 5 This is a schematic diagram of the data storage format in the RAM of the motion board in one embodiment of the communication method of the working system of this application;
[0017] Figure 6 This is a schematic diagram of the structure of one embodiment of the working system of this application. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0020] See Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the communication method of the working system of this application. The working system includes a terminal, a motherboard, and a work board connected in sequence for communication. The terminal and the work board are connected and communicate with each other through the motherboard. There can be one or more work boards, but typically there are multiple work boards, each communicating with the motherboard.
[0021] The terminal and the motherboard can be connected via an RS232 serial port, and the motherboard and the work board can be connected via a Controller Area Network (CAN) bus. The software can employ an embedded real-time multi-tasking operating system (RTOS).
[0022] In this embodiment, the terminal includes, but is not limited to, personal computers, laptops, tablets, etc. The motherboard, or main control board, primarily receives data packets (including data packets sent to the motherboard and task packets sent to the work boards) from the terminal and coordinates operations. If a data packet needs to be forwarded to the work board, it is forwarded to the corresponding work board; if the data packet is sent to the motherboard, it does not need to be forwarded. If a data packet is sent to the motherboard requesting it to execute a corresponding task, the motherboard executes the task and can then send a corresponding feedback packet to the terminal. In addition, the motherboard stores the data packets sent to the work boards locally so that it can resend the stored data packets to the work boards if it does not receive a corresponding feedback packet. The work board, or work control board, primarily receives task packets from the motherboard from the terminal and executes the tasks within those packets. The work board can be a motion board, i.e., a motion control board.
[0023] The method includes steps S101, S102, and S103.
[0024] Step S101: The control terminal sends the task package to the work board via the motherboard, so that the work board executes the task in the task package.
[0025] In this embodiment, the terminal sends the task package to the motherboard, and the motherboard then forwards the task package to the work board. When there are multiple work boards, the motherboard forwards the task package to the corresponding work board. After receiving the task package, the work board needs to execute the task in the task package.
[0026] In one embodiment, to distinguish each task packet, each task packet is assigned a number, which can be a unique number. The task packets can be uniquely numbered in an ascending order. Correspondingly, to distinguish the feedback packets corresponding to each task packet, the feedback packets corresponding to each subsequent task packet can also have the same unique number. That is, a task packet and its corresponding feedback packet share the same unique number. For example, task packet 1 - feedback packet 1, task packet 2 - feedback packet 2, ..., task packet n - feedback packet n. In this way, it is possible to determine which task packets have been sent or received, and also which task packet feedback packets have been sent or received.
[0027] In one embodiment, the control terminal sends a task packet from the motherboard to the work board at a predetermined time. Thus, only one task packet is sent at each predetermined time.
[0028] Step S102: The control board returns the corresponding feedback packet based on the task packet.
[0029] After receiving the task packet forwarded by the motherboard, the working board needs to return a corresponding feedback packet in order to respond to the task packet.
[0030] Step S103: If the motherboard does not receive the corresponding feedback packet from the working board, it controls the motherboard to resend the saved task packet to the working board. In this embodiment, if the motherboard does not receive the corresponding feedback packet from the working board, it indicates that there may be a communication problem between the motherboard and the working board. By controlling the motherboard to resend the pre-saved task packet to the working board, the potential communication problem between the motherboard and the working board can be addressed in a targeted manner. Through the above-mentioned motherboard retransmission mechanism (i.e., the motherboard can retransmit the task packet sent by the terminal by pre-saved data), the frequency of terminal retransmission can be greatly reduced, and the communication time for the retransmitted task packet to reach the working board can be reduced.
[0031] In one embodiment, the method further includes steps S104 and S105.
[0032] Step S104: Control the motherboard to return a corresponding feedback packet and save the task packet after receiving the task packet sent by the terminal.
[0033] In this embodiment, after the motherboard receives the task packet sent by the terminal, it also returns a corresponding feedback packet to the terminal when forwarding the task packet to the work board. This can prevent the terminal from resending the task packet and save the task packet locally for future resending.
[0034] Step S102, which involves controlling the motherboard to save the task packet after receiving it from the terminal, may further include: if the motherboard's storage space is full, deleting the task packets with earlier saving times and saving the received task packets to the deleted storage space. This effectively utilizes the motherboard's storage space.
[0035] Step S105: If the terminal does not receive the corresponding feedback packet returned by the motherboard, the control terminal will resend the task packet to the working board via the motherboard.
[0036] If the terminal does not receive the corresponding feedback packet from the motherboard, there may be interference between the terminal and the motherboard, affecting communication between them. Therefore, the control terminal resends the task packet to the working board via the motherboard.
[0037] In one embodiment, step S105, which states that if the terminal does not receive the corresponding feedback packet returned by the motherboard, the control terminal will resend the task packet to the work board via the motherboard, may further include: if the terminal does not receive the corresponding feedback packet returned by the motherboard within a preset number of task packets sent to the motherboard, the control terminal will resend the task packet to the work board via the motherboard.
[0038] If only one task packet is sent at a predetermined time, then under normal circumstances, within the preset number of task packets sent, a corresponding feedback packet should be received. If no corresponding feedback packet is received within the preset number of task packets sent, it indicates that there may be a problem with the communication between the two. Therefore, if the terminal does not receive the corresponding feedback packet, the control terminal will resend the task packet to the working board via the motherboard.
[0039] In one embodiment, a "one-packet send, two-packet reply" pattern is adopted, that is, "one task packet corresponds to two feedback packets". In this case, the feedback packet returned by the workboard includes a first feedback packet and a second feedback packet. The first feedback packet indicates that the task has not been executed, and the second feedback packet indicates that the task has been executed successfully.
[0040] Step S102, the control panel returns a corresponding feedback package based on the task package, which may include sub-steps S1021 and S1022.
[0041] Sub-step S1021: Control the workboard to return to the first feedback package before starting to execute the tasks in the task package.
[0042] Sub-step S1022: Control the workboard to return to the second feedback package after completing the task in the task package.
[0043] Before starting to execute the tasks in the task package, the workboard returns the first feedback packet. This first feedback packet serves as a timely response to the task package, ensuring the current communication channel is clear and ready for execution. After completing the tasks in the task package, the workboard returns the second feedback packet, indicating that the tasks in the package have been completed. Thus, through this "one packet sent, two packets replied" mode, the terminal and motherboard can avoid retransmitting the task package, and both can obtain information about the task package's completion status.
[0044] In one embodiment, the task package includes a first task tag indicating the execution status of the tasks in the task package. The first task tag corresponding to the task package may be set to indicate that the task has not been executed, the task has been executed but not completed, or the task has been completed.
[0045] Specifically, when a task in the task package is not executed or is executed but not completed, the first task tag is assigned a value of 0; when a task in the task package is completed, the first task tag is assigned a value of 1.
[0046] The task package also includes a second task tag indicating the execution status of the tasks in the task package. At this time, sub-step S1022, which controls the workboard to return to the second feedback package after completing the tasks in the task package, may also include sub-steps S10221 and S10222.
[0047] Sub-step S10221: After the task package is executed by the workboard, the value of the first task tag corresponding to the task package is assigned to the value of the second task tag corresponding to the task package.
[0048] Sub-step S10222: Control the workboard to generate and return the second feedback package corresponding to the task package.
[0049] In one embodiment, the method further includes step S106.
[0050] Step S106: Within the preset number of task packages received by the workboard, query whether the workboard returns the first feedback package corresponding to the task package and whether the first task tag corresponding to the task package is set to the execution status of the task package. If it is found that the workboard does not return the first feedback package corresponding to the task package, and the first task tag corresponding to the task package is set to indicate that the task has not been executed, the task has been executed but not completed, or the task has been completed, then control the workboard to return the first feedback package corresponding to the task package.
[0051] In this embodiment, within the preset number of task packets received by the workboard, if it is found that the workboard has not returned the first feedback packet corresponding to the task packet, regardless of the execution status of the task in the task packet as set by the first task tag corresponding to the task packet, the workboard is controlled to return the first feedback packet corresponding to the task packet. This minimizes the need for the motherboard to resend the task packet to the workboard, thus reducing the communication load between the motherboard and the workboard.
[0052] In one embodiment, the method further includes step S107.
[0053] Step S107: Within the preset number of task packages received by the workboard, query whether the workboard returns the second feedback package corresponding to the task package and the execution status of the task package set by the first task tag and the second task tag corresponding to the task package. If it is found that the first task tag and the second task tag corresponding to the task package are both set to the task being completed, and the workboard does not return the second feedback package corresponding to the task package, then control the workboard to return the second feedback package corresponding to the task package.
[0054] In this embodiment, within the preset number of task packages received by the workboard, when it is found that both the first task tag and the second task tag corresponding to the task package are set to "task completed" (i.e., the first task tag is assigned a value of 1 and the second task tag is assigned a value of 1), but the workboard does not return the second feedback package corresponding to the task package, the workboard is controlled to return the second feedback package corresponding to the task package. This helps the motherboard obtain the task package's completion status.
[0055] In one embodiment, the method further includes steps S108 and S109.
[0056] Step S108: Within the preset number of task packages received by the workboard, query the execution status of the task package corresponding to the first task tag and the second task tag. If the first task tag corresponding to the task package is set to indicate that the task has been executed but not completed and the second task tag is set to indicate that the task has been executed but not completed, then control the workboard to repeatedly execute the task corresponding to the task package.
[0057] Step S109: Query whether the workboard returns the second feedback package corresponding to the task package and the execution status of the task package set by the first task tag and the second task tag corresponding to the task package. If it is found that the first task tag and the second task tag corresponding to the task package are both set to the task not executed, and the workboard does not return the second feedback package corresponding to the task package, control the workboard to return the corresponding second feedback package after completing the task in the task package.
[0058] In this embodiment, if the workboard receives a preset number of task packages, and it is found that the first task tag corresponding to the task package is set to indicate that the task has been executed but not completed, and the second task tag is set to indicate that the task package has been executed but not completed, it means that although the task in the task package has been executed, it has not been completed. Therefore, the workboard is controlled to repeatedly execute the task corresponding to the task package. In this way, it can be ensured that the task package is completed.
[0059] If both the first task tag and the second task tag corresponding to the task package are set to "task not executed," and the workboard does not return the second feedback package corresponding to the task package, the workboard is controlled to complete the tasks in the task package and then return the corresponding second feedback package. This prevents tasks in the task package from being missed or not executed, helping the motherboard to obtain the completion status of the task package.
[0060] In one embodiment, the method further includes steps S110, S111, S112, S113, or S114.
[0061] Step S110: Control the workboard to save the task package after receiving it.
[0062] Step S111: Determine whether the number of the current task package received by the workboard is the same as the number of the task package saved by the workboard.
[0063] Step S112: If they are not the same, it is determined that the task in the current task package has not been executed, and the control board is used to execute the task in the current task package.
[0064] Step S113: If they are the same, and both the first task tag and the second task tag corresponding to the task package are set to "task not executed", then control the workboard to execute the task in the current task package.
[0065] Alternatively, in step S113: if they are the same, and both the first task tag and the second task tag corresponding to the task package are set to the task being completed, then it is determined that the task in the current task package will no longer be executed.
[0066] In this embodiment, the workboard saves the received task packages locally, and each task package has a unique number. When the workboard receives the current task package, it compares the number of the current task package with the code of the previously saved task package. If the number of the current task package is different from the number of the previously saved task package, it means that the current task package is a new task package that has not been executed. Therefore, the workboard is controlled to execute the tasks in the current task package.
[0067] If the current task package number is the same as the number of a previously saved task package, it indicates that the current task package is a resentment of a previously saved task package. Whether to execute the current task package requires confirmation that the previously saved task package has already been completed. If both the first and second task tags corresponding to the previously saved task package are set to "task not executed," then it is determined that the tasks in the previously saved task package have not been executed, and the control panel will execute the tasks in the current task package. If both the first and second task tags corresponding to the previously saved task package are set to "task completed," then it is determined that the tasks in the previously saved task package have been completed, and the tasks in the current task package will not be executed.
[0068] By using the above methods, we can avoid repeatedly executing tasks in the task package.
[0069] In step S110, where the control board saves the task package after receiving it, the method may further include: if the storage space of the control board is full, the control board deletes the task packages with the earliest saving times and saves the received current task package to the deleted storage space. This effectively utilizes the storage space of the control board.
[0070] In one embodiment, the method further includes steps S114, S115, and S116.
[0071] Step S114: Control the motherboard to save the task package after receiving it.
[0072] Step S115: Determine whether the number of the current task package received by the motherboard is the same as the number of the task package saved by the motherboard.
[0073] Step S116: If they are not the same, it is determined that the motherboard did not send the task package to the work board, and the motherboard is controlled to send the task package to the work board.
[0074] In this embodiment, the motherboard also stores received task packets. It compares the number of the currently received task packet with the number of the task packet stored on the motherboard. If they are the same, it means the motherboard has already received the task packet and forwarded it to the work board. If they are different, it means the task packet is new, and therefore the motherboard needs to send the task packet to the work board. This method ensures that the motherboard sends new task packets to the work board in a timely manner, while also preventing the motherboard from repeatedly sending previously sent task packets to the work board.
[0075] In one embodiment, step S103, which states that if the motherboard does not receive the corresponding feedback packet returned by the workboard, then controlling the motherboard to resend the saved task packet to the workboard, may further include: if the motherboard does not receive the corresponding first feedback packet returned by the workboard, then controlling the motherboard to resend the saved task packet to the workboard.
[0076] In one embodiment, step S101, whereby the control terminal sends a task package to the work board via the motherboard, may include: the control terminal sending a task package to the work board via the motherboard at a predetermined time.
[0077] And / or, step S103, the step of controlling the motherboard to resend the saved task package to the workboard if the motherboard does not receive the corresponding feedback packet returned by the workboard, may further include: if the motherboard does not receive the corresponding feedback packet returned by the workboard within a preset number of task packages forwarded to the workboard, the step of controlling the motherboard to resend the saved task package to the workboard.
[0078] Step S105, the step of controlling the terminal to resend the task package to the working board via the motherboard if the terminal does not receive the corresponding feedback packet returned by the motherboard, may further include: if the terminal does not receive the corresponding feedback packet returned by the motherboard within a preset number of task packages sent to the motherboard, the control terminal to resend the task package to the working board via the motherboard.
[0079] If only one task packet is sent at a predetermined time, then under normal circumstances, within the preset number of task packets sent, a corresponding feedback packet should be received. If no corresponding feedback packet is received within the preset number of task packets sent, it indicates that there may be a problem with the communication between the two. Therefore, if the mainboard does not receive the corresponding feedback packet, it controls the mainboard to resend the saved task packet to the working board.
[0080] The application of the method of this application embodiment in one embodiment is described in detail below.
[0081] like Figure 2As shown, the terminal uses a personal computer as an example, the motherboard is represented by the Main board, and the work boards are represented by multiple motion boards (Motor boards). Task packets are represented by Send_Data_id(n) (id increments), the first feedback packet corresponding to the task packet is represented by Ack_Data_id(n), the second feedback packet corresponding to the task packet is represented by Finish_Data_id(n), the task in the task packet is represented by DoTask_id(n), the first task tag of the task packet is represented by DoTaskFlag_id(n), the second task tag of the task packet is represented by DoTaskStatus_id(n), and the status of the task in the task packet is represented by Status. The computer communicates with the motherboard via RS232 serial port, and the motherboard connects to the multiple motion boards via CAN communication. The software uses an embedded real-time multitasking operating system (RTOS).
[0082] Step S1: The computer (PC) sends Send_Data_id(n) to the Main board.
[0083] Step S2: If the PC does not receive the Ack_Data_id(n) response packet or the Finish_Data_id(n) response packet or the timeout occurs, the PC can resend Send_Data_id(n);
[0084] Step S3: The Main board stores the received Send_Data_id(n) from the PC in its local Random Access Memory (RAM) (for retransmission in case of packet loss). If the Main board does not receive an Ack_Data_id(n) response packet within a predetermined time range after sending Send_Data_id(n), the Main board will retransmit the Send_Data_id(n) stored in RAM (without needing to be sent by the PC). This is done to avoid retransmission via the PC, allowing direct transmission between the boards and preventing retransmissions between the computer and the Main board from prolonging communication time (serial communication is susceptible to interference and is relatively slow).
[0085] Step S4: After receiving Send_Data_id(n), the Motor board immediately replies with the first packet Ack_Data_id(n) (Status = 0) to confirm that the current communication channel is intact. Then, it executes the current task DoTask_id(n) to be executed in Send_Data_id(n): when the task is completed, the task label DoTaskFlag_id(n) is set to 1; when the current task is not executed, the task label DoTaskFlag_id(n) is set to 0; when the task is executed but not completed, only half completed, the task label DoTaskFlag_id(n) is set to 0. After execution, DoTaskFlag_id(n) is assigned to DoTaskStatus_id(n), and the second packet Finish_Data_id(n) (Status1) is sent back.
[0086] Step S5: The Motor board stores the Send_Data_id(n) forwarded by the Main board in its local RAM. Within a predetermined time range after receiving the Send_Data_id(n), it compares the newly sent Send_Data_id(n) from the Main board with the unique number of the Send_Data_id(n) stored in RAM each time to know whether the current task has been executed, so as to avoid the risk of repeated execution caused by resending.
[0087] Step S6: If there is no identical Send_Data_id(n), it means that the task in this task package has not been executed, all previous tasks have been completed and the communication return packet is normal. Store the current task package, send an Ack_Data_id(n) return packet, and directly execute DoTask_id(n). After the task is completed, set DoTaskFlag_id(n) = 1. After the execution is completed, assign DoTaskFlag_id(n) to DoTaskStatus_id(n) = 1, and send a Finish_Data_id(n) return packet.
[0088] Step S7: DoTaskStatus_id(n) is recorded through the task tag DoTaskFlag_id(n), which can be used to distinguish whether Ack_Data_id(n) has not been returned, Finish_Data_id(n) has not been returned, or if the communication return packets are normal, it can be ignored and execution can continue. This prevents the executed task from being re-executed when resending messages. Within the predetermined time frame after receiving Send_Data_id(n), if DoTaskStatus_id(n) = 0 and DoTaskFlag_id(n) = 0, it indicates that Ack_Data_id(n) may not have been returned. In this case, the Motor board will execute Ack_Data_id(n) to return the packet, execute task DoTask_id(n), and after execution, DoTaskFlag_id(n) = 1, completing the assignment to DoTaskStatus_id(n) = 1, and then send a Finish_Data_id(n) packet. If DoTaskStatus_id(n) = 0 or not equal to 1, and DoTaskFlag_id(n) = 1, and Finish_Data_id(n) is returned, only the Finish_Data_id(n) packet will be returned. If Finish_Data_id(n) has been returned, nothing needs to be executed, indicating that the communication is intact.
[0089] Among them, such as Figure 3 As shown, both the Main board and the Motor board allocate a certain amount of RAM storage space, and divide the RAM space into two segments, the beginning and the end, and store data according to time periods. When the storage space is full, the space with the earliest storage time is cleared, and then the RAM space is used cyclically.
[0090] See Figure 3 and Figure 4 Taking a 16-byte (Byte) task packet Send_Data and allocating 4KB (2KB) of RAM (divided into first 2KB and last 2KB) as an example, multiple Send_Data_id(n) packets (2*1024 / 16B = 128 packets) are stored. The Send_Data_id(n) packets are stored in a 2KB-first, 2KB-last manner. Send_Data_id(n) is stored in the first 2KB. When the first 2KB is almost full, the last 2KB is deleted (because the Send_Data_id(n) stored in the last 2KB has already been executed). If the last 2KB is currently in use and is about to be full, the first 2KB is deleted, thus reusing the 4KB space. The Motor board can also store feedback packets and related data (such as task, first task tag, second task tag, etc.). The data format of the feedback packets and related data stored in RAM is as follows: Figure 5As shown.
[0091] See Figure 6 , Figure 6 This is a schematic diagram of the structure of an embodiment of the working system of this application. The working system 100 includes a terminal 1, a motherboard 2, and a work board 3 connected in sequence for communication. The working system 100 also includes a memory 10 and a processor 20. The memory 10 is used to store computer programs; the processor 20 is used to execute the computer programs and, when executing the computer programs, implements the communication method of the working system as described in any of the above claims. For detailed descriptions of related content, please refer to the relevant content on the communication method of the working system described above, which will not be repeated here.
[0092] The memory 10 and processor 20 are connected via a bus. There can be multiple memories 10 and processors 20, which can be respectively located in terminal 1, motherboard 2, and workboard 3. Motherboard 2 and workboard 3 can be integrated together to form a device, and multiple memories 10 and processors 20 can be respectively located in terminal 1 and the device.
[0093] The processor 20 can be a microcontroller unit, a central processing unit, or a digital signal processor, etc.
[0094] The memory 10 can be a Flash chip, read-only memory, disk, optical disk, USB flash drive, or portable hard drive, etc.
[0095] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the communication method of the operating system as described in any of the preceding claims. For detailed descriptions of the related content, please refer to the relevant content regarding the communication method of the aforementioned operating system; further details will not be repeated here.
[0096] The computer-readable storage medium can be an internal storage unit of the aforementioned operating system, such as a hard disk or memory. Alternatively, it can be an external storage device, such as an external hard disk, smart memory card, secure digital card, flash memory card, etc.
[0097] It should be understood that the terminology used in this application specification is for the purpose of describing particular embodiments only and is not intended to limit the application.
[0098] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0099] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A communication method for a working system, characterized in that, The working system includes a terminal, a motherboard, and a work board that are sequentially connected in communication; the method includes: The control terminal sends a task package to the work board via the motherboard, so that the work board executes the task in the task package. The task package includes a first task tag indicating the execution status of the task in the task package and a second task tag indicating the execution status of the task in the task package. The first task tag corresponding to the task package can be set to indicate that the task has not been executed, the task has been executed but not completed, or the task has been completed. The control panel returns a first feedback packet before starting to execute the tasks in the task package, the first feedback packet indicating that the task has not been executed; After the task package is executed by the workboard, the value of the first task tag corresponding to the task package is assigned to the value of the second task tag corresponding to the task package, and the workboard is controlled to generate and return the second feedback package corresponding to the task package. The second feedback package indicates that the task has been completed. If the motherboard does not receive the corresponding feedback packet from the workboard, it controls the motherboard to resend the saved task packet to the workboard.
2. The method according to claim 1, characterized in that, The method further includes: Within the preset number of task packages received by the workboard, it is queried whether the workboard returns the first feedback package corresponding to the task package and whether the first task tag corresponding to the task package is set to the execution status of the task package. If it is found that the workboard does not return the first feedback package corresponding to the task package, and the first task tag corresponding to the task package is set to indicate that the task has not been executed, the task has been executed but not completed, or the task has been completed, then the workboard is controlled to return the first feedback package corresponding to the task package.
3. The method according to claim 1, characterized in that, The method further includes: Within the preset number of task packages received by the workboard, it is queried whether the workboard returns the second feedback package corresponding to the task package and the execution status of the task package set by the first task tag and the second task tag corresponding to the task package. If it is found that the first task tag and the second task tag corresponding to the task package are both set to the task being completed, and the workboard does not return the second feedback package corresponding to the task package, then the workboard is controlled to return the second feedback package corresponding to the task package.
4. The method according to claim 1, characterized in that, The method further includes: Within the preset number of task packages received by the workboard, the execution status of the task package is queried by the first task tag and the second task tag corresponding to the task package. If the first task tag corresponding to the task package is set to indicate that the task has been executed but not completed and the second task tag is set to indicate that the task has been executed but not completed, then the workboard is controlled to repeatedly execute the task corresponding to the task package. The system queries whether the workboard returns the second feedback package corresponding to the task package and whether the first task tag and the second task tag corresponding to the task package are set to the execution status of the task package. If the query finds that the first task tag and the second task tag corresponding to the task package are both set to the task not executed and the workboard does not return the second feedback package corresponding to the task package, the system controls the workboard to return the corresponding second feedback package after completing the task in the task package.
5. The method according to claim 1, characterized in that, The method further includes: The control panel is instructed to save the task package after receiving it. Determine whether the number of the current task package received by the workboard is the same as the number of the task package saved by the workboard; If they are different, it is determined that the task in the current task package has not been executed, and the workboard is controlled to execute the task in the current task package.
6. The method according to claim 5, characterized in that, After determining whether the number of the current task package received by the workboard is the same as the number of the task package saved by the workboard, the process further includes: If they are the same, and both the first task tag and the second task tag corresponding to the task package are set to "task not executed", then control the workboard to execute the task in the current task package; or, If they are the same, and both the first task tag and the second task tag corresponding to the task package are set to "task completed", then it is determined that the task in the current task package will no longer be executed.
7. The method according to claim 1, characterized in that, The method further includes: The motherboard is controlled to save the task package after receiving it; Determine whether the number of the current task package received by the motherboard is the same as the number of the task package stored by the motherboard; If they are different, it is determined that the motherboard did not send the task package to the work board, and the motherboard is controlled to send the task package to the work board.
8. The method according to any one of claims 5-7, characterized in that, Both the task package and the corresponding feedback package include a unique number, and the unique number is determined by incrementing the number of the task package and the corresponding feedback package.
9. The method according to claim 1, characterized in that, The control terminal sends the task packet to the work board via the motherboard, including: The control terminal sends a task packet from the motherboard to the work board at a predetermined time; and / or, If the motherboard does not receive the corresponding feedback packet from the workboard, the motherboard is controlled to resend the saved task packet to the workboard, including: If the motherboard does not receive the corresponding feedback packet from the workboard within the preset number of task packets to be forwarded to the workboard, it controls the motherboard to resend the saved task packet to the workboard.
10. The method according to claim 1, characterized in that, The method further includes: The motherboard is controlled to return a corresponding feedback packet and save the task packet upon receiving a task packet from the terminal. If the terminal does not receive the corresponding feedback packet from the motherboard, the control terminal will resend the task packet to the working board via the motherboard.
11. A working system, characterized in that, The working system includes a terminal, a motherboard, and a work board that are connected in sequence for communication. The working system also includes a memory and a processor. The memory is used to store a computer program. The processor is used to execute the computer program and, when executing the computer program, implement the communication method of the working system as described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to implement the communication method of the operating system as described in any one of claims 1-10.
Citation Information
Patent Citations
Method, system and device for sending and receiving data
CN101651706A
Duplex communication information transmission method, system and application
CN113590526A
Data download method and system
WO2013178067A1
