Heterogeneous device cooperative control method, system and medium based on dynamic configuration
By using a state machine engine and dynamic signal mapping mechanism, the problems of high coupling and poor fault tolerance in the collaborative control of heterogeneous equipment are solved, realizing zero code change and exception protection of the process flow, and improving the flexibility and development efficiency of automated production lines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
- Filing Date
- 2026-02-13
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, the collaborative control of heterogeneous devices suffers from problems such as high coupling, difficulty in heterogeneous collaboration, and lack of fault tolerance and simulation mechanisms. This results in the need for professional personnel to program and debug for a long time when the process changes, and there are risks of deadlock and race conditions.
Employing a state machine engine, reflection factory, and dynamic signal mapping mechanism, heterogeneous device node information is parsed through dynamic configuration files, device control state objects are instantiated, and a signal source mapping table is established to achieve loosely coupled communication and fault circuit protection for heterogeneous devices.
It achieves zero-code changes to the process flow, improves the flexibility and development efficiency of automated production lines, reduces production line downtime maintenance costs, and enhances the system's fault tolerance and anomaly handling capabilities.
Smart Images

Figure CN121704398B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial automation control technology, and particularly relates to a method, system and computer-readable storage medium for collaborative control of heterogeneous devices based on dynamic configuration. Background Technology
[0002] In high-end automated manufacturing fields such as semiconductor wafer inspection, panel manufacturing, and precision assembly, equipment is typically composed of various heterogeneous hardware components. Typical heterogeneous hardware includes:
[0003] 1. Motion control equipment: such as high-precision displacement stages, robotic arms, etc., which are characterized by long motion times (milliseconds to seconds) and require precise position feedback.
[0004] 2. Visual acquisition devices: such as industrial cameras, sensors, and barcode scanners. These devices are characterized by extremely fast operation (microsecond level), are usually driven by external trigger signals, and have diverse interface protocols (such as GigE, USB 3.0, CameraLink).
[0005] 3. Data processing unit: such as image processing algorithms and data analysis modules. These are characterized by pure computational tasks, which take an unpredictable amount of time and consume CPU resources.
[0006] In the existing technology, there are mainly two implementation schemes for the collaborative control of such heterogeneous devices:
[0007] Option 1: Ladder diagram control based on PLC (Programmable Logic Controller). This option offers strong real-time performance, but its logical expression capability is limited, making it difficult to handle complex image algorithms and data interactions. Furthermore, if the process flow changes, it requires specialized PLC engineers to reprogram and debug, resulting in an extremely long cycle.
[0008] Option 2: Hard-coded control based on high-level languages (such as C++ / C#). This option offers greater flexibility, but typically uses sequential code to write business logic.
[0009] In traditional implementations, control logic is often deeply coupled with the hardware interface and lacks a unified exception handling mechanism. Existing hard-coded solutions have the following significant drawbacks:
[0010] 1. Extremely high coupling: The control logic is tightly coupled with the hardware driver. Once the process is changed (for example, changing "move first and then take a picture" to "take a picture while moving"), the source code must be modified and recompiled, resulting in high production line downtime and maintenance costs.
[0011] 2. Difficulties in heterogeneous collaboration: Different hardware has different communication interfaces and timing requirements (some are based on polling, some on callbacks, and some on events). When handling complex parallel tasks (such as processing the previous image while the motor is moving) or asynchronous waiting (such as waiting for the camera to complete exposure signal), the code structure becomes extremely complex, filled with a large number of flags and callback functions, which can easily lead to deadlocks or race conditions.
[0012] 3. Lack of fault tolerance and simulation mechanisms: Hard-coded logic is usually difficult to cover all abnormal paths, and logic verification cannot be performed when there is no hardware environment, resulting in high risk of on-site debugging. Summary of the Invention
[0013] In view of this, the present invention aims to provide a method, system and computer-readable storage medium for collaborative control of heterogeneous devices based on dynamic configuration. By introducing a state machine engine, a reflective factory and a dynamic signal mapping mechanism, it achieves "zero-code" changes to the process flow and effectively solves the problems of efficient collaboration and physical security protection of heterogeneous hardware.
[0014] To achieve the above objectives, the technical solution created by this invention is implemented as follows:
[0015] A method for collaborative control of heterogeneous devices based on dynamic configuration, comprising:
[0016] Configuration parsing steps: Read the preset process flow configuration file, which contains information on multiple heterogeneous equipment nodes, node execution parameters, and flow triggering conditions between nodes;
[0017] Heterogeneous unit construction steps: Traverse the information of the multiple heterogeneous device nodes, and according to the node type identifier, dynamically instantiate the corresponding device control state object through the preset device state factory. The device control state object encapsulates the underlying driver interface and communication protocol of the corresponding heterogeneous hardware.
[0018] Dynamic routing binding steps: Establish a signal source mapping table, register the instantiated device control status object to the signal source mapping table, parse the signal source description in the flow trigger condition, find the corresponding source object instance from the signal source mapping table, and establish a communication connection between the source object event output and the target object action input based on object meta information or dynamic proxy technology;
[0019] Layered execution steps: The state machine engine is started. The currently active device control state object generates an internal micro-task sequence based on the node execution parameters and drives the heterogeneous hardware to execute. The device control state object monitors the physical feedback of the heterogeneous hardware in real time. Only after confirming that the heterogeneous hardware action is completed or a preset physical condition is reached, it sends a standardized transition signal to the state machine engine through the communication connection, triggering the state machine engine to jump to the next device node. The device control state object shields the differences in the underlying driver interface and provides a unified transition signal interface to the state machine engine.
[0020] Furthermore, the device control state object includes at least a displacement drive state object, and the displacement drive state object internally maintains an atomic instruction task queue;
[0021] In the layered execution step, when the state machine engine switches to the displacement-driven state object, the displacement-driven state object automatically parses the coordinate list in the node execution parameters and fills it into the atomic instruction task queue, and sequentially drives the motor to execute the point movement in the atomic instruction task queue;
[0022] The displacement-driven state object shields the real-time polling or interrupt logic of the underlying driver interface, and only sends the transition signal to the state machine engine after all instructions in the atomic instruction task team have been executed and physical feedback from the heterogeneous hardware has been received.
[0023] Furthermore, the process flow configuration file also includes an asynchronous group identifier;
[0024] In the heterogeneous unit construction step, if multiple heterogeneous device nodes are detected to belong to the same asynchronous group and have no data dependency, then the multiple heterogeneous device nodes are configured to be in parallel state.
[0025] In the layered execution step, the state machine engine simultaneously activates multiple device control state objects in the parallel state, and waits for all parallel objects to send flow signals through the convergence and transformation node before executing subsequent flow, so as to realize parallel operation of heterogeneous hardware.
[0026] Furthermore, the flow triggering condition also includes an abnormal route definition, and the method further includes:
[0027] The device control status object has a built-in watchdog or hardware status monitoring mechanism. When a hardware failure, communication failure, or response timeout is detected during execution, an abnormal interrupt signal is issued.
[0028] The state machine engine captures the abnormal interrupt signal, dynamically blocks the current flow path according to the abnormal route definition, switches the state to a preset hardware reset safe state, and performs protection actions.
[0029] Furthermore, the device status factory supports a virtual-to-real switching mode;
[0030] In the heterogeneous unit construction step, based on the global simulation flag, a real hardware driver object or a virtual simulation object is selected for instantiation.
[0031] The simulation object is configured to disconnect the physical control interface, start an internal simulation timer, and automatically send simulated flow signals after a preset delay to achieve logic verification in a hardware-free environment.
[0032] A dynamic configuration-based heterogeneous device collaborative control system includes:
[0033] The configuration management module is used to store and parse process flow configuration files;
[0034] The main control and scheduling module is used to run the state machine engine and manage the global state transitions;
[0035] The dynamic construction module is used to dynamically instantiate equipment control status objects according to the process flow configuration file, and establish a communication connection between the source object event output and the target object action input using object meta information or dynamic proxy technology.
[0036] The heterogeneous execution layer contains multiple device control state objects, which encapsulate the heterogeneous driving protocols of the displacement stage, imaging device and algorithm processing unit, respectively, for executing specific hardware microtasks.
[0037] The signal routing center is used to maintain the global mapping relationship of the device control state object instances, so as to realize loosely coupled communication between heterogeneous devices.
[0038] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for coordinated control of heterogeneous devices based on dynamic configuration.
[0039] Compared with the prior art, the present invention can achieve the following beneficial effects:
[0040] This invention provides a method, system, and medium for collaborative control of heterogeneous devices based on dynamic configuration. The method reads a preset process flow configuration file, parses multiple heterogeneous device nodes and their transition trigger conditions, and dynamically creates corresponding device control state objects through a state instantiation factory based on node type identifiers. These device control state objects encapsulate the underlying driver interfaces of the heterogeneous devices, construct a dynamic signal routing table, and establish a communication connection between the source and target objects using object metadata or dynamic proxy technology based on the signal descriptions in the transition trigger conditions. A state machine engine is then started, and the device control state objects generate and execute an internal hardware micro-task sequence based on node parameters. Upon detecting that the hardware physical feedback meets the completion conditions, a transition signal is issued. This invention, through configuration-driven and dynamic mapping mechanisms, shields the hardware interface differences of heterogeneous devices, achieving zero-code changes to the process flow and abnormal circuit breaker protection, significantly improving the flexibility and development efficiency of automated production lines. Attached Figure Description
[0041] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0042] Figure 1 A flowchart illustrating the heterogeneous device collaborative control method based on dynamic configuration as described in an embodiment of the present invention;
[0043] Figure 2 The structural block diagram of the heterogeneous device collaborative control system based on dynamic configuration described in the embodiments of the present invention;
[0044] Figure 3 A schematic diagram of the main flow of the control method in the heterogeneous device collaborative control system based on dynamic configuration, as described in an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of the microtask execution timing in the heterogeneous device collaborative control method based on dynamic configuration described in the embodiments of the present invention;
[0046] Figure 5 A schematic diagram of asynchronous pipeline logic in the heterogeneous device collaborative control method based on dynamic configuration described in the embodiments of the present invention;
[0047] Figure 6 This is a schematic diagram of the abnormal circuit breaker mechanism in the heterogeneous device collaborative control method based on dynamic configuration described in the embodiments of the present invention. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof.
[0049] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0050] The invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0051] like Figure 1 As shown in the embodiment of the present invention, a method for collaborative control of heterogeneous devices based on dynamic configuration includes:
[0052] S1. Configuration and parsing steps: Read the preset process flow configuration file, which contains information on multiple heterogeneous equipment nodes, node execution parameters, and flow triggering conditions between nodes.
[0053] The process flow configuration file can be in JSON / XML format. It defines not only the topology of the process (e.g., state A → state B) but also the micro-parameters of each heterogeneous device node (e.g., motion coordinates, camera exposure time). Upon system startup, the parsing engine dynamically creates control objects that encapsulate the underlying drivers based on the node type identifier using a factory pattern.
[0054] S2. Heterogeneous unit construction steps: Traverse the information of the multiple heterogeneous device nodes, and according to the node type identifier, dynamically instantiate the corresponding device control state object through the preset device state factory. The device control state object encapsulates the underlying driver interface and communication protocol of the corresponding heterogeneous hardware.
[0055] Heterogeneous resources such as motion, vision, and algorithms are uniformly abstracted into a "WorkState". At a macro level, a state machine engine manages the transitions between states; at a micro level, each state object maintains its own queue of atomic instruction microtasks, such as RSDeviceState maintaining a position vector PositionVector. This layered design enables individual state objects to possess "self-discipline," shielding them from the high-frequency polling details of the underlying hardware and exposing only standard transition signals to the main control layer.
[0056] S3. Dynamic routing binding steps: Establish a signal source mapping table, register the instantiated device control status object to the signal source mapping table, parse the signal source description in the flow trigger condition, find the corresponding source object instance from the signal source mapping table, and establish a communication connection between the source object event output and the target object action input based on object meta information or dynamic proxy technology.
[0057] This invention constructs a global signal source mapping table. The parser dynamically connects signals and slots based on the string signal names in the configuration file, using either a meta-object system or reflection technology. This enables seamless collaboration between callback-based cameras and polling-based boards.
[0058] S4. Layered Execution Steps: Start the state machine engine. The currently active device control state object generates an internal micro-task sequence based on the node execution parameters and drives the heterogeneous hardware to execute. The device control state object monitors the physical feedback of the heterogeneous hardware in real time. Only after confirming that the heterogeneous hardware action is completed or a preset physical condition is reached, it sends a standardized transition signal to the state machine engine through the communication connection, triggering the state machine engine to jump to the next device node. The device control state object shields the differences in the underlying driver interface and provides a unified transition signal interface to the state machine engine.
[0059] This invention provides a method for collaborative control of heterogeneous devices based on dynamic configuration. It reads a preset process flow configuration file, parses multiple heterogeneous device nodes and their transition trigger conditions, and dynamically creates corresponding device control state objects through a state instantiation factory based on node type identifiers. These device control state objects encapsulate the underlying driver interfaces of the heterogeneous devices, construct a dynamic signal routing table, and establish a communication connection between the source and target objects using object metadata or dynamic proxy technology based on the signal descriptions in the transition trigger conditions. A state machine engine is then started, and the device control state objects generate and execute an internal hardware micro-task sequence based on node parameters. Upon detecting that the hardware physical feedback meets the completion conditions, a transition signal is issued. This invention, through configuration-driven and dynamic mapping mechanisms, shields the hardware interface differences of heterogeneous devices, achieving zero-code changes to the process flow and circuit breaker protection for exceptions, significantly improving the flexibility and development efficiency of automated production lines.
[0060] In some embodiments, the device control state object includes at least a displacement drive state object, and the displacement drive state object internally maintains an atomic instruction task queue.
[0061] In the S4 layered execution step, when the state machine engine switches to the displacement-driven state object, the displacement-driven state object automatically parses the coordinate list in the node execution parameters and fills it into the atomic instruction task queue, and sequentially drives the motor to execute the point movement in the atomic instruction task queue.
[0062] The displacement-driven state object shields the real-time polling or interrupt logic of the underlying driver interface, and only sends the transition signal to the state machine engine after all instructions in the atomic instruction task team have been executed and physical feedback of the heterogeneous hardware being in place has been received.
[0063] In some embodiments, the process flow configuration file also includes an asynchronous group identifier;
[0064] In the heterogeneous unit construction step, if multiple heterogeneous device nodes are detected to belong to the same asynchronous group and have no data dependency, then the multiple heterogeneous device nodes are configured to be in parallel state.
[0065] In the layered execution step, the state machine engine simultaneously activates multiple device control state objects in the parallel state, and waits for all parallel objects to send flow signals through the convergence and transformation node before executing the subsequent flow, so as to realize the parallel operation of heterogeneous hardware.
[0066] To address the issue of significant speed differences among heterogeneous devices, this invention supports "asynchronous group" configuration. The scheduler can configure the control states of multiple devices without physical conflicts to execute in parallel. The device control states can be Z-axis motion and algorithm calculation. Through synchronization at the aggregation node, the system throughput is significantly improved.
[0067] In some embodiments, the flow triggering condition further includes an abnormal route definition, and the method further includes:
[0068] The device control status object has a built-in watchdog or hardware status monitoring mechanism. When a hardware failure, communication failure, or response timeout is detected during execution, an abnormal interrupt signal is issued.
[0069] The state machine engine captures the abnormal interrupt signal, dynamically blocks the current flow path according to the abnormal route definition, switches the state to the preset hardware reset safety state, and performs protection actions.
[0070] Define the abnormal routing path in the configuration file. When the device object detects a hardware failure, it issues a high-priority abnormal signal. Hardware failures such as limit switch triggering or communication timeouts will cause the state machine engine to automatically cut off the current path according to the configuration and jump to the safe reset state to prevent physical damage.
[0071] In some embodiments, the device status factory supports a virtual-to-real switching mode;
[0072] In the heterogeneous unit construction step, based on the global simulation flag, the instantiation of a real hardware driver object or a virtual simulation object is selected.
[0073] The simulation object is configured to disconnect the physical control interface, start an internal simulation timer, and automatically send simulated flow signals after a preset delay to achieve logic verification in a hardware-free environment.
[0074] Combination Figure 2 As shown, correspondingly, based on the above-described method for collaborative control of heterogeneous devices based on dynamic configuration, this embodiment of the invention also provides a collaborative control system for heterogeneous devices based on dynamic configuration, comprising:
[0075] The configuration management module 201 is used to store and parse the process flow configuration file. It is responsible for loading and parsing the JSON format process flow configuration file, which contains States (a set of state nodes) and Transitions (a set of flow rules).
[0076] The main control scheduling module 202 is used to run the state machine engine and manage the global state transition. The main control scheduling module (AutoScheduler) is the core engine of the system, which encapsulates the event-driven state machine and is responsible for the life cycle management of the state machine.
[0077] The dynamic construction module 203 includes a state instantiation factory, which is used to create specific control object instances based on string type identifiers. The dynamic construction module (Factory) is used to dynamically instantiate equipment control state objects according to the process flow configuration file, and to establish a communication connection between source object event output and target object action input using object meta information or dynamic proxy technology.
[0078] The heterogeneous execution layer 204 contains multiple device control state objects, which respectively encapsulate the heterogeneous driving protocols of the displacement stage, imaging device and algorithm processing unit, and are used to execute specific hardware microtasks.
[0079] The signal routing center 205 is used to maintain the global mapping relationship of the device control state object instances to realize loosely coupled communication between heterogeneous devices. The signal routing center (Signal Source Map) is a key-value pair container used as a global mapping table to store instance pointers of all created objects and as a lookup table for dynamic binding.
[0080] Combination Figure 3 As shown, the initialization process of the dynamically configured heterogeneous device collaborative control system is as follows:
[0081] Step S101: The system starts up and reads the preset process flow configuration file.
[0082] Step S102: Parse the list of state node definitions in the configuration file. For each node, read its type identifier field and create the corresponding object based on the type identifier.
[0083] Step S103: Register all created object instances to the global signal routing table using their unique names as indexes.
[0084] Step S104: Parse the list of flow rules in the process flow configuration file. Each flow rule includes a source node, a target node, and a description of the trigger signal, specifically:
[0085] Look up the corresponding object instances of the source and destination nodes from the signal routing table;
[0086] Look up the source object that emitted the trigger signal from the signal routing table;
[0087] By leveraging the reflection capability of the meta-object system, the trigger signal address of the source object is dynamically located and connected to the flow trigger of the state machine engine, thereby establishing an event-driven jump path.
[0088] Step S105: After the construction is completed, start the state machine engine and the system enters the initial state.
[0089] Combination Figure 4 As shown, an embodiment of the hardware microtask autonomous logic of the displacement drive unit in a dynamically configured heterogeneous device cooperative control system is as follows:
[0090] The displacement-driven state object internally maintains an atomic instruction task queue. Upon entering a state, configuration parameters are parsed to generate a coordinate queue, and point movements are executed sequentially. A built-in monitoring thread listens for hardware arrival signals, and only sends a completion signal to trigger a state transition after all instructions have been completed and physical feedback has been received. This mechanism shields the underlying polling logic, decoupling hardware execution from state transitions. To address the inefficiency caused by frequent hardware polling by the main control program, this embodiment designs a displacement-driven state object (RSDeviceState) with "self-discipline" capabilities. This displacement-driven state object acts as middleware between the hardware and the state machine, shielding the underlying physical details.
[0091] The execution logic of the hardware microtask self-regulation logic is as follows:
[0092] 1. Entering a State (onEntry): The onEntry function is triggered when the state machine transitions to this state. The object reads the positions parameter under this node in the configuration file and generates an internal microtask instruction queue.
[0093] 2. Execute hardware actions: The object retrieves the coordinates corresponding to the current index and calls the underlying motion control interface (such as MoveTo(x, y, z)).
[0094] 3. Physical feedback monitoring: The object starts a monitoring thread or registers a hardware interrupt to listen for the hardware's "In Position" signal in real time.
[0095] 4. Looping and Transition: Before receiving a physical arrival signal, the state machine remains in its current state without any transitions. Upon receiving the signal, it automatically executes the next instruction in the queue. Only when all instructions in the queue have been executed and hardware feedback confirms that everything is correct will the object actively send the signal_RS_AllPositionFinished signal to the main state machine, triggering a macroscopic state transition.
[0096] Combination Figure 5 As shown, an embodiment of asynchronous pipeline and physical parallelism in a dynamically configured heterogeneous device collaborative control system is as follows:
[0097] In the process flow configuration file, an asynchronous group identifier is set, configuring nodes without data dependencies into a parallel state. The state machine engine simultaneously activates multiple parallel objects, and executes subsequent processes after waiting for all objects to complete their completion signals through a convergence transition node. For example, Z-axis motion and algorithm calculations are executed in parallel, synchronized through a convergence node, improving system throughput.
[0098] This embodiment addresses the low efficiency of serial control by configuring heterogeneous hardware to operate in physical parallelism. An AsyncGroup configuration is used, where "Z-axis lift (motion hardware)" and "image algorithm initialization (computational resources)" are grouped together in the process flow configuration file. The scheduler constructs a parallel state container. When entering this container, both heterogeneous objects are activated simultaneously. Since these two objects control completely independent physical resources (motor and CPU), they do not interfere with each other. The state machine engine uses a join mechanism, waiting for both to send completion signals before proceeding to the next node.
[0099] Combination Figure 6 As shown, an embodiment of abnormal circuit breaking and virtual-real simulation in a dynamically configured heterogeneous device collaborative control system is as follows:
[0100] Each device control state object integrates a hardware state monitor to detect physical faults or timeouts in real time. Upon detecting an anomaly, an interrupt signal is sent, and the state machine engine transitions to a safe reset state based on the anomaly routing definition, executing protective actions such as emergency stop and power failure. In simulation mode, the factory creates virtual objects to simulate hardware latency, supporting logic verification in a hardware-free environment.
[0101] Specifically, in the fault tolerance implementation of this invention, a hardware protection layer is introduced during state transitions, taking the communication failure of an industrial camera as an example. The driver encapsulation layer inside CameraCtrlState captures the error code of the underlying SDK. At this time, the object immediately issues a signal_CameraError. The state machine engine, based on a preset fault routing table, ignores the current normal transition path and forcibly jumps to RecoveryState. In RecoveryState, the system executes predefined hardware protection logic such as emergency stop of all axes and shutdown of laser power, thereby achieving physical-level safety fault tolerance.
[0102] The specific implementation steps for abnormal circuit breaking in this embodiment of the invention are as follows:
[0103] Fault monitoring: Each device control status object integrates a hardware status monitor. For example, taking the industrial camera communication failure as an example, the displacement drive object monitors the IO port of the motion control card to detect in real time whether the hard limit switch is triggered; the camera control object detects the connection status of the GigE link with the camera through heartbeat packets.
[0104] Signal routing interruption: When the monitor detects a physical fault (such as the axis card returning error code 0x001: LimitSwitch Hit) or a response timeout (Watchdog Timeout), it immediately triggers a high-priority abnormal interrupt signal.
[0105] Safe state takeover: After receiving the abnormal interruption signal, the state machine engine queries the ExceptionRoute field in the process flow configuration file. If the corresponding reset policy has been configured, the state machine engine will immediately suspend the current task stack and force the system state pointer to point to the preset "safe reset state" (RecoveryState).
[0106] Physical protection actions: After entering the safety reset state, the system automatically issues physical protection commands. For example, it sends a Stop() command to all axis cards to lock the motor and disconnects the relays of high-power loads, thereby preventing mechanical collisions caused by hardware malfunction.
[0107] The specific implementation steps of the virtual simulation mode in this embodiment of the invention are as follows:
[0108] In the factory creation phase of step S102, the system checks the global simulation flag. If simulation mode is enabled, the factory creates an RSDeviceState_Sim (simulation surrogate). This surrogate object does not load a real DLL (Dynamic-link Library), but instead starts a timer to simulate hardware execution. This allows engineers to verify complex logic jumps and exception handling processes without expensive hardware.
[0109] This invention provides a dynamically configured heterogeneous equipment collaborative control system. It reads a preset process flow configuration file, parses multiple heterogeneous equipment nodes and their flow triggering conditions, and dynamically creates corresponding equipment control state objects through a state instantiation factory based on node type identifiers. These equipment control state objects encapsulate the underlying driver interfaces of the heterogeneous equipment, construct a dynamic signal routing table, and establish a communication connection between the source and target objects using object metadata or dynamic proxy technology based on the signal descriptions in the flow triggering conditions. The state machine engine is then activated, and the equipment control state objects generate and execute internal hardware micro-task sequences based on node parameters. Upon detecting that the hardware physical feedback meets the completion conditions, a flow signal is issued. This invention, through configuration-driven and dynamic mapping mechanisms, shields the hardware interface differences of heterogeneous equipment, achieving zero-code changes to the process flow and abnormal circuit breaker protection, significantly improving the flexibility and development efficiency of automated production lines.
[0110] Accordingly, this embodiment of the invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for collaborative control of heterogeneous devices based on dynamic configuration.
[0111] Through innovative designs such as configuration-driven, dynamic construction, and loosely coupled communication, this invention achieves zero-code changes to the process flow, heterogeneous hardware collaboration, and anomaly protection, significantly improving the flexibility and development efficiency of automated production lines.
[0112] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for dynamic configuration based cooperative control of heterogeneous devices, the method comprising: include: Configuration parsing steps: Read the preset process flow configuration file, which contains information on multiple heterogeneous equipment nodes, node execution parameters, and flow triggering conditions between nodes; Heterogeneous unit construction steps: Traverse the information of the multiple heterogeneous device nodes, and according to the node type identifier, dynamically instantiate the corresponding device control state object through the preset device state factory. The device control state object encapsulates the underlying driver interface and communication protocol of the corresponding heterogeneous hardware. Dynamic routing binding steps: Establish a signal source mapping table, register the instantiated device control status object to the signal source mapping table, parse the signal source description in the flow trigger condition, find the corresponding source object instance from the signal source mapping table, and establish a communication connection between the source object event output and the target object action input based on object meta information or dynamic proxy technology; Layered execution steps: The state machine engine is started. The currently active device control state object generates an internal micro-task sequence based on the node execution parameters and drives the heterogeneous hardware to execute. The device control state object monitors the physical feedback of the heterogeneous hardware in real time. Only after confirming that the heterogeneous hardware action is completed or a preset physical condition is reached, it sends a standardized transition signal to the state machine engine through the communication connection, triggering the state machine engine to jump to the next device node. The device control state object shields the differences in the underlying driver interface and provides a unified transition signal interface to the state machine engine.
2. The method of claim 1, wherein, The device control state object includes at least a displacement drive state object, and the displacement drive state object internally maintains an atomic instruction task queue. In the layered execution step, when the state machine engine switches to the displacement-driven state object, the displacement-driven state object automatically parses the coordinate list in the node execution parameters and fills it into the atomic instruction task queue, and sequentially drives the motor to execute the point movement in the atomic instruction task queue; The displacement-driven state object shields the real-time polling or interrupt logic of the underlying driver interface, and only sends the transition signal to the state machine engine after all instructions in the atomic instruction task team have been executed and physical feedback from the heterogeneous hardware has been received. 3.The method of claim 1, wherein, The process flow configuration file also includes an asynchronous group identifier; In the heterogeneous unit construction step, if multiple heterogeneous device nodes are detected to belong to the same asynchronous group and have no data dependency, then the multiple heterogeneous device nodes are configured to be in parallel state. In the layered execution step, the state machine engine simultaneously activates multiple device control state objects in the parallel state, and waits for all parallel objects to send flow signals through the convergence and transformation node before executing subsequent flow, so as to realize parallel operation of heterogeneous hardware.
4. The method of claim 1, wherein, The flow triggering condition also includes an abnormal route definition, and the method further includes: The device control status object has a built-in watchdog or hardware status monitoring mechanism. When a hardware failure, communication failure, or response timeout is detected during execution, an abnormal interrupt signal is issued. The state machine engine captures the abnormal interrupt signal, dynamically blocks the current flow path according to the abnormal route definition, switches the state to a preset hardware reset safe state, and performs protection actions.
5. The method of claim 1, wherein, The device status factory supports a virtual-to-real switching mode; In the heterogeneous unit construction step, based on the global simulation flag, a real hardware driver object or a virtual simulation object is selected for instantiation. The simulation object is configured to disconnect the physical control interface, start an internal simulation timer, and automatically send simulated flow signals after a preset delay to achieve logic verification in a hardware-free environment.
6. A dynamic configuration based heterogeneous device cooperative control system, characterized in that, include: The configuration management module is used to store and parse process flow configuration files; The main control and scheduling module is used to run the state machine engine and manage the global state transitions; The dynamic construction module is used to dynamically instantiate equipment control status objects according to the process flow configuration file, and establish a communication connection between the source object event output and the target object action input using object meta information or dynamic proxy technology. The heterogeneous execution layer contains multiple device control state objects, which encapsulate the heterogeneous driving protocols of the displacement stage, imaging device and algorithm processing unit, respectively, for executing specific hardware microtasks. The signal routing center is used to maintain the global mapping relationship of the device control state object instances, so as to realize loosely coupled communication between heterogeneous devices.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the program is executed by the processor, it implements the heterogeneous device collaborative control method based on dynamic configuration as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Multi-type industrial equipment PLC control method and device based on hardware abstraction layer
CN120335381A
Industrial configuration software cross-platform cooperative control method and system based on Gawan
CN120704206A