An Electrical Automation Control System and Method for Flexible Production Lines
By integrating workpiece coordinates and robot operating parameters through a distributed three-layer network architecture, a scheduling decision tree is generated, which solves the problem of the inability to synchronize material coordinates and robot unit operating parameters in flexible production lines. This realizes dynamic scheduling logic and data closure, improving the scheduling efficiency and data accuracy of the production line.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- AVINA INTELLIGENT TECHNOLOGY (QINGDAO) CO LTD
- Filing Date
- 2026-04-03
- Publication Date
- 2026-06-02
AI Technical Summary
In the existing electrical automation control of flexible production lines, material coordinate data and robot unit operating parameters cannot be synchronously linked. The data is scattered and not integrated or unpacked. The scheduling logic relies on preset fixed programs and cannot form dynamic decision-making logic. There are shortcomings in data traceability and hierarchical collaboration.
A distributed three-layer network architecture is adopted, including a regional management layer, a PROFINET bus control layer, and a field device layer. Material tracking and equipment health data packets are obtained by polling. After unpacking, the workpiece coordinates and robot running parameters are fused to generate a scheduling decision tree, and the execution result code is associated with the workpiece coordinates and stored.
It achieves a direct correlation between material location information and robot operating status data, dynamically generates scheduling logic, reduces intermediate processing steps, ensures that scheduling is based on actual site conditions, reduces redundancy in bus data transmission, and constructs a complete closed loop for data transmission and storage between levels.
Smart Images

Figure CN122131724A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial electrical automation control technology, specifically a flexible production line electrical automation control system and method. Background Technology
[0002] Existing flexible production line electrical automation control mostly adopts a two-layer network architecture, relying on conventional buses to complete equipment control. Material tracking and equipment health monitoring use independent acquisition modules. The robot clusters and conveyor belts at the field equipment layer are driven by independent control commands, and can only collect material position data or equipment operating parameters individually. The scheduling logic relies on preset fixed programs for execution. The PROFINET bus only undertakes basic command transmission tasks, and the regional management layer only realizes simple equipment status monitoring.
[0003] In traditional control schemes, material coordinate data and robot unit operating parameters cannot be synchronously correlated. Data collected by polling at the field device layer is scattered and not integrated or unpacked. Scheduling instructions are generated based on only single-dimensional data, making it impossible to form dynamic decision-making logic. The PROFINET bus control layer, area management layer, and field device layer do not form a complete data interaction link. The execution results of field devices cannot be associated with the corresponding workpiece coordinates for storage, resulting in shortcomings in data traceability and hierarchical collaboration.
[0004] This invention aims to achieve synchronous acquisition and unpacking of material tracking and equipment health data under a distributed three-layer network architecture, complete the fusion calculation of workpiece coordinates and robot operating parameters to generate a scheduling decision tree, transmit control commands via PROFINET bus, and store the execution result code and workpiece coordinates in association with the area management layer. Summary of the Invention
[0005] This invention aims to solve at least one of the technical problems existing in the prior art; Therefore, this invention proposes an electrical automation control method based on flexible production lines, comprising: Initialize a distributed three-layer network structure, which includes a regional management layer, a PROFINET bus control layer, and a field device layer; Activate the robot cluster and conveyor belt in the field equipment layer, wherein the robot cluster comprises multiple robot units; Poll the field device layer to obtain material tracking data packets and device health data packets; Unpack the material tracking data packet to obtain the workpiece coordinates, and unpack the equipment health data packet to obtain the operating parameters of the robot unit; By integrating the workpiece coordinates and the operating parameters, a scheduling decision tree is calculated. The scheduling decision tree is traversed to output a set of control instructions, which are then sent to the PROFINET bus control layer. The system receives the execution result code returned by the field device layer, associates the execution result code with the workpiece coordinates, and stores it in the area management layer.
[0006] Furthermore, the initialization of the distributed three-layer network structure, which includes a regional management layer, a PROFINET bus control layer, and a field device layer, comprises: Load the network configuration file of the regional management layer, which defines the TCP / IP handshake protocol and ODBC data channel with the manufacturing execution system; Scan the topology of the PROFINET bus control layer, identify the connected industrial Ethernet switch nodes, and assign a unique media access control address to each industrial Ethernet switch node; Enumerate the list of peripherals mounted on the field device layer, the list of peripherals includes sensor arrays and drive units, and establish the mapping relationship between the sensor arrays and physical input ports; Verify the link connectivity between the regional management layer, the PROFINET bus control layer, and the field device layer, and generate a network ready flag.
[0007] Furthermore, the robot cluster and conveyor belt in the field equipment layer are activated, the robot cluster comprising multiple robot units including: A servo power-on command is sent to the robot cluster, and the servo power-on command triggers the release action of the brake inside each robot unit; A frequency converter start command is sent to the conveyor belt, wherein the frequency converter start command sets the baseline speed of the conveyor belt to a constant value; Receive the zero-point calibration completion signal returned by the robot cluster, and record the initial angle values of each joint of the robot unit; The system receives the speed stabilization signal returned by the conveyor belt and reads the cumulative pulse count value of the encoder as the position zero point.
[0008] Furthermore, polling the field device layer to obtain material tracking data packets and device health data packets includes: Trigger queries are periodically sent to the photoelectric sensors in the field equipment layer. The photoelectric sensors respond to the trigger queries and report changes in occlusion status. These changes in occlusion status constitute the core fields of the material tracking data packet. A sampling request is sent in parallel to the current detector in the field device layer. The current detector collects the phase current waveform of the robot unit motor. The phase current waveform is quantized into the device health data packet. Add a timestamp tag to the material tracking data package and add a device identifier tag to the device health data package; The timestamp tag and the device identifier tag are combined to form a data stream to be processed and pushed to the data buffer.
[0009] Furthermore, unpacking the material tracking data packet to obtain workpiece coordinates and unpacking the equipment health data packet to obtain the operating parameters of the robot unit include: The bit stream in the material tracking data packet is parsed, the rising edge trigger time of the photoelectric sensor is extracted, and the physical offset of the workpiece on the conveyor belt is deduced based on the rising edge trigger time. The physical offset is the coordinate of the workpiece. The analog values in the device health data packet are analyzed to calculate the effective power value of the robot unit motor and to identify the harmonic distortion rate in the phase current waveform. The workpiece coordinates are mapped to the global coordinate system, and the effective power value and the harmonic distortion rate are classified as the operating parameters. The workpiece coordinates in the global coordinate system and the operating parameters are combined to generate an environment perception matrix.
[0010] Furthermore, by integrating the workpiece coordinates and the operating parameters, the scheduling decision tree is calculated, including: The environmental perception matrix is input into the rule engine, which loads predefined process constraints, including a minimum safe distance threshold and a maximum load threshold. Traverse each row of data in the environmental perception matrix, compare the workpiece coordinates with the minimum safe distance threshold, and filter out the operable area; Within the operable area, evaluate whether the operating parameters meet the maximum load threshold, and eliminate overloaded robot units; The selected robot units and the workpiece coordinates are arranged and combined to construct the scheduling decision tree containing multiple branch nodes, each of which represents a potential task allocation scheme.
[0011] Furthermore, traversing the scheduling decision tree to output a set of control instructions, which is then directed to the PROFINET bus control layer, includes: The scheduling decision tree is searched using depth-first search, and the estimated execution time corresponding to each branch node is calculated. Compare all the estimated execution times and select the branch node with the shortest execution time as the optimal path; The optimal path is converted into specific kinematic instructions, which include the target point pose in Cartesian space and the angular velocity curve in joint space. The kinematic commands and conveyor belt start / stop commands are encapsulated to form the control command set, and the control command set is injected into the output queue of the PROFINET bus control layer.
[0012] Furthermore, receiving the execution result code returned by the field device layer, and storing the execution result code in the region management layer after associating it with the workpiece coordinates includes: Listen to the feedback port of the PROFINET bus control layer, capture the status byte reported by the field device layer after the action is completed, and the status byte is defined as the execution result code; Analyze the meaning of the execution result code to distinguish between normal completion, timeout alarm, or hardware failure. Read the coordinates of the workpiece currently being processed and establish a one-to-one correspondence between the execution result code and the workpiece coordinates; The correspondence and the original timestamps of the workpiece coordinates are packaged into transaction records and written into the database table of the regional management layer.
[0013] Furthermore, it also includes: Intercept modification requests initiated by operators through the human-machine interface panel, the modification requests being for adjustments to process parameters; Extract the operator identity token from the modification request, and query the permission level corresponding to the operator identity token in the regional management layer; If the permission level is lower than the preset security level, the modification request is rejected and the unauthorized access event is recorded. If the permission level meets the requirements, the new parameter value in the modification request will be updated to the rule engine, and the recalculation process of the scheduling decision tree will be triggered.
[0014] Furthermore, the present invention also includes an electrical automation control system based on a flexible production line, the system including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, it implements the steps of the electrical automation control method based on a flexible production line as described above.
[0015] Compared with the prior art, the beneficial effects of the present invention are: The system polls the field equipment layer to synchronously acquire material tracking data packets and equipment health data packets. It then unpacks these two types of data packets to obtain workpiece coordinates and robot unit operating parameters. The workpiece coordinates and operating parameters are then fused and calculated to obtain a scheduling decision tree. This allows for a direct correspondence between material location information and robot operating status data. Based on the scheduling decision tree generated by data fusion, scheduling logic can be dynamically formed, abandoning the traditional fixed preset scheduling mode. The fusion of multi-dimensional real-time data allows the scheduling logic to fit the real-time working conditions on site. Direct data fusion reduces intermediate data processing steps, making the scheduling basis more closely aligned with the actual operating status on site.
[0016] A distributed three-layer network structure is adopted, consisting of a regional management layer, a PROFINET bus control layer, and a field device layer. The control command set output by traversing the scheduling decision tree is sent to the PROFINET bus control layer. The execution result code returned by the field device layer is received, and the execution result code is associated with the workpiece coordinates and stored in the regional management layer. The distributed three-layer network can realize the functional division and independent operation of each control layer. The directional transmission of control commands can reduce the redundancy of bus data transmission. The associated storage of execution result codes and workpiece coordinates can realize the precise binding of workpiece execution data. The regional management layer can directly obtain the execution feedback data of the corresponding workpiece, thus building a complete closed loop for data transmission and storage between layers. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the steps of an electrical automation control method for a flexible production line as described in this invention. Figure 2 A flowchart for initializing a distributed three-layer network structure; Figure 3 A flowchart for polling the field device layer to obtain data packets; Figure 4 This is a diagram of the S-shaped angular velocity curve in the joint space of the robot. Figure 5 A real-time speed monitoring curve for the conveyor belt of a flexible production line. Detailed Implementation
[0018] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] See Figure 1 This invention provides a method for electrical automation control of a flexible production line, the specific method including: The system initializes a distributed three-layer network structure, consisting of a regional management layer, a PROFINET bus control layer, and a field device layer. After initialization, the robot cluster and conveyor belt in the field device layer are activated. The robot cluster contains multiple robot units that can work independently or collaboratively. The system continuously collects two types of data from the field device layer via a polling mechanism: material tracking data packets and device health data packets. The collected data packets are transmitted to the processing unit for unpacking. The coordinates of the current workpiece on the conveyor belt are parsed from the material tracking data packets, and the real-time operating parameters of each robot unit are parsed from the device health data packets. The system fuses the workpiece coordinates and robot operating parameters obtained from the unpacking and calculates a scheduling decision tree based on preset rules and algorithms. The system traverses this scheduling decision tree, evaluates different task allocation paths, and finally outputs an optimal set of control instructions, which is then directed to the designated field devices via the PROFINET bus control layer. After the instruction is executed, the system receives the execution result code returned from the field equipment layer, associates and binds this result code with the original workpiece coordinates that triggered the instruction, and finally stores the complete association record in the database of the regional management layer for persistent storage, so as to be used for production traceability and data analysis.
[0020] In one embodiment of the present invention, a distributed three-layer network structure is initialized, comprising a regional management layer, a PROFINET bus control layer, and a field device layer. After the system is powered on, refer to... Figure 2 The system loads the network configuration file stored in the regional management layer. This file explicitly defines the TCP / IP handshake protocol parameters required for communication between the regional management layer and the upper-level manufacturing execution system, as well as the ODBC data channel connection string for database access. After completing the regional management layer configuration, the system actively scans the PROFINET bus control layer, detecting and identifying all industrial Ethernet switch nodes connected to the network. The system dynamically assigns a unique Media Access Control (MAC) address to each identified industrial Ethernet switch node for identification and management at the network layer. The system enumerates a list of all peripherals connected to the field device layer via the PROFINET bus. This list comprehensively covers sensor arrays such as photoelectric switches and proximity switches, as well as drive units such as servo drives and frequency converters. During the enumeration process, the system simultaneously establishes the mapping relationship between the physical input port address and the logical function of each sensor array. The system initiates an end-to-end link connectivity check, testing the communication path from the regional management layer through the PROFINET bus control layer to each peripheral at the end of the field device layer. When all preset links pass the check, the system generates a network ready flag, indicating that the initialization of the distributed three-layer network structure is complete and it enters the operational state.
[0021] In practical implementation, initializing the distributed three-layer network structure involves configuring and establishing connections at each level: the regional management layer, the PROFINET bus control layer, and the field device layer. A specific example scenario is a flexible assembly line for automotive parts, where the regional management layer is deployed on a host computer in the production monitoring center. The host computer loads a network configuration file stored on its local solid-state drive. This configuration file defines the handshake protocol parameters required to establish a TCP / IP connection with the upper-layer manufacturing execution system, including the manufacturing execution system's IP address (192.168.1.100), port number (502), and timeout set to 2000 milliseconds. The network configuration file also contains an ODBC data channel connection string for accessing the central production database, specifying the database driver, server address, and access credentials.
[0022] Scanning the topology of the PROFINET bus control layer is accomplished through the discovery protocol in the PROFINET controller. In some embodiments, the PROFINET bus control layer comprises three cascaded industrial Ethernet switch nodes. The scanning process identifies the model and port status of the industrial Ethernet switch nodes. The system assigns a Media Access Control (MAC) address (00-1D-9C-8A-6B-01) to the first industrial Ethernet switch node, 00-1D-9C-8A-6B-02 to the second, and 00-1D-9C-8A-6B-03 to the third. Enumerating the list of peripherals mounted on the field device layer is accomplished by the PROFINET controller polling all discovered nodes. The peripheral list includes sensor arrays and drive units. The sensor arrays include twelve diffuse reflective photoelectric sensors and eight inductive proximity switches, while the drive units include six robot servo drives and two conveyor belt frequency converters. The mapping relationship between the sensor array and the physical input port is established by mapping the signal of the first photoelectric sensor to the first bit of byte 0 of the PROFINET input module, and mapping the signal of the second proximity switch to the fourth bit of byte 2.
[0023] Verifying link connectivity between the zone management layer, the PROFINET bus control layer, and the field device layer is achieved by sending network layer test messages. Optionally, the formula for calculating link connectivity verification is: in: This indicates the success rate of the link verification. This indicates the number of nodes that received a correct response within the specified timeout period. This indicates the total number of target nodes to which test messages were sent during this verification. In practice, the system sends test messages to all identified device nodes. The value is 27, including 1 host computer node, 3 industrial Ethernet switch nodes, 20 sensor nodes, and 3 driver nodes. Within the specified 100 milliseconds, the system received correct responses from 26 nodes. The value is 26. This is understandable; the system calculates the link success rate. The value is approximately 0.963. In some embodiments, the preset link connectivity qualification threshold is 0.95. Since the calculated link success rate is greater than the qualification threshold, the system generates a network ready flag, which is set to logic "1" to indicate successful network initialization. If the link success rate is lower than the qualification threshold, the network ready flag is set to logic "0" and an alarm is triggered.
[0024] In one embodiment of the invention, a robot cluster and conveyor belt in the field device layer are activated. The robot cluster comprises multiple robot units. A control command is first issued, broadcasting a servo power-on command to the robot cluster. This command triggers the enable signal of the servo driver inside each robot unit, thereby controlling the brakes of each joint of the robot to release, allowing the robot to transition from a mechanically locked state to a movable state. Simultaneously, a frequency converter start command is sent to the main controller of the conveyor belt. This command not only starts the conveyor belt drive motor but also sets its baseline speed to a pre-configured constant value. The system then enters a waiting and confirmation phase, receiving zero-point calibration completion signals returned sequentially from the robot cluster. Upon receiving each signal, the initial angle value fed back by the servo motor of each joint of the corresponding robot unit is recorded as the kinematic zero point of that robot. The system also receives speed stabilization signals returned from the conveyor belt controller. When the conveyor belt linear speed reaches and stabilizes at the set value, the pulse accumulation count value output by the encoder directly connected to the conveyor belt drive shaft is read, and this count value is either cleared to zero or recorded as the relative zero point of the conveyor belt position.
[0025] Poll the field equipment layer to obtain material tracking data packets and equipment health data packets. See also Figure 3The system establishes periodic query tasks, sending trigger query commands to photoelectric sensors deployed at key nodes of the conveyor belt at fixed time intervals. The photoelectric sensors respond to these queries by encapsulating information on changes in the occlusion status of their sensing areas, such as real-time on / off signals, as core fields, forming a material tracking data packet. In parallel, the system sends synchronous sampling requests to current detectors installed on the power lines of the drive motors on each axis of the robot unit. These current detectors collect real-time phase current waveform data during motor operation. This analog waveform data is quantized into a digital sequence after analog-to-digital conversion and encapsulated to form a device health data packet. After the data packet is generated, the system adds a precise local timestamp to each material tracking data packet and a unique device identifier tag to each device health data packet, representing its originating robot unit. All tagged data packets are aggregated into a time-ordered data stream to be processed and pushed to a designated data buffer in the system memory, awaiting subsequent unpacking and processing.
[0026] In practical implementation, the robot cluster and conveyor belt in the field equipment layer are activated. The robot cluster contains multiple robot units, and control commands are issued by the control host in the area management layer. An example scenario is a flexible mounting production line for mobile phone screen modules. The field equipment layer of the production line includes a robot cluster consisting of four six-axis articulated robots and a synchronous conveyor belt. The control host broadcasts a servo power-on command to the robot cluster via the PROFINET network. This command triggers the enable signal of the servo driver inside each robot unit. The enable signal drives the six joint brakes of each robot unit to release sequentially, changing the state of all twenty-four joint brakes of the four robots from "locked" to "released".
[0027] The control host simultaneously sends a frequency converter start command to the frequency converter of the conveyor belt. The frequency converter start command includes a start command and a speed setpoint, which sets the baseline speed of the conveyor belt to a constant value of 0.5 meters per second. In some embodiments, after the conveyor belt driver executes the command, the drive motor begins to accelerate, and the encoder feedback pulse frequency gradually increases. After sending the command, the control host listens for feedback messages from the robot controller and receives zero-point calibration completion signals returned by the robot cluster one by one. For each robot signal received, the control host reads and records the initial angle values of the six joints from the absolute encoder of the robot's servo motor. For example, the initial angle value of joint one of the first robot is recorded as +0.005 radians, and the initial angle value of joint two is recorded as -1.571 radians. The control host also receives the speed stabilization signal returned from the conveyor belt frequency converter. When the linear speed calculated from the encoder feedback pulse frequency is stable within the error band of ±2% of 0.5 m / s, the control host reads the cumulative pulse count value of the encoder at this time, for example, the count value is 15289, and sets this cumulative pulse count value as the software zero point for conveyor belt position tracking.
[0028] Polling the field device layer to obtain material tracking data packets and equipment health data packets is achieved through time-slice scheduling tasks within the control host. The control host periodically sends trigger queries to the photoelectric sensors in the field device layer at 100-millisecond intervals. In specific implementation, the trigger query is a digital read command sent to three sets of six photoelectric sensors installed at the conveyor belt inlet, middle, and outlet positions. The photoelectric sensors respond to the trigger query and report the current occlusion state change of their receivers. An occlusion state change, such as a transition from a high level "1" to a low level "0," constitutes the core field "Sensor_State" of the material tracking data packet.
[0029] The control host sends sampling requests in parallel to the current detectors in the field device layer. These requests are transmitted via the PROFINET real-time channel to the current detectors installed on the power lines of the 24 joint motors of the four robots. The current detectors acquire the three-phase current waveforms of the robot unit motors at a frequency of 10 kHz and a sampling duration of 10 milliseconds. The acquired phase current waveforms are quantized by an analog-to-digital converter into a discrete sequence containing 1000 data points, which is then encapsulated into a device health data packet. After the data packet is generated, the control host adds a timestamp tag obtained from a high-precision clock source to each material tracking data packet, for example, a tag value of "2026-07-15 14:30:25.123456". Each device health data packet is also tagged with a device identifier tag from the source robot axis, for example, a tag value of "Robot2_Joint3".
[0030] The timestamp tags and device identifier tags are aggregated to form a data stream to be processed. Optionally, the calculation relationship for data stream aggregation is as follows: in: This represents the set of data streams to be processed generated within a single polling cycle. This represents the timestamp label of the i-th data packet. The device identifier label represents the j-th data packet. This represents the core data payload of the k-th data packet. Within a single polling cycle, the control host may receive 6 material tracking data packets and 24 device health data packets. These 30 tagged data packets can be sorted in the order of receipt and merged into an ordered data stream to be processed. The control host then pushes this data stream to a circular data buffer with a capacity of 1024 data packets.
[0031] In one embodiment of the invention, material tracking data packets are unpacked to obtain workpiece coordinates, and equipment health data packets are unpacked to obtain the operating parameters of the robot unit. The system parses the material tracking data packets in the data buffer, reads their bitstream data, extracts the precise trigger moment of the rising edge of the photoelectric sensor state change from "unobstructed" to "obstructed," and, combined with the known constant linear speed of the conveyor belt and the sensor installation spacing, calculates and deduces the physical offset of the workpiece on the conveyor belt that triggered the signal. This physical offset is defined as the real-time workpiece coordinates. The parsing of the equipment health data packets focuses on the sequence of analog numerical values they contain. By calculating the effective values of current and voltage, the effective power value of the robot unit motor in the current sampling period is obtained. At the same time, spectral analysis is performed on the sampled phase current waveform data to identify the ratio of harmonic components to the total current, i.e., the harmonic distortion rate. The unpacked original workpiece coordinates are further mapped to a global coordinate system with a fixed point on the production line as the origin to provide a unified spatial reference. The calculated effective power value and harmonic distortion rate are categorized as operating parameters characterizing the health and performance of the robot unit. Finally, the system combines the workpiece coordinates in the global coordinate system within the same time slice with the operating parameters of the relevant robot units to form a structured, multi-column data set, namely the environment perception matrix.
[0032] By fusing workpiece coordinates and operating parameters, a scheduling decision tree is calculated. The system uses the generated environmental perception matrix as input and submits it to the embedded rule engine. The rule engine loads predefined process constraints, including but not limited to minimum safe distance thresholds that must be maintained between robots and between robots and workpieces, as well as the maximum load threshold allowed for each robot unit's motor. The rule engine traverses each row of data in the environmental perception matrix. First, based on the workpiece coordinates, it determines the distance between the workpiece and the current position of all robots on the line, filtering out spatial ranges that meet the minimum safe distance thresholds and marking these ranges as operable areas. Next, under the constraints of the operable areas, it evaluates the operating parameters of robot units located near these areas, especially real-time power and load conditions, checking whether they exceed the maximum load threshold, and removing robot units in an overloaded or near-overloaded state from the current schedulable candidate set. Based on the remaining list of available robot units after filtering and the coordinates of the workpieces to be processed, the system performs permutation and combination analysis to construct a tree-structured scheduling decision tree. The root node of the tree represents the current task to be scheduled, each branch node represents a potential task allocation scheme to assign a specific workpiece to a specific robot unit for execution, and each path from the root node to the leaf node represents a complete sequence of scheduling possibilities.
[0033] In practical implementation, the material tracking data packet is unpacked to obtain the workpiece coordinates, and the equipment health data packet is unpacked to obtain the robot unit's operating parameters. The data processing module reads the data stream to be processed from the circular data buffer. In a specific implementation, during one processing cycle of the mobile phone screen module flexible mounting production line, the data processing module parses the bit stream in the material tracking data packet, which is "0x01". It extracts the rising edge trigger time of the photoelectric sensor, which is recorded as "2026-07-15 14:30:25.223456". Given that the conveyor belt baseline speed is 0.5 meters per second and the photoelectric sensor is installed 3.2 meters away from the conveyor belt software zero point, the physical offset of the workpiece on the conveyor belt is calculated. The calculated physical offset is 3.325 meters, which is the real-time workpiece coordinate.
[0034] The data processing module parses the analog value sequence in the device health data packet. This sequence consists of 1000 instantaneous current values collected by the current detector. The effective power value of the robot unit's motor is calculated using the following formula: in: This represents the calculated effective power value, in watts. This represents the total number of sampling points within one sampling period, with a value of 1000. This represents the instantaneous value of the motor phase voltage at the m-th sampling time. This represents the instantaneous value of the motor phase current at the m-th sampling time. The harmonic distortion rate in the phase current waveform is identified by performing a Fast Fourier Transform on the current sequence and calculating the ratio of the sum of the squares of the effective values of all harmonic currents other than the fundamental current to the effective value of the fundamental current. In some embodiments, for a single sampling calculation of the robot unit motor, the input voltage sequence... and current sequence The effective power value was calculated. It has a power rating of 850 watts and a harmonic distortion rate of 5%.
[0035] The workpiece coordinates are mapped to a global coordinate system, with the center of the photoelectric sensor at the conveyor belt inlet as the origin. The physical offset of 3.325 meters is directly mapped to the X-axis coordinate value of 3.325 in the global coordinate system, and the workpiece coordinates are represented as (3.325, 0.0). The effective power value of 850 watts and the harmonic distortion rate of 5% are categorized as operating parameters characterizing the robot's drive state and power quality. The workpiece coordinates and operating parameters in the global coordinate system are combined to generate an environmental perception matrix. Optionally, the environmental perception matrix is a multi-row, multi-column data structure, where each row represents a logically related set of data. Refer to Table 1, which shows a simplified example of the environmental perception matrix data.
[0036] Table 1: Example Table of Environmental Perception Matrix Data By fusing workpiece coordinates and operating parameters, a scheduling decision tree is calculated. The rule engine loads predefined process constraints, including a minimum safe distance threshold of 1.5 meters and a maximum load threshold of 1000 watts. Each row of data in the environmental perception matrix is traversed, comparing the workpiece coordinates with the current position coordinates of the robot unit to calculate the straight-line distance. In some embodiments, the straight-line distance between the workpiece coordinates (3.325, 0.0) and the current position coordinates (1.0, 1.0) of robot unit Robot_1 in the environmental perception matrix is approximately 2.5 meters, which is greater than the minimum safe distance threshold of 1.5 meters. Therefore, this area is selected as an operable area. Another robot unit, Robot_4, is undergoing maintenance; its coordinates are (3.4, 0.1), and its distance from the workpiece is less than 0.2 meters, which is less than the minimum safe distance threshold. Therefore, this area is not listed as an operable area.
[0037] Within the operational area, the system assesses whether the operating parameters meet the maximum load threshold. As shown in Table 1, the effective power of robot unit Robot_3 is 1200 watts, exceeding the maximum load threshold of 1000 watts. Therefore, the system determines that robot unit Robot_3 is overloaded and removes it from the current schedulable candidate set. It can be understood that the filtered robot units include Robot_1 and Robot_2. The filtered robot units Robot_1 and Robot_2 are then combined with the workpiece coordinates (3.325, 0.0) to construct a scheduling decision tree containing multiple branch nodes. The root node of the scheduling decision tree represents the task of "processing the workpiece at coordinates (3.325, 0.0)". The first branch node represents a potential task allocation scheme "executed by Robot_1", the second branch node represents a potential task allocation scheme "executed by Robot_2", and each branch node can be further expanded into more detailed sub-task node sequences such as grasping, handling, and placement.
[0038] In one embodiment of the invention, the scheduling decision tree is traversed to output a control instruction set, which is then sent to the PROFINET bus control layer. The system employs a depth-first search algorithm to traverse the scheduling decision tree. For each complete path from the root node to a leaf node, the total estimated execution time of the scheduling scheme represented by that path is calculated based on factors such as the robot's motion model, path length, and estimated grasping and placement time. Among all traversed paths, the system compares their estimated execution times and selects the path with the shortest execution time as the optimal path for the current working condition. After determining the optimal path, the system converts the task allocation and sequence implicit in that path into specific kinematic instructions executable by the robot. These instructions include the target point pose that the end effector needs to reach when the robot moves in Cartesian space, and the angular velocity curves that each axis servo motor needs to follow when moving in joint space. The system encapsulates these kinematic commands, along with the synchronization commands that control the start and stop of the conveyor belt at specific times, into a control command set with a specific format and protocol. This control command set is then injected into the real-time output queue of the PROFINET bus control layer in the order of execution, and the bus controller is responsible for accurately sending it to the corresponding field devices on a periodic basis.
[0039] The system receives execution result codes from the field device layer and stores them in the area management layer after associating them with workpiece coordinates. The system continuously monitors the dedicated status feedback communication port on the PROFINET bus control layer, capturing status bytes reported by field devices such as robots or conveyor belt drives after receiving and executing control commands. These status bytes are predefined as execution result codes in this method. The system parses the received execution result codes and categorizes them according to their numerical meaning, such as "normal completion," "motion timeout alarm," or "hardware fault error." Simultaneously, the system reads the workpiece coordinates used to generate the control command that triggered the current action and establishes a one-to-one correspondence between the execution result code and this workpiece coordinate in memory. The system packages this association data, along with the original timestamp information of when the workpiece coordinate was generated, into a complete transaction record and transactily writes it to a designated table in the central database connected to the area management layer via the ODBC data channel, completing the archiving of production execution data.
[0040] In practical implementation, the scheduling decision tree is traversed to output a control command set. This control command set is then sent to the PROFINET bus control layer. The path planning module within the control host executes a depth-first search algorithm to search the scheduling decision tree. The scheduling decision tree contains "executed by Robot_1" and "executed by Robot_2" branch nodes. The estimated execution time for each branch node is calculated. The calculation formula is: in: This indicates the estimated execution time of the complete task corresponding to a single branch node. This represents the time required for the robot to move from its current position to the grasping point. This indicates the fixed time for performing the grabbing action. This indicates the time required for the robot to move the workpiece from the gripping point to the placement point. This represents the additional waiting time that may be introduced to avoid other equipment or workpieces. In specific implementation, for the two branch nodes of the scheduling decision tree, the path planning module calls the kinematic model to calculate the estimated execution time of robot unit Robot_1 and robot unit Robot_2 respectively. Refer to Table 2, which shows the calculation elements and results of the estimated execution time for the two branch nodes of the task processing workpiece coordinates (3.325, 0.0).
[0041] Table 2: Example of Calculating Estimated Execution Time for Branch Nodes The path planning module compares the estimated execution time of all branch nodes. As shown in Table 2, the estimated execution time of the "Executed by Robot_2" branch node is... The estimated execution time is 3.6 seconds, shorter than the 4.1 seconds for the "Executed by Robot_1" branch node. Therefore, the path planning module selects the "Executed by Robot_2" branch node as the optimal path for the current working condition. In some embodiments, if the estimated execution time of multiple branch nodes is the same, the path planning module selects the branch node corresponding to the robot unit with the lower effective power value as the optimal path.
[0042] The optimal path is translated into specific kinematic instructions, which include the target point pose in Cartesian space and the angular velocity curves in joint space. In specific implementation, for the optimal path "executed by Robot_2", the path planning module first calculates the target point pose of the gripping point, including the position coordinates (3.325, 0.0, 0.1) and the attitude quaternion (0, 0, 0.707, 0.707), and then calculates the target point pose of the placement point (1.5, 2.0, 0.2). The angular velocity curve in joint space is planned as an S-shaped velocity curve, generating time-angular velocity arrays from the starting angle to the target angle for each of the six joints of the robot unit Robot_2. The kinematic instructions and conveyor belt start / stop commands are encapsulated. The kinematic instructions include the target point pose sequence and angular velocity curve parameters. The conveyor belt start / stop commands include instructions to stop the conveyor belt before the robot unit Robot_2 moves to the gripping point, and instructions to restart the conveyor belt after the placement action is completed. These instructions are packaged into a control instruction set. The control host injects the control instruction set into the real-time output queue of the PROFINET bus control layer. The output queue distributes the instruction set to the controller of the Robot_2 robot unit and the frequency converter of the conveyor belt at a fixed cycle period, such as 4 milliseconds.
[0043] The system receives the execution result code returned by the field device layer, associates the execution result code with the workpiece coordinates, and stores it in the area management layer. The data logging module in the control host continuously monitors the feedback port of the PROFINET bus control layer. In specific implementations, the feedback port is a slot on the PROFINET network specifically used for transmitting input data. The data logging module captures the status byte reported by the field device layer after completing the action. The status byte is an 8-bit binary number, defined as the execution result code. The meaning of the execution result code is parsed: execution result code "0x00" is interpreted as "normal completion", execution result code "0x01" is interpreted as "timeout alarm", and execution result code "0xFF" is interpreted as "hardware failure".
[0044] The data logging module reads the coordinates of the currently processed workpiece. The workpiece coordinates (3.325, 0.0) are obtained from the task context in memory, and a one-to-one correspondence is established between the execution result code and the workpiece coordinates. In some embodiments, if the robot unit Robot_2 successfully completes the grasping and placement and reports the execution result code "0x00", the established correspondence is (0x00, (3.325, 0.0)). It can be understood that if an alarm or fault code is reported, the established correspondence will include the corresponding error code. The correspondence and the original timestamp of the workpiece coordinates are packaged into a transaction record. The transaction record contains the following fields: timestamp "2026-07-15 14:30:25.223456", workpiece coordinate X "3.325", workpiece coordinate Y "0.0", executing robot identifier "Robot_2", and execution result code "0x00". The data logging module writes the transaction record into the "production_log" table of the central database using a Structured Query Language insert command through the ODBC data channel of the regional management layer.
[0045] See Figure 4 This is a graph of the S-shaped angular velocity curves in robot joint space. All three curves are standard S-shaped velocity curves, meeting the optimal trajectory planning requirements for industrial robot motion control. Joint 1 has the fastest acceleration / deceleration and the highest peak value, undertaking the main motion; Joint 2 has moderate acceleration / deceleration and a mid-range peak value, assisting the main motion; Joint 3 has the smoothest acceleration / deceleration and the lowest peak value, used for attitude fine-tuning. These three curves represent typical S-shaped acceleration / deceleration trajectories. During the initial acceleration phase, the acceleration smoothly increases from 0, avoiding mechanical shock; during the constant velocity phase, a stable angular velocity is maintained, improving motion efficiency; and during the stopping phase, the acceleration smoothly decreases to 0, achieving precise stopping. It intuitively demonstrates the core effect of robot joint space trajectory planning, clearly presenting the smooth characteristics of S-shaped acceleration / deceleration, proving that the optimal path output by the scheduling decision tree can be converted into robot-executable, shock-free motion commands.
[0046] In one embodiment of the invention, the method further includes a security and dynamic adjustment mechanism. During system operation, various modification requests initiated by operators through the production line's human-machine interface panel are intercepted in real time. These modification requests typically target process parameters, such as robot operating speed, conveyor belt linear speed, or thresholds in scheduling rules. Upon interception of a modification request, the system extracts the embedded operator identity token from the request data packet. The system queries the regional management layer's authorization database for the preset permission level corresponding to this operator identity token. The system compares the retrieved permission level with the minimum security level required to perform this parameter modification. If the operator's permission level is lower than the security level, the system automatically rejects the modification request and records a violation access event in the security log, including the operator's identity, request time, and request content. If the operator's permission level is equal to or higher than the required security level, the system allows the modification request to proceed, updating the new parameter values contained in the request to the corresponding configuration items or constraints in the rule engine. After the update is complete, the system automatically triggers the environmental perception matrix processing and scheduling decision tree recalculation process based on the new parameters, thereby enabling the production line's control strategy to adapt to process changes online and securely.
[0047] In its implementation, the method incorporates a security and dynamic adjustment mechanism. During system operation, it intercepts modification requests initiated by operators via the human-machine interface (HMI) panel in real time, specifically requests to adjust process parameters. An example scenario involves an operator on the production line's touchscreen HMI panel intending to change the conveyor belt's baseline speed from 0.5 meters per second to 0.7 meters per second. The operator inputs the new speed value and clicks the confirmation button. The HMI panel generates a modification request data packet containing the new parameter value and sends it to the control host. The control host's security module intercepts this modification request data packet at the communication link layer.
[0048] The system extracts the operator's identity token from the modification request and queries the regional management layer for the corresponding permission level. The header of the modification request data packet embeds the identity token string obtained during operator login, such as "TOKEN_OPR_20230715". The security module parses the data packet and extracts the identity token string "TOKEN_OPR_20230715". The security module then sends a query command to the "user_privileges" table in the central database through the ODBC data channel established by the regional management layer. The query command uses the identity token string as a condition, and the database returns the permission level field value corresponding to that token, for example, a permission level of "2" (operator level). In some embodiments, the modification request adjusts the maximum load threshold of the robot unit from 1000 watts to 1200 watts; the system similarly extracts the identity token and queries the database to obtain the corresponding permission level.
[0049] If the access level is lower than the preset security level, the modification request is rejected and the unauthorized access event is logged. The preset security level has different requirements for different process parameters. For example, modifying the conveyor belt speed parameter requires an access level greater than or equal to "2", while modifying the robot safety distance or maximum load threshold requires an access level greater than or equal to "3" (engineer level). The logical relationship of access verification can be expressed as follows: in: A Boolean result indicating whether the authorization was approved. This indicates the actual permission level of the operator obtained from the database query. This indicates the minimum security level required to execute the current modification request. In the conveyor belt speed modification example, it represents the operator's actual privilege level. The minimum security level required by the modification request is set to 2. The value is 2, determined according to the formula. True, authorization approved. In the example of modifying the robot's maximum load threshold, the operator's actual permission level... The minimum security level required by the modification request is 2. The value is 3, so the judgment is made. It is False. This is understandable, when... When the value is False, the system rejects the modification request, the control host does not perform the parameter modification, and at the same time inserts a violation access event record into the "security_log" table of the central database. The record includes the operator's identity token "TOKEN_OPR_20230715", the request time, the name of the parameter to be modified "Max_Load_Threshold", and the requested value "1200".
[0050] If the permission level meets the requirements, the new parameter value in the modification request is updated to the rule engine, triggering a recalculation process for the scheduling decision tree. In some embodiments, for conveyor belt speed modification requests, the system allows modification because authorization is granted. The control host extracts the new parameter value "0.7" from the modification request data packet and uses this value to update the "conveyor belt baseline speed" parameter stored in the rule engine. After the parameter update is complete, the system immediately triggers a recalculation flag. The rule engine and path planning module detect this flag and start a new calculation cycle. In the new calculation cycle, the calculation of workpiece coordinates in the material tracking data packet will be based on the new linear speed of 0.7 meters per second, and the estimated execution time calculation for conveyor belt start and stop times in the scheduling decision tree will also use the new parameter, ultimately generating a control instruction set based on the new speed.
[0051] See Figure 5 This is a real-time monitoring curve of the conveyor belt speed on a flexible production line, comprehensively presenting the conveyor belt's operating status over 24 hours. The blue broken line with dots represents the sampled data of the conveyor belt's real-time speed, exhibiting typical industrial operating characteristics of periodic fluctuations and phased start-stop cycles. It verifies the PROFINET bus control layer's real-time speed regulation capability over the conveyor belt's frequency converter, ensuring the timing synchronization between the robot and the conveyor belt. It provides data support for equipment health monitoring, analyzing the conveyor belt's operating status through speed fluctuations to identify abnormal operating conditions. It intuitively demonstrates the core effect of robot-conveyor belt collaborative scheduling in a flexible production line, clearly presenting the control logic for start-stop synchronization. It can be used for conveyor belt operating status assessment, analyzing motor load and frequency converter conditions through speed fluctuations to provide early warnings of faults.
[0052] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A method for electrical automation control of a flexible production line, characterized in that, The method includes: Initialize a distributed three-layer network structure, which includes a regional management layer, a PROFINET bus control layer, and a field device layer; Activate the robot cluster and conveyor belt in the field equipment layer, wherein the robot cluster comprises multiple robot units; Poll the field device layer to obtain material tracking data packets and device health data packets; Unpack the material tracking data packet to obtain the workpiece coordinates, and unpack the equipment health data packet to obtain the operating parameters of the robot unit; By integrating the workpiece coordinates and the operating parameters, a scheduling decision tree is calculated. The scheduling decision tree is traversed to output a set of control instructions, which are then sent to the PROFINET bus control layer. The system receives the execution result code returned by the field device layer, associates the execution result code with the workpiece coordinates, and stores it in the area management layer.
2. The electrical automation control method for a flexible production line as described in claim 1, characterized in that, The initialization of the distributed three-layer network structure, which includes a region management layer, a PROFINET bus control layer, and a field device layer, comprises: Load the network configuration file of the regional management layer, which defines the TCP / IP handshake protocol and ODBC data channel with the manufacturing execution system; Scan the topology of the PROFINET bus control layer, identify the connected industrial Ethernet switch nodes, and assign a unique media access control address to each industrial Ethernet switch node; Enumerate the list of peripherals mounted on the field device layer, the list of peripherals includes sensor arrays and drive units, and establish the mapping relationship between the sensor arrays and physical input ports; Verify the link connectivity between the regional management layer, the PROFINET bus control layer, and the field device layer, and generate a network ready flag.
3. The electrical automation control method for a flexible production line as described in claim 2, characterized in that, Activate the robot cluster and conveyor belt in the field equipment layer. The robot cluster includes multiple robot units, including: Send a servo power-on command to the robot cluster, which triggers the release action of the brake inside each robot unit; A frequency converter start command is sent to the conveyor belt, wherein the frequency converter start command sets the baseline speed of the conveyor belt to a constant value; Receive the zero-point calibration completion signal returned by the robot cluster, and record the initial angle values of each joint of the robot unit; The system receives the speed stabilization signal returned by the conveyor belt and reads the cumulative pulse count value of the encoder as the position zero point.
4. The electrical automation control method based on a flexible production line as described in claim 3, characterized in that, Polling the field device layer to obtain material tracking data packets and device health data packets includes: Trigger queries are periodically sent to the photoelectric sensors in the field equipment layer. The photoelectric sensors respond to the trigger queries and report changes in occlusion status. These changes in occlusion status constitute the core fields of the material tracking data packet. A sampling request is sent in parallel to the current detector in the field device layer. The current detector collects the phase current waveform of the robot unit motor. The phase current waveform is quantized into the device health data packet. Add a timestamp tag to the material tracking data package and add a device identifier tag to the device health data package; The timestamp tag and the device identifier tag are combined to form a data stream to be processed and pushed to the data buffer.
5. The electrical automation control method for a flexible production line as described in claim 4, characterized in that, Unpacking the material tracking data packet to obtain workpiece coordinates, and unpacking the equipment health data packet to obtain the operating parameters of the robot unit, including: The bit stream in the material tracking data packet is parsed, the rising edge trigger time of the photoelectric sensor is extracted, and the physical offset of the workpiece on the conveyor belt is deduced based on the rising edge trigger time. The physical offset is the coordinate of the workpiece. The analog values in the device health data packet are analyzed to calculate the effective power value of the robot unit motor and to identify the harmonic distortion rate in the phase current waveform. The workpiece coordinates are mapped to the global coordinate system, and the effective power value and the harmonic distortion rate are classified as the operating parameters. The workpiece coordinates in the global coordinate system and the operating parameters are combined to generate an environment perception matrix.
6. The electrical automation control method based on a flexible production line as described in claim 5, characterized in that, By integrating the workpiece coordinates and the operating parameters, the scheduling decision tree is calculated as follows: The environmental perception matrix is input into the rule engine, which loads predefined process constraints, including a minimum safe distance threshold and a maximum load threshold. Traverse each row of data in the environmental perception matrix, compare the workpiece coordinates with the minimum safe distance threshold, and filter out the operable area; Within the operable area, evaluate whether the operating parameters meet the maximum load threshold, and eliminate overloaded robot units; The selected robot units and the workpiece coordinates are arranged and combined to construct the scheduling decision tree containing multiple branch nodes, each of which represents a potential task allocation scheme.
7. The electrical automation control method based on a flexible production line as described in claim 6, characterized in that, Traversing the scheduling decision tree to output a set of control instructions, the set of control instructions being directed to the PROFINET bus control layer includes: The scheduling decision tree is searched using depth-first search, and the estimated execution time corresponding to each branch node is calculated. Compare all the estimated execution times and select the branch node with the shortest execution time as the optimal path; The optimal path is converted into specific kinematic instructions, which include the target point pose in Cartesian space and the angular velocity curve in joint space. The kinematic commands and conveyor belt start / stop commands are encapsulated to form the control command set, and the control command set is injected into the output queue of the PROFINET bus control layer.
8. The electrical automation control method based on a flexible production line as described in claim 7, characterized in that, Receiving the execution result code returned by the field device layer, associating the execution result code with the workpiece coordinates, and storing it in the region management layer includes: Listen to the feedback port of the PROFINET bus control layer, capture the status byte reported by the field device layer after the action is completed, and the status byte is defined as the execution result code; Analyze the meaning of the execution result code to distinguish between normal completion, timeout alarm, or hardware failure. Read the coordinates of the workpiece currently being processed and establish a one-to-one correspondence between the execution result code and the workpiece coordinates; The correspondence and the original timestamps of the workpiece coordinates are packaged into transaction records and written into the database table of the regional management layer.
9. The electrical automation control method based on a flexible production line as described in claim 8, characterized in that, Also includes: Intercept modification requests initiated by operators through the human-machine interface panel, the modification requests being for adjustments to process parameters; Extract the operator identity token from the modification request, and query the permission level corresponding to the operator identity token in the regional management layer; If the permission level is lower than the preset security level, the modification request is rejected and the unauthorized access event is recorded. If the permission level meets the requirements, the new parameter value in the modification request will be updated to the rule engine, and the recalculation process of the scheduling decision tree will be triggered.
10. An electrical automation control system based on a flexible production line, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the flexible production line electrical automation control method as described in any one of claims 1 to 9.