Industrial synchronous control system and control method thereof
The industrial synchronous control system, which combines star topology connection with CAN bus/CAN_FD bus, solves the problems of bus protocol data volume limitation and fault impact on large-area communication, and realizes the improvement of system real-time performance and synchronization, as well as stability and fault detection.
Patent Information
- Application Number
- CN202511202947.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-08-27
AI Technical Summary
In existing industrial control systems, the limited data volume of bus protocols leads to poor synchronization of actuators, high uncertainty in control delay, and a single fault can cause widespread communication anomalies, making fault diagnosis difficult.
The industrial synchronous control system adopts a star topology connection method and combines CAN bus and CAN_FD bus. The bus controller generates and synchronously sends CAN_FD data packets, the actuator parses and executes tasks, ensuring the integrity and synchronization of data packets. The total waiting time and response time are set to achieve full-duplex communication.
The system's real-time performance and synchronization have been improved, stability has been enhanced, a failure in a single control unit does not affect other units, the actuators have high task synchronization, and fault detection is timely.
Smart Images

Figure CN120722816B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of process control technology, and in particular to an industrial synchronous control system and its control method. Background Technology
[0002] Currently, flow process control systems rely on online measurement terminals to measure relevant values. These terminals then send the data to a host computer, which calculates the control input for each zone. This control input is then distributed to the corresponding actuators via a fieldbus. However, due to the limited data capacity of a single data frame in the bus protocol, instructions are typically issued to only a single actuator at a time. Different actuators on the same bus receive their instructions at different times, resulting in poor system synchronization. Even with a multi-stage transmission method, only actuators can execute the same instruction simultaneously, but in practice, each actuator's control input differs. Furthermore, when data is being transmitted on the bus, the host computer cannot immediately issue control data, leading to uncertainty in control delays.
[0003] Furthermore, in order to ensure stable communication, the current fieldbus requires all actuators to be connected to the bus in a serial manner. When a single actuator fails to communicate, it will cause the communication of actuators downstream of that node to also be abnormal, resulting in a large-scale system anomaly and making troubleshooting difficult.
[0004] From the perspective of closed-loop control, a good closed-loop control system should have a fixed time delay between the control output (the host computer sending the control quantity) and the execution of the output action (the actuator controlling the valve), which is beneficial for closed-loop control calculation.
[0005] Patent application CN119717737A discloses a multi-axis, multi-slave industrial control system, comprising: a host computer; a master station, which communicates with the host computer via an Ethernet transmission control protocol; and multiple extended slave stations, each independently connected to the master station and communicating with the master station using the CAN_FD communication protocol. The master station and extended slave stations each include a multi-axis drive unit, and at least the master station includes an I / O control unit, enabling the extended slave stations to communicate with the master station using only a single CAN_FD transceiver chip. In this method, the system employs a single master station structure. Structurally, the slave stations use a bus topology; execution commands are sent from the host computer to the master station, which then sends single-frame data to different slave stations and motors via CAN_FD data packets. This makes it impossible to synchronize the operation of all controlled motors within the system.
[0006] Patent CN213182359U discloses a universal RS232-CAN communication conversion board, belonging to the field of communication system technology. It includes a power supply module, a microcontroller module, an RS232 interface module, and a CAN bus interface module. The power supply module is connected to and supplies power to the microcontroller module, RS232 interface module, and CAN bus interface module. One end of the RS232 interface module is connected to the UART controller interface of the microcontroller module, and the other end is connected to a functional control module with an RS232 interface. One end of the CAN bus interface module is connected to the CAN controller interface of the microcontroller module, and the other end is connected to the CAN bus. Using the power supply module, microcontroller module, RS232 interface module, and CAN bus module, RS232-CAN communication conversion is achieved. This method converts between the two communication protocols through software. However, when applied to a single-bus system, it can only support a maximum of 16 nodes. It also cannot synchronize the operation of all controlled motors within the system. Summary of the Invention
[0007] This invention provides an industrial synchronous control system and its control method to improve the synchronization and real-time performance of industrial control systems.
[0008] An industrial synchronous control system includes a host computer and at least one control unit; the control unit includes a bus controller and at least one actuator, and each actuator in each control unit is connected to the bus controller in the control unit via a star topology through a CAN bus and a CAN_FD bus.
[0009] The host computer generates task instructions and synchronously sends them to all bus controllers. Each bus controller prioritizes the execution of the task instructions, parses them, generates CAN_FD data packets, and synchronously sends the CAN_FD data packets to all actuators within the control unit via the CAN_FD bus. The CAN_FD data packets within the same control unit are identical. Each actuator within the control unit parses the CAN_FD data packets and determines whether to execute the corresponding task. Simultaneously, the actuator that needs to execute the task generates a CAN response data packet and sends it to the bus controller within the control unit via the CAN bus.
[0010] Furthermore, the bus controller is connected to the host computer via a network. The bus controller is equipped with a CAN bus interface and a CAN_FD bus interface. Each actuator is connected to the CAN bus interface of the bus controller in its respective control board unit via the CAN bus, and each actuator is connected to the CAN_FD bus interface of the bus controller in its respective control unit via the CAN_FD bus.
[0011] Furthermore, the host computer is used to determine the execution mechanism and its task parameter information based on the task information, generate the task instructions, and send them to all bus controllers after UDP protocol conversion.
[0012] Furthermore, when each bus controller receives the task instruction, it detects whether the CAN_FD bus is transmitting data. If the CAN_FD bus is transmitting data, it terminates data transmission on the CAN_FD bus and sets the CAN_FD bus to idle. If the CAN_FD bus is not transmitting data, or after terminating data transmission on the CAN_FD bus, the bus controller parses and converts the task instruction to generate the CAN_FD data packet.
[0013] Furthermore, the bus controller is also used to parse the task instructions and determine the execution mechanism within the control unit where the bus controller is located that needs to perform the task;
[0014] The bus controller is also used to generate a task control data packet based on the node address sequence number and task parameter information of the actuators that need to perform tasks within its control unit. The task control data packet includes an execution field corresponding to the node address sequence number of all actuators within the control unit where the bus controller is located. The execution field corresponding to the node address sequence number of the actuator that needs to perform a task is the corresponding task parameter information, and the execution field corresponding to the node address sequence number of the actuator that is not performing a task is empty. The task control data packet is then converted to a protocol to generate the CAN_FD data packet.
[0015] Furthermore, the actuators within each control unit are also used to determine whether the currently received CAN_FD data packet is complete. If the currently received CAN_FD data packet is incomplete, the incomplete CAN_FD data packet is discarded.
[0016] If the currently received CAN_FD data packet is complete, each actuator within the same control unit reads the corresponding execution field from the CAN_FD data packet according to its own node address sequence number. If the corresponding execution field is empty, no task is executed; if the corresponding execution field contains the corresponding task parameter information, the corresponding task is executed according to the task parameter information.
[0017] Furthermore, the bus controller is also configured to set a total waiting time based on the number of actuators that need to perform tasks within the control unit, and to set a response time for each actuator that needs to perform tasks; when the corresponding response time is reached, it receives the CAN response data packet sent by the corresponding actuator through the CAN bus; when the total waiting time is reached, it converts the received CAN response data packet to UDP protocol and sends it to the host computer.
[0018] Furthermore, the bus controller is also used to initiate status read commands and synchronously send the status read commands to each actuator in the control unit via the CAN_FD bus;
[0019] The bus controller is also used to set the total waiting time based on the number of actuators in the control unit, and to set the response time for each actuator;
[0020] After receiving the status read command, the actuators within the same control unit generate a status response data packet based on their own status information, and send the status response data packet to the bus controller within the control unit via the CAN bus according to the response time.
[0021] The bus controller is also used to determine whether there are any disconnected actuators in the control unit based on the number of received status response data packets;
[0022] If any actuators are offline, the node address sequence number of the offline actuator is determined based on the node address sequence number of the actuator in each status response data packet, and an alarm message is generated and sent to the host computer.
[0023] Furthermore, the node address numbers of the actuators within the same control unit are arranged in ascending order, and the response time of each actuator is determined based on the magnitude of its own node address number.
[0024] A control method for an industrial synchronization system, applied to the aforementioned system, the method comprising:
[0025] The host computer generates task instructions and synchronously sends them to all bus controllers;
[0026] Each bus controller prioritizes executing the task instruction, parses the task instruction and generates a CAN_FD data packet, and synchronously sends the CAN_FD data packet to all actuators in the control unit through the CAN_FD bus. The CAN_FD data packets in the same control unit are identical.
[0027] The actuators within each control unit parse the CAN_FD data packet and determine whether to execute the corresponding task. Meanwhile, the actuators that need to execute the task generate a CAN response data packet and send it to the bus controller within their respective control unit via the CAN bus.
[0028] Furthermore, the host computer generates task instructions and synchronously sends them to all bus controllers, including:
[0029] The host computer determines the executor and its task parameters based on the task information, generates the task instructions, performs UDP protocol conversion, and then sends them to all bus controllers.
[0030] Furthermore, each bus controller prioritizes executing the task instructions, parses the task instructions, and generates CAN_FD data packets, including:
[0031] When the bus controller receives the task instruction, it checks whether the CAN_FD bus is transmitting data.
[0032] If the CAN_FD bus is transmitting data, then stop transmitting data on the CAN_FD bus and set the CAN_FD bus to idle.
[0033] If the CAN_FD bus is not transmitting data, or after the data transmission on the CAN_FD bus has ended, the bus controller parses and converts the task instruction to generate the CAN_FD data packet.
[0034] Further, the bus controller parses and converts the task instructions to generate the CAN_FD data packet, including:
[0035] The task instructions are parsed to determine the execution mechanism within the control unit where the bus controller is located that needs to perform the task;
[0036] The bus controller generates a task control data packet based on the node address sequence number and task parameter information of the actuators that need to perform tasks within its control unit. The task control data packet includes an execution field corresponding to the node address sequence number of all actuators within the control unit where the bus controller is located. The execution field corresponding to the node address sequence number of the actuator that needs to perform a task is the corresponding task parameter information, while the execution field corresponding to the node address sequence number of the actuator that has not performed a task is empty.
[0037] The task control data packet is converted to a protocol to generate the CAN_FD data packet.
[0038] Furthermore, the actuators within each control unit parse the CAN_FD data packet and determine whether to execute the corresponding task, including:
[0039] The actuators within each control unit determine whether the currently received CAN_FD data packet is complete. If the currently received CAN_FD data packet is incomplete, the incomplete CAN_FD data packet is discarded.
[0040] If the currently received CAN_FD data packet is complete, each actuator within the same control unit reads the corresponding execution field from the CAN_FD data packet according to its own node address sequence number. If the corresponding execution field is empty, no task is executed; if the corresponding execution field contains the corresponding task parameter information, the corresponding task is executed according to the task parameter information.
[0041] Furthermore, after the bus controller synchronously sends CAN_FD data packets to all actuators within its control unit via the CAN_FD bus, it also includes:
[0042] Each bus controller sets the total waiting time based on the number of actuators within its control unit that need to perform tasks, and sets a response time for each actuator that needs to perform a task;
[0043] When the corresponding response time is reached, the CAN response data packet sent by the corresponding actuator is received via the CAN bus;
[0044] When the total waiting time is reached, the received CAN response data packet is converted to UDP protocol and then sent to the host computer.
[0045] Furthermore, the method also includes:
[0046] The bus controller initiates a status read command, which is then synchronously sent to each actuator within the control unit via the CAN_FD bus.
[0047] The bus controller sets the total waiting time based on the number of actuators within its control unit, and sets a response time for each actuator;
[0048] After receiving the status read command, the actuators within the same control unit generate a status response data packet based on their own status information, and send the status response data packet to the bus controller within the control unit via the CAN bus according to the response time.
[0049] The bus controller determines whether there are any disconnected actuators within its control unit based on the number of received status response data packets.
[0050] If any actuators are offline, the node address sequence number of the offline actuator is determined based on the node address sequence number of the actuator in each status response data packet, and an alarm message is generated and sent to the host computer.
[0051] Furthermore, the node address numbers of the actuators within the same control unit are arranged in ascending order, and the response time of each actuator is determined based on the magnitude of its own node address number.
[0052] The industrial synchronous control system and control method provided by this invention have at least the following beneficial effects:
[0053] (1) Through the coordinated cooperation of the host computer and the bus controllers and actuators in each control unit, the combination of network communication, CAN_FD bus communication and CAN bus communication, and the structural design of CAN_FD data packets, the time spent from the host computer issuing the task instruction to the corresponding actuator action can be fixed, and the time spent in each actuator is also the same, which greatly improves the real-time performance and synchronization of the system execution.
[0054] (2) The system structure is hierarchical, independent, and the wiring method is clear, thereby improving stability; the original single structure is divided into several control units. If a single control unit fails, it will not affect the other control units. If a single actuator in a control unit fails, it will not affect the operation of other actuators in the control unit.
[0055] (3) By combining network communication, CAN_FD bus communication and CAN bus communication, the task instructions sent by the host computer can reach each bus controller synchronously. After parsing, each bus controller can send the CAN_FD data packet synchronously to the actuator in the control unit through the CAN_FD bus. After parsing, the actuator executes the corresponding task. The CAN_FD bus is only used for the bus controller to send data, and the CAN bus is only used for the actuator to send back data. In this way, the bus controller does not need to wait for the transmission, and the network communication used by the host computer is full-duplex and does not need to wait, thereby ensuring the synchronization of the tasks executed by each actuator.
[0056] (4) The CAN_FD data packets generated within the same control unit are identical and are synchronously sent to each actuator within the control unit. The parsing process of each actuator is identical, further ensuring the synchronization of the tasks performed by each actuator. Attached Figure Description
[0057] Figure 1 This is a schematic diagram of an embodiment of the industrial synchronous control system provided by the present invention.
[0058] Figure 2This is a flowchart of one embodiment of the industrial synchronization control method provided by the present invention.
[0059] Figure 3 This is a flowchart of one embodiment of the bus controller parsing task instructions in the industrial synchronization control method provided by the present invention.
[0060] Figure 4 This is a flowchart of one embodiment of the industrial synchronization control method provided by the present invention, in which the bus controller generates CAN_FD data packets.
[0061] Figure 5 This is a flowchart of one embodiment of the industrial synchronization control method provided by the present invention, in which the actuator parses and judges the CAN_FD data packet.
[0062] Figure 6 A flowchart of another embodiment of the industrial synchronization control method provided by the present invention. Detailed Implementation
[0063] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0064] refer to Figure 1 In some embodiments, an industrial synchronous control system is provided, including a host computer 1 and at least one control unit 2; the control unit 2 includes a bus controller 3 and at least one actuator 4, and each actuator 4 in each control unit is connected to the bus controller 3 in the control unit via a star topology through a CAN bus and a CAN_FD bus.
[0065] The host computer 1 is used to generate task instructions and synchronously send them to all bus controllers 3. Each bus controller 3 is used to prioritize the execution of the task instructions, parse the task instructions and generate CAN_FD data packets, and synchronously send the CAN_FD data packets to all actuators 4 in the control unit 2 through the CAN_FD bus. The CAN_FD data packets in the same control unit 2 are the same. Each actuator 4 in the control unit is used to parse the CAN_FD data packets and determine whether to execute the corresponding task. At the same time, the actuator 4 that needs to execute the task generates a CAN response data packet and sends it to the bus controller 3 in the control unit through the CAN bus.
[0066] Furthermore, the bus controller 3 is connected to the host computer 1 via a network. The bus controller 3 is equipped with a CAN bus interface and a CAN_FD bus interface. Each actuator 4 is connected to the CAN bus interface via the CAN bus, and each actuator 4 is connected to the CAN_FD bus interface via the CAN_FD bus.
[0067] Specifically, the host computer 1 is used to monitor the status of each actuator, display data information, receive data from the measurement end, and provide closed-loop control algorithms.
[0068] Bus controller 3 is equipped with a 32-bit MCU with a main frequency of 648MHz. It has a CAN_FD bus interface, a CAN bus interface and a 1000Mbps network port, and is responsible for the data packet parsing, conversion and forwarding functions between the actuator and the host computer.
[0069] The actuator 4 is equipped with a 32-bit MCU with a main frequency of 72MHz, and has a CAN_FD bus interface and a CAN bus interface, which can receive commands and control motors and other devices.
[0070] The number of actuators 4 within a control unit 2 is related to the amount of data that the CAN_FD bus communication protocol can carry. A CAN_FD data packet can carry a maximum of 64 bytes of data. Each actuator uses 3 bytes of data, leaving 4 bytes as a margin. Therefore, the number of actuators within a control unit can be set from 1 to 20.
[0071] Different control units 2 are connected to the host computer in parallel, and there is no communication between control units 2. The serial number, network communication IP address, and network port number of control unit 2 are determined by performing a DIP switch operation on the bus controller 3 within control unit 2. Simultaneously, the node address number of actuator 4 is determined by performing a DIP switch operation on actuator 4. Within a single control unit 2, actuator 4 is connected to the bus controller 3 in a star topology, and there is no communication between actuators 4. A failure in one control unit does not affect the remaining control units, and a failure in one actuator does not affect the remaining actuators.
[0072] Within control unit 2, multiple actuators that were conventionally connected to the serial bus are replaced with those connected to the parallel bus controller 3, forming an independent control unit 2. Control unit 2 forms a two-level star topology. According to the CAN_FD bus communication protocol, the maximum data length that can be carried in a single data packet is 64 bytes. Each actuator is allocated 3 bytes of data, with the data positions arranged according to the actuator's sequence number.
[0073] Control unit 2 connects to host computer 1, and multiple bus controllers 3 connect to host computer 1 via a network, forming a first-level star topology. A packet of network data contains the node address of control unit 2 and the node address of its corresponding actuator 4, as well as the information data to be operated.
[0074] Furthermore, the host computer 1 is also used to determine the execution mechanism and its task parameter information based on the task information, generate the task instruction, and send it to all bus controllers 3 after UDP protocol conversion.
[0075] Furthermore, each bus controller 3 is also used to detect whether the CAN_FD bus is transmitting data when it receives the task instruction; if the CAN_FD bus is transmitting data, then the data transmission on the CAN_FD bus is terminated and the CAN_FD bus is set to idle; if the CAN_FD bus is not transmitting data, or after the data transmission on the CAN_FD bus is terminated, the task instruction is parsed and converted to generate the CAN_FD data packet.
[0076] Furthermore, the bus controller 3 is also used to parse the task instruction to determine the actuators within the control unit where the bus controller is located that need to perform the task; the bus controller is also used to generate a task control data packet based on the node address sequence number and task parameter information of the actuators within the control unit that need to perform the task, the task control data packet including an execution field corresponding to the node address sequence number of all actuators within the control unit where the bus controller is located, the execution field corresponding to the node address sequence number of the actuator that needs to perform the task is the corresponding task parameter information, and the execution field corresponding to the node address sequence number of the actuator that has not performed the task is empty; the task control data packet is then converted to a protocol to generate the CAN_FD data packet.
[0077] Furthermore, the actuator 4 within each control unit is also used to determine whether the currently received CAN_FD data packet is complete. If the currently received CAN_FD data packet is incomplete, the incomplete CAN_FD data packet is discarded. If the currently received CAN_FD data packet is complete, each actuator within the same control unit reads the corresponding execution field from the CAN_FD data packet according to its own node address sequence number. If the corresponding execution field is empty, the task is not executed. If the corresponding execution field contains the corresponding task parameter information, the corresponding task is executed according to the task parameter information.
[0078] Furthermore, the bus controller 3 is also used to set a total waiting time based on the number of actuators that need to perform tasks within the control unit, and to set a response time for each actuator that needs to perform tasks; when each response time is reached, it receives the CAN response data packet sent by the corresponding actuator through the CAN bus; when the total waiting time is reached, it converts the received CAN response data packet to UDP protocol and sends it to the host computer.
[0079] Furthermore, the bus controller 3 is also used to initiate status read commands and synchronously send the status read commands to each actuator in the control unit via the CAN_FD bus;
[0080] The bus controller is also used to set the total waiting time based on the number of actuators in the control unit, and to set the response time for each actuator;
[0081] After receiving the status read command, the actuators within the same control unit generate a status response data packet based on their own status information, and send the status response data packet to the bus controller within the control unit via the CAN bus according to the response time.
[0082] The bus controller is also used to determine whether there are any disconnected actuators in the control unit based on the number of received status response data packets;
[0083] If any actuators are offline, the node address sequence number of the offline actuator is determined based on the node address sequence number of the actuator in each status response data packet, and an alarm message is generated and sent to the host computer.
[0084] Furthermore, the node address numbers of the actuators within the same control unit are arranged in ascending order, and the response time of each actuator is determined based on the magnitude of its own node address number.
[0085] refer to Figure 2 In some embodiments, an industrial synchronization control method is provided, applied to the above-described system, the method comprising:
[0086] S1. The host computer generates task instructions and synchronously sends them to all bus controllers;
[0087] S2. Each bus controller prioritizes executing the task instruction, parses the task instruction and generates a CAN_FD data packet, and synchronously sends the CAN_FD data packet to all actuators in the control unit through the CAN_FD bus. The CAN_FD data packets in the same control unit are the same.
[0088] S3. The actuators in each control unit parse the CAN_FD data packet and determine whether to execute the corresponding task. At the same time, the actuators that need to execute the task generate a CAN response data packet and send it to the bus controller in their respective control unit through the CAN bus.
[0089] Further, in step S1, the host computer generates task instructions and sends them to all bus controllers, including:
[0090] The host computer determines the executor and its task parameters based on the task information, generates the task instructions, performs UDP protocol conversion, and then sends them to all bus controllers.
[0091] Specifically, task information is determined by the host computer program or the operator. The host computer can choose to issue specific operation instructions to one, multiple, or all actuators, which are broadcast to the bus controller via UDP packets. Task instruction types include action instructions, parameter setting instructions, parameter reading instructions, and status reading instructions.
[0092] Furthermore, based on the target partition data fed back from the external measurement terminal and the known information of each partition actuator, the host computer uses a specific closed-loop control algorithm to calculate the control quantity of each partition, and forms a packet of network data to send to the bus controller in all control units.
[0093] In other words, the UDP data packet containing the task instructions sent by the host computer contains all the task parameters to be executed in the entire system, as well as the identifiers of all corresponding actuators, such as the node address number of the corresponding actuator. Each bus controller receives the same task instructions.
[0094] Further, in step S2, refer to Figure 3 Each bus controller prioritizes executing the task instructions, parses the task instructions, and generates CAN_FD data packets, including:
[0095] S21. When the bus controller receives the task instruction, it checks whether the CAN_FD bus is transmitting data.
[0096] S22. If the CAN_FD bus is transmitting data, then stop transmitting data on the CAN_FD bus and set the CAN_FD bus to idle.
[0097] S23. If the CAN_FD bus is not transmitting data, or after the data transmission on the CAN_FD bus has ended, the bus controller parses and converts the task instruction to generate the CAN_FD data packet.
[0098] Specifically, task instructions issued by the host computer have the highest priority, and the system employs a preemptive mechanism. Once the host computer issues a task instruction, it can interrupt other currently running tasks other than the task instruction itself, prioritizing the execution of the task instruction to ensure the real-time execution of action instructions.
[0099] Therefore, in steps S21 and S22, when the bus controller receives the task instruction, it checks whether the CAN_FD bus is transmitting data. If the CAN_FD bus is transmitting data, it immediately stops the data transmission on the CAN_FD bus, stops the transmission of the current data packet through software processing, and sets the CAN_FD bus to idle so that a new data transmission can be started.
[0100] Further, refer to Figure 4 In step S23, the bus controller parses and converts the task instruction to generate the CAN_FD data packet, including:
[0101] S23a. Parse the task instruction to determine the execution mechanism within the control unit where the bus controller is located that needs to perform the task;
[0102] S23b: The bus controller generates a task control data packet based on the node address sequence number and task parameter information of the actuators that need to perform tasks within its control unit. The task control data packet includes an execution field corresponding to the node address sequence number of each actuator within the control unit where the bus controller is located. The execution field corresponding to the node address sequence number of the actuator that needs to perform a task is the corresponding task parameter information, and the execution field corresponding to the node address sequence number of the actuator that has not performed a task is empty.
[0103] S23c, Perform protocol conversion on the task control data packet to generate the CAN_FD data packet.
[0104] Specifically, in step S23a, since the task instructions sent from the host computer to each bus controller are identical, containing task parameter information for all tasks to be executed and the identifiers of their corresponding execution mechanisms, the bus controller parses the task instructions to determine the execution mechanism within its control unit that needs to execute the task. Specifically, based on the identifier of the execution mechanism in the task instructions, the controller within its control unit is determined; this identifier can be the node address number of the execution mechanism.
[0105] Further, in step S23b, after parsing the task instruction, the node address sequence number and task parameter information of the actuator that needs to perform the task are determined in the control unit where the bus controller is located, and a task control data packet is generated. The task control data packet contains an execution field corresponding to the node address sequence number of each actuator. The corresponding task parameter information is written into the execution field corresponding to the node address sequence number of the actuator that needs to perform the task. If no task needs to be performed, the corresponding execution field is empty.
[0106] Further, in step S23c, the task control data packet is converted to the CAN_FD protocol to generate the CAN_FD data packet.
[0107] Through the CAN_FD bus, each bus controller synchronously sends CAN_FD data packets to the actuators within the control unit. Within the same control unit, each actuator receives the same CAN_FD data packets.
[0108] Further, refer to Figure 5 In step S3, the actuators within each control unit parse the CAN_FD data packet and determine whether to execute the corresponding task, including:
[0109] S31. The actuators in each control unit determine whether the currently received CAN_FD data packet is complete. If the currently received CAN_FD data packet is incomplete, the incomplete CAN_FD data packet is discarded.
[0110] S32. If the currently received CAN_FD data packet is complete, each actuator in the same control unit reads the corresponding execution field from the CAN_FD data packet according to its own node address sequence number. If the corresponding execution field is empty, the task is not executed; if the corresponding execution field is the corresponding task parameter information, the corresponding task is executed according to the task parameter information.
[0111] Specifically, in step S31, due to the system's preemption mechanism, once the host computer issues a task instruction, it can interrupt the currently running tasks other than the task instruction and prioritize the execution of the task instruction. When the bus controller receives the task instruction, if the CAN_FD bus is transmitting data, it will immediately stop transmitting data on the CAN_FD bus, causing the actuator to determine that the currently received CAN_FD data packet is incomplete. Therefore, when the actuator receives the CAN_FD data packet, it needs to determine whether it is complete. If the currently received CAN_FD data packet is incomplete, it will discard the incomplete CAN_FD data packet.
[0112] In step S32, if the currently received CAN_FD data packet is complete, each actuator reads the corresponding execution field according to its own node address sequence number. If the corresponding execution field is empty, the task is not executed; if the corresponding execution field is the corresponding task parameter information, the corresponding task is executed according to the task parameter information.
[0113] Furthermore, in step S3, after the actuator completes the parsing, the actuator that needs to perform the task generates a CAN response data packet and sends it to the bus controller in the control unit via the CAN bus.
[0114] Furthermore, in some embodiments, after the bus controller synchronously sends the same CAN_FD data packets to all actuators within the control unit via the CAN_FD bus, it further includes:
[0115] Each bus controller sets the total waiting time based on the number of actuators within its control unit that need to perform tasks, and sets a response time for each actuator that needs to perform a task;
[0116] When the corresponding response time is reached, the CAN response data packet sent by the corresponding actuator is received via the CAN bus;
[0117] When the total waiting time is reached, the received CAN response data packet is converted to UDP protocol and then sent to the host computer.
[0118] Specifically, the bus controller sets the total waiting time based on the number of actuators that need to perform tasks within its control unit, and sets a response time for each actuator that needs to perform a task. In the task of reporting response data, actuators that do not perform tasks do not need to report CAN response data packets.
[0119] In some embodiments, the node address numbers of the actuators within the same control unit are arranged in ascending order, and the response time of each actuator is determined based on its own node address number. For example, the response times of each actuator can be set sequentially according to its node address number from smallest to largest, with each actuator having the same response time. Assuming the node address numbers within the same control unit are 1, 2, 3, 4, and 5, and each actuator performs a task, their response times are 10ms, 20ms, 30ms, 40ms, and 50ms respectively, with a total waiting time of 50ms. If only actuators with node address numbers 2 and 5 are performing tasks, their corresponding response times are 10ms and 20ms respectively, with a total waiting time of 20ms. That is, the actuator with the smaller node address number has priority in preempting the CAN bus to send the CAN response data packet, and each actuator appropriately delays the transmission of the CAN response data packet.
[0120] Each actuator responds at the same interval, and the total waiting time is the interval multiplied by the number of actuators that need to perform the task. That is, each actuator that needs to perform a task sends a status response data packet to the bus controller within its control unit after a corresponding delay.
[0121] Furthermore, at each response time, the CAN response data packet sent by the corresponding actuator is received via the CAN bus. If the corresponding response time is exceeded, the data packet is considered invalid.
[0122] When the total waiting time is reached, the received CAN response data packet is converted to UDP protocol and then sent to the host computer. During this process, no judgment is made on whether the actuator is abnormal.
[0123] Further, refer to Figure 6 The method further includes:
[0124] S4. The bus controller initiates a status read command and synchronously sends the status read command to each actuator in the control unit through the CAN_FD bus;
[0125] S5. The bus controller sets the total waiting time based on the number of actuators in its control unit, and sets a response time for each actuator.
[0126] S6. After receiving the status reading command, the actuators within the same control unit generate a status response data packet based on their own status information, and send the status response data packet to the bus controller within the control unit via the CAN bus according to the response time.
[0127] S7. The bus controller determines whether there is a disconnected actuator in the control unit based on the number of received status response data packets;
[0128] S8. If there is a disconnected actuator, the node address sequence number of the disconnected actuator is determined according to the node address sequence number of the actuator in each status response data packet, and an alarm message is generated and sent to the host computer.
[0129] Specifically, during the control process, the status of each actuator needs to be read periodically to determine whether any abnormality has occurred. The status reading is initiated by the bus controller, and the status reading command is synchronously sent to each actuator in the control unit via the CAN_FD bus.
[0130] Similarly, the node address numbers of the actuators within the same control unit are arranged in ascending order, and the response time of each actuator is determined based on its own node address number. For example, the response time of each actuator can be set sequentially according to its node address number from smallest to largest, with each actuator having the same response time. Assuming the node address numbers within the same control unit are 1, 2, 3, 4, and 5, with response times of 10ms, 20ms, 30ms, 40ms, and 50ms respectively, the total waiting time is 50ms. Since the response time interval for each actuator is the same, the total waiting time is the interval time multiplied by the number of actuators within the control unit. That is, each actuator sends a status response data packet to the bus controller within its control unit with a corresponding delay time interval.
[0131] After receiving the status read command, the actuators within the same control unit generate a status response data packet based on their own status information, and send the status response data packet to the bus controller within their respective control unit via the CAN bus according to the response time. That is, the actuators send their respective status response data packets to the bus controller within their respective control units in ascending order of their node address numbers.
[0132] The bus controller first determines whether there is a disconnected actuator within its control unit based on the number of received status response data packets. If a disconnected actuator is found, the controller determines the node address number of the disconnected actuator based on the node address number of the actuator in each status response data packet and generates an alarm message to send to the host computer.
[0133] The industrial synchronous control system and control method provided in the above embodiments have at least the following beneficial effects:
[0134] (1) Through the coordinated cooperation of the host computer and the bus controllers and actuators in each control unit, the combination of network communication, CAN_FD bus communication and CAN bus communication, and the structural design of CAN_FD data packets, the time spent from the host computer issuing the task instruction to the corresponding actuator action can be fixed, and the time spent in each actuator is also the same, which greatly improves the real-time performance and synchronization of the system execution.
[0135] (2) The system structure is hierarchical, independent, and the wiring method is clear, thereby improving stability; the original single structure is divided into several control units. If a single control unit fails, it will not affect the other control units. If a single actuator in a control unit fails, it will not affect the operation of other actuators in the control unit.
[0136] (3) By combining network communication, CAN_FD bus communication and CAN bus communication, the task instructions sent by the host computer can reach each bus controller synchronously. After parsing, each bus controller can send the CAN_FD data packet synchronously to the actuator in the control unit through the CAN_FD bus. After parsing, the actuator executes the corresponding task. The CAN_FD bus is only used for the bus controller to send data, and the CAN bus is only used for the actuator to send back data. In this way, the bus controller does not need to wait for the transmission, and the network communication used by the host computer is full-duplex and does not need to wait, thereby ensuring the synchronization of the tasks executed by each actuator.
[0137] (4) The CAN_FD data packets generated within the same control unit are identical and are synchronously sent to each actuator within the control unit. The parsing process of each actuator is identical, further ensuring the synchronization of the tasks performed by each actuator.
[0138] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if these modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include these modifications and modifications.
Claims
1. An industrial synchronous control system, characterized in that, It includes a host computer and at least one control unit; the control unit includes a bus controller and at least one actuator, and each actuator in each control unit is connected to the bus controller in the control unit via a star topology through a CAN bus and a CAN_FD bus. The host computer is used to determine the execution mechanism and its task parameter information based on the task information, generate task instructions, and synchronously send them to all bus controllers after UDP protocol conversion. Each bus controller is used to prioritize the execution of the task instructions, parse the task instructions and generate CAN_FD data packets, and synchronously send the CAN_FD data packets to all execution mechanisms within the control unit through the CAN_FD bus. The CAN_FD data packets within the same control unit are identical. Each execution mechanism within the control unit is used to parse the CAN_FD data packets and determine whether to execute the corresponding task. At the same time, the execution mechanism that needs to execute the task generates a CAN response data packet and sends it to the bus controller within the control unit through the CAN bus. The bus controller is connected to the host computer via a network. The bus controller is equipped with a CAN bus interface and a CAN_FD bus interface. Each actuator is connected to the CAN bus interface of the bus controller in its respective control board unit via the CAN bus. Each actuator is connected to the CAN_FD bus interface of the bus controller in its respective control unit via the CAN_FD bus.
2. A control method for an industrial synchronization system, characterized in that, Applied to the system of claim 1, the method includes: The host computer generates task instructions and synchronously sends them to all bus controllers: Based on the task information, the host computer determines the execution mechanism and its task parameter information, generates the task instructions, performs UDP protocol conversion, and then sends them to all bus controllers. Each bus controller prioritizes executing the task instruction, parses the task instruction and generates a CAN_FD data packet, and synchronously sends the CAN_FD data packet to all actuators in the control unit through the CAN_FD bus. The CAN_FD data packets in the same control unit are identical. The actuators within each control unit parse the CAN_FD data packet and determine whether to execute the corresponding task. Meanwhile, the actuators that need to execute the task generate a CAN response data packet and send it to the bus controller within their respective control unit via the CAN bus.
3. The method according to claim 2, characterized in that, Each bus controller prioritizes executing the task instructions, parses the task instructions, and generates CAN_FD data packets, including: When the bus controller receives the task instruction, it checks whether the CAN_FD bus is transmitting data. If the CAN_FD bus is transmitting data, then stop transmitting data on the CAN_FD bus and set the CAN_FD bus to idle. If the CAN_FD bus is not transmitting data, or after the data transmission on the CAN_FD bus has ended, the bus controller parses and converts the task instruction to generate the CAN_FD data packet.
4. The method according to claim 3, characterized in that, The bus controller parses and converts the task instructions to generate the CAN_FD data packet, including: The task instructions are parsed to determine the execution mechanism within the control unit where the bus controller is located that needs to perform the task; The bus controller generates a task control data packet based on the node address sequence number and task parameter information of the actuators that need to perform tasks within its control unit. The task control data packet includes an execution field corresponding to the node address sequence number of all actuators within the control unit where the bus controller is located. The execution field corresponding to the node address sequence number of the actuator that needs to perform a task is the corresponding task parameter information, while the execution field corresponding to the node address sequence number of the actuator that has not performed a task is empty. The task control data packet is converted to a protocol to generate the CAN_FD data packet.
5. The method according to claim 4, characterized in that, The actuators within each control unit parse the CAN_FD data packet and determine whether to execute the corresponding task, including: The actuators within each control unit determine whether the currently received CAN_FD data packet is complete. If the currently received CAN_FD data packet is incomplete, the incomplete CAN_FD data packet is discarded. If the currently received CAN_FD data packet is complete, each actuator within the same control unit reads the corresponding execution field from the CAN_FD data packet according to its own node address sequence number. If the corresponding execution field is empty, no task is executed; if the corresponding execution field contains the corresponding task parameter information, the corresponding task is executed according to the task parameter information.
6. The method according to claim 4, characterized in that, The bus controller, after synchronously sending CAN_FD data packets to all actuators within its control unit via the CAN_FD bus, also includes: Each bus controller sets the total waiting time based on the number of actuators within its control unit that need to perform tasks, and sets a response time for each actuator that needs to perform a task; When the corresponding response time is reached, the CAN response data packet sent by the corresponding actuator is received via the CAN bus; When the total waiting time is reached, the received CAN response data packet is converted to UDP protocol and then sent to the host computer.
7. The method according to claim 2, characterized in that, The method further includes: The bus controller initiates a status read command, which is then synchronously sent to each actuator within the control unit via the CAN_FD bus. The bus controller sets the total waiting time based on the number of actuators within its control unit, and sets a response time for each actuator; After receiving the status read command, the actuators within the same control unit generate a status response data packet based on their own status information, and send the status response data packet to the bus controller within the control unit via the CAN bus according to the response time. The bus controller determines whether there are any disconnected actuators within its control unit based on the number of received status response data packets. If any actuators are offline, the node address sequence number of the offline actuator is determined based on the node address sequence number of the actuator in each status response data packet, and an alarm message is generated and sent to the host computer.
8. The method according to claim 6 or 7, characterized in that, The node address numbers of the actuators within the same control unit are arranged in ascending order, and the response time of each actuator is determined based on the magnitude of its own node address number.
Citation Information
Patent Citations
General RS232-CAN communication conversion board
CN213182359U
Synchronization control method for substation of distributed industrial control system
CN101819437A
Multi-axis multi-slave-station industrial control system
CN119717737A