Real-time data synchronization method for multi-level radar control system

By adopting a master-slave architecture and command arbitration mechanism in the feeder control system, the problems of untimely command response and data synchronization distortion in multi-level feeder control systems are solved, and efficient control of high-speed pick-and-place machines is achieved.

CN121069855BActive Publication Date: 2026-02-24DONGGUAN WILDFIRE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511604517.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-02-24
Estimated Expiration
2045-11-05

AI Technical Summary

Technical Problem

In multi-level feeder control systems, there are problems such as untimely command response, data synchronization distortion, and competition and mixed transmission of high-priority and low-priority commands, which makes the control network unable to meet the design requirements of high-speed pick-and-place machines.

Method used

The system adopts a master-slave architecture, which realizes direct synchronization of feeder status information by creating a status information synchronization queue module in the rack card. It also introduces an instruction arbitration mechanism to optimize the scheduling of control instructions and uses a data compression mechanism to reduce bandwidth requirements.

Benefits of technology

It improves the response rate of the terminal feeder to the control commands of the host computer, ensures the timeliness of data under multi-level nodes, avoids the competition and mixed transmission of high-priority commands and low-priority commands, and greatly reduces the data transmission bandwidth requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121069855B_ABST
    Figure CN121069855B_ABST
Patent Text Reader

Abstract

The application discloses a kind of real-time data synchronization methods of multilevel flying device control system, including as host computer, the cabinet card of first level slave station, cabinet card is as host computer, the flying device communication card of third level and the flying device of fourth level, cabinet card creates state information synchronization queue module, cabinet card creates corresponding number of state information synchronization queue in flying device state information buffer area according to the number of flying device communication card accessed, cabinet card reads flying device state information and updates and saves in flying device state information buffer area of cabinet card, until next synchronization flying device state information of current bit number according to the queue order of state information synchronization queue module, host computer directly loops the flying device state information in flying device state information buffer area of cabinet card, does not pass through multilayer forwarding and obtains data, solves multilevel flying device control system instruction response not timely, data synchronization distortion, high priority instruction and low priority instruction competition, mixed transmission problem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of feeder control system technology for high-speed surface mount technology (SMT) machines, and in particular to a real-time data synchronization method for a multi-level feeder control system. Background Technology

[0002] In current surface mount technology (SMT) equipment, the host computer connects to a rack card via an EtherCAT bus, and the rack card is then connected to multiple feeder communication cards via an RS422 serial bus. Each feeder communication card manages dozens of feeders, thus forming a deeply cascaded control network. This control network has the following drawbacks:

[0003] 1. In a multi-level control system, the terminal feeder does not respond to the control commands from the host computer in a timely manner.

[0004] 2. Data synchronization distortion: Under the traditional polling mechanism, for the host computer to synchronize the status data of the feeder, the data needs to be forwarded layer by layer through multiple nodes: host computer → rack card → communication card → feeder → communication card → rack card → host computer. This process traverses all feeder nodes and obtains a round of synchronization data. Each round of synchronization takes more than 100 milliseconds. Therefore, the real-time feeder data displayed on the host computer is distorted and is actually historical data.

[0005] 3. Current deeply cascaded control networks lack arbitration mechanisms, leading to competition and mixed transmission of high-priority and low-priority instructions.

[0006] Obviously, the defects of the control network mentioned above are inconsistent with the design concept of high-speed, high-response pick-and-place machine. Therefore, there is an urgent need for a control scheme that can effectively overcome the non-real-time command response and data distortion in multi-level feeder control systems. Summary of the Invention

[0007] To address the shortcomings of existing technologies, the purpose of this invention is to provide a real-time data synchronization and command scheduling optimization method for a multi-level feeder control system, which solves the problems of untimely command response, data synchronization distortion, competition between high-priority and low-priority commands, and mixed transmission in multi-level feeder control systems.

[0008] To achieve the above objectives, the technical solution adopted by this invention is: a real-time data synchronization method for a multi-level feeder control system.

[0009] The multi-level feeder control system adopts a master-slave architecture.

[0010] The first level is the host computer, which serves as the master station of the entire multi-level feeder control system. The host computer directly synchronizes the feeder status information in real time from the feeder status information buffer area set in the cabinet card. At the same time, the host computer issues control commands according to the placement control process.

[0011] The second level is the rack card, which acts as the first-level slave station of the host computer, enabling communication between the host computer and the rack card.

[0012] The third level is the Feida communication card, and the rack card communicates with multiple Feida communication cards;

[0013] The fourth level is the feeder. Each feeder communication card is connected to multiple feeders. The feeder acts as a terminal slave station. Each feeder responds to the instructions of the corresponding feeder communication card and reports its own status information to the corresponding feeder communication card.

[0014] The real-time data synchronization method for a multi-level feeder control system includes the following steps:

[0015] Step 1: Create a status information synchronization queue module. The rack card creates a corresponding number of status information synchronization queues in the feeder status information buffer based on the number of feeder communication cards connected. One feeder communication card corresponds to one status information synchronization queue. The queue members of a status information synchronization queue consist of the feeder status information of each feeder of the corresponding feeder communication card. The feeder status information includes line status and error status. The status information synchronization queues in the status information synchronization queue module are executed sequentially in a cyclical manner. The rack card synchronizes the feeder status information with each feeder communication card in real time.

[0016] Step 2: After the feeder communication card receives the synchronization data instruction, it parses the feeder number that needs to be synchronized, enables the channel with the feeder of that number, organizes the data frame and forwards it to the feeder of the corresponding number, and synchronizes the feeder status information of the corresponding feeder in real time.

[0017] Step 3: The rack card reads the feeder status information and updates and saves it in the feeder status information cache area of ​​the rack card. The feeder status information of the current position number is synchronized again according to the queue order of the status information synchronization queue module. The host computer directly synchronizes the feeder status information in the feeder status information cache area of ​​the rack card in a loop, without obtaining data through multiple layers of forwarding.

[0018] In a further technical solution, the cabinet card receives instructions from the host computer via the EtherCAT communication protocol, the cabinet card establishes communication with the feeder communication card based on the RS422 protocol, and the feeder communication card forwards the instructions to the feeder connected to the corresponding bit number via the UART communication protocol.

[0019] Each feeder communication card responds to the control command forwarded by the rack card, parses the command data frame of the control command and obtains the tag number of the target feeder to be controlled, monitors the information feedback of the target feeder and reports it to the rack card. Each feeder communication card simultaneously manages the power supply of dozens of feeders currently connected to the feeder communication card.

[0020] The data frame is stored in the feeder status information buffer of the cabinet card. The data structure of the data frame includes an EtherCAT frame header, EtherCAT data and check data. The EtherCAT data includes the control instruction for writing operations performed by the host computer (master station), the controlled feeder bit, the first other data, and the online status, error status and second other data for reading operations performed by the host computer (master station). The online status is 0 or 1, and the error status is 0 or 1.

[0021] In a further technical solution, the cabinet card parses the control commands issued by the host computer and forwards them to the corresponding Feida communication card;

[0022] The feeder communication card controls the power supply of N feeders currently connected to the feeder communication card, forwards the control commands of the cabinet card to the feeders with the corresponding bit numbers, and the status information synchronization of the feeder communication card is all processed in parallel. The synchronized feeder status information is saved and updated in the feeder status information buffer of the cabinet card for the host computer to use in real time for synchronization.

[0023] The feeder responds to the control commands of the feeder communication card, feeds the pick and place machine quickly and accurately, and simultaneously reports feeder status information to the feeder communication card.

[0024] In a further technical solution, the cabinet card is also equipped with a first instruction scheduling optimization method for optimizing the instruction scheduling of the control system.

[0025] The host computer issues control commands according to the mounting control process or during the optimization phase before mounting work.

[0026] When the cabinet card does not receive a control command, it cyclically synchronizes the feeder status information according to the queue order of the status information synchronization queue. After the cabinet card receives a control command from the host computer, it immediately inserts the control command directly into the queue before the head of the status information synchronization queue of the corresponding feeder communication card through the command arbitration module and sends it down immediately. The corresponding feeder communication card immediately forwards the control command of the cabinet card to the feeder with the corresponding bit number, and the feeder with the corresponding bit number immediately responds to the control command of the feeder communication card.

[0027] In a further technical solution, the control instructions issued by the host computer are high-priority instructions. The control instructions include feeder feeding control instructions in the placement process, pitch modification instructions in the optimization stage, and instructions for reading or setting feeder information. The high-priority control instructions are immediately sent to the feeder communication card and executed immediately after passing through the instruction arbitration module in the cabinet card.

[0028] In a further technical solution, the cabinet card is also equipped with a second instruction scheduling optimization method for optimizing the instruction scheduling of the control system.

[0029] The queue members in each of the status information synchronization queues are sequentially cyclical. The cabinet card creates an enqueue module task and a dequeue module task for each feeder communication card, which are used to cycle through the queue members according to the feeder position number. In the enqueue module task, feeder position numbers are added to the queue sequentially. The queue member at the head of the status information synchronization queue is removed through the dequeue module task. The queue member that is removed is pushed into the tail of the status information synchronization queue through the enqueue module task.

[0030] In a further technical solution, if the status information synchronization queue of the enqueue module task is full, it waits non-blockingly until the queue is not full before adding the current feeder bit number, and then synchronizes the status information of each feeder in sequence.

[0031] In the dequeue module task of the status information synchronization queue, after waiting for the previous frame to be responded to normally, the first feeder tag number in the current queue is directly obtained and added to the new status information synchronization data frame of the feeder communication card corresponding to the current queue.

[0032] In a further technical solution, after receiving the data from the feeder communication card, the cabinet card updates and saves it in the feeder status information cache area. When it receives the control command from the host computer to synchronize the feeder status information, the cabinet card directly packages and compresses the contents of the feeder status information cache area and reports it directly to the host computer.

[0033] In a further technical solution, the packaging and compression involves compressing the status information of all feeders on a single feeder communication card into a 64-bit data type. Each bit represents the online status of the corresponding feeder, arranged in the order of the feeder tag number on the feeder communication card.

[0034] The various error codes and error content of the single feeder are compressed into a single bit, which has two states: 0 or 1. 0 represents no error and 1 represents an error. The host computer only needs to synchronize 256 bits, which is a total of 32 bytes of data.

[0035] When the Nth feeder is in an error state, only the error content of the Nth feeder is read and synchronized.

[0036] In a further technical solution, the rack card creates enqueue module tasks and dequeue module tasks for each feeder communication card, cyclically based on the feeder position number.

[0037] The rack card connects to n Feida communication cards and creates n status information synchronization queues for each card. Enqueue module task with n feeder positions in a cycle And the dequeue module task for n status information synchronization queues. ,

[0038] A status information synchronization queue Corresponding to a queuing module task A queuing module task ,

[0039] Initialized status information synchronization queue All members are arranged in the order of all feeder bits that the corresponding feeder communication card can access.

[0040] The corresponding feeder tag number,

[0041] Based on the task of the departure module The flyer ID of the first member of the queue is in the status information synchronization queue. The query retrieves queue members with the same feeder position number.

[0042] Deployment Module Task Remove the member at the front of the line.

[0043] The queue members obtained from the query are added to a new frame of status information synchronization data with the corresponding feeder communication card and sent to the corresponding feeder for execution.

[0044] Joining the team module task Push the eliminated members to the back of the queue;

[0045] The rack card communicates with each feeder communication card point-to-point for data and commands via RS422, while each feeder communication card remains relatively independent.

[0046] Each queue member's data structure contains a feeder number and its corresponding control instruction. When no high-priority control instruction is received from the host computer, the feeder control instructions for all numbers are data synchronization instructions issued by the rack card.

[0047] The advantages of this invention compared to the prior art are:

[0048] 1. Improved the response rate of the terminal feeder to the host computer's control commands in a multi-level feeder control system.

[0049] 2. It ensures the timeliness of the status information data of more than one hundred feeders that need to be periodically synchronized under multi-level nodes.

[0050] 3. By introducing an instruction arbitration mechanism, the competition and mixed transmission of high-priority and low-priority instructions are avoided.

[0051] 4. The data compression mechanism compresses the complex and redundant online status and error information of each feeder into bits, greatly reducing bandwidth requirements.

[0052] 5. It provides a complete and reliable control solution for multi-level control systems in industrial manufacturing. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the multi-level feeder control system framework of the present invention.

[0054] Figure 2 This is a schematic diagram of the real-time data synchronization queue channel workflow of the multi-level feeder control system of the present invention.

[0055] Figure 3 This is a schematic diagram of the instruction scheduling process of the multi-level feeder control system of the present invention.

[0056] Figure 4 This is a schematic diagram of the status information synchronization queue members entering and leaving the queue of the multi-level feeder control system of the present invention.

[0057] Figure 5 This is a schematic diagram of the master station synchronous flight status information buffer area data of the multi-level flight control system of the present invention. Detailed Implementation

[0058] Real-time data synchronization method for multi-level feeder control system Figures 1 to 5 As shown,

[0059] The multi-level feeder control system adopts a master-slave architecture.

[0060] The first level is the host computer, which serves as the master station for the entire multi-level feeder control system. It synchronizes the feeder status information of each feeder in real time and issues control commands according to the placement control process.

[0061] Specifically, the host computer issues control commands according to the placement control process or during the optimization stage before placement work; the host computer directly synchronizes the feeder status information in real time from the feeder status information cache of the rack card.

[0062] The second level is the rack card. The rack card acts as the first-level slave station of the host computer. The host computer communicates with the rack card. The rack card parses the control commands issued by the host computer and forwards them to the corresponding feeder communication cards. The rack card has a feeder status information buffer. The rack card synchronizes the corresponding feeder status information with multiple feeder communication cards in real time.

[0063] The third level is the feeder communication card. The rack card communicates with multiple feeder communication cards. The status information synchronization of the feeder communication cards is processed in parallel. The synchronized feeder status information is saved and updated in the feeder status information buffer of the rack card for real-time synchronization by the host computer. The feeder communication card controls the power supply of the N feeders currently connected to the feeder communication card and forwards the control commands of the rack card to the feeders with the corresponding bit numbers.

[0064] The fourth level is the feeder. Each feeder communication card is connected to multiple feeders. The feeder acts as a terminal slave station. Each feeder responds to the instructions of its corresponding feeder communication card, feeds the pick and place machine quickly and accurately, and reports its status information to the feeder communication card.

[0065] The rack card receives instructions from the host computer via the EtherCAT communication protocol. The rack card establishes communication with the feeder communication card based on the RS422 protocol. The feeder communication card forwards the instructions to the feeders connected to the corresponding positions via the UART communication protocol. Each feeder communication card responds to the control instructions forwarded by the rack card, parses the instruction data frame of the control instructions and obtains the position number of the target feeder to be controlled, monitors the information feedback of the target feeder and reports it to the rack card. Each feeder communication card simultaneously manages the power supply of dozens of feeders currently connected to it.

[0066] The real-time data synchronization method for a multi-level feeder control system includes the following steps:

[0067] Step 1: The host computer issues action commands according to the placement control process or issues control commands such as modifying the step distance during the optimization stage before placement work.

[0068] Step 2: When the rack card does not receive a control command, it cyclically synchronizes the feeder status information according to the queue order of the status information synchronization queue.

[0069] After receiving the control command from the host computer, the cabinet card immediately inserts the control command directly into the state information synchronization queue of the corresponding Feida communication card through the command arbitration module and sends it out immediately.

[0070] Step 3: The corresponding feeder communication card immediately forwards the control command of the cabinet card to the feeder with the corresponding tag number.

[0071] Step 4: The feeder with the corresponding bit number immediately responds to the control command of the feeder communication card.

[0072] In this process, when the rack card does not receive a high-priority control command from the host computer, the commands that the rack card periodically synchronizes with the feeder status information through the status information synchronization queue are low-priority commands. The feeder position number enqueue module generates the feeder position numbers that need to be synchronized and pushes them into the tail position of the corresponding synchronization queue. Then, the status information synchronization queue dequeue module sends them out in sequence and saves the synchronized data in the feeder status information buffer. At the same time, the host computer and the rack card synchronize the feeder status information in the feeder status information buffer in real time. Once the rack card receives a control command from the host computer that needs to be sent to the feeder, the command arbitration module inserts it directly before the head of the status information synchronization queue of the corresponding feeder communication card. After the channel is ready, the current high-priority control command is sent out directly.

[0073] In the optimization phase before placement, the host computer interacts with the operator, issues control commands such as modifying feeder pitch, and sets all feeders to a ready state. During the placement process, it issues action commands according to the placement control flow to control the feeder with the specified tag number to feed the material. At the same time, it is responsible for synchronizing the status information of all feeders in real time, processing the synchronized data, and if it determines that a feeder has an error, it reads the error status code of that feeder and presents the error content to the operator.

[0074] The rack card receives instructions from the host computer via EtherCAT communication. It establishes communication with the feeder communication card based on the RS422 protocol. Using the "Real-time Data Synchronization Method for Multi-level Feeder Control System" provided by this invention, it inserts the host computer's control instructions into the first position of the corresponding queue, forwarding them to the corresponding feeder communication card as quickly as possible. Simultaneously, using the same method, it polls and synchronizes the status information of each feeder with the feeder communication card and writes it to the rack card's feeder status information buffer for real-time synchronization by the host computer. The feeder communication card, as the second-level slave station of the rack card, responds to the rack card's instructions, parses the instruction data frame to obtain the corresponding target feeder tag number to be controlled, and forwards it to the feeder connected to that tag number via UART communication. It monitors the information feedback from the target feeder and reports it to the rack card, while also managing and controlling the power supply to the dozens of feeders connected to it.

[0075] The control commands issued by the host computer are high-priority commands. These commands include feeder feeding control commands in the placement workflow, pitch modification commands in the optimization stage, and commands to read or set feeder information. Figure 3This diagram illustrates the instruction scheduling workflow of the multi-level feeder control system of the present invention. The instruction arbitration module in the cabinet card immediately sends high-priority control instructions to the feeder communication card for immediate execution. This mechanism enables the slave feeder communication cards and terminal feeders in the multi-level feeder control system to respond to the host computer's control instructions as realistically as possible, and avoids contention and mixed transmission of high-priority control instructions and low-priority feeder status information synchronization instructions.

[0076] Figure 1 The Feida communication card n in the diagram represents the maximum number of cards in the access cabinet; Feida m represents the maximum number of Feida communication cards in the access cabinet. The maximum number of n and m varies depending on the model of the pick-and-place machine. Generally, n is 2 to 4 cards and m is 28 to 36 cards.

[0077] To address the issues of untimely command response, data synchronization distortion, and mixed transmission of high-priority and low-priority commands in multi-level feeder control systems, this invention provides a second command scheduling optimization method for optimizing control system command scheduling. This method includes the following steps:

[0078] Step S1: Based on the number of connected feeder communication cards, create a sequential, cyclically synchronized feeder status information queue in the rack card. For each feeder communication card, create a feeder number enqueue module task and a status information synchronization queue dequeue module task. In the enqueue task, feeder numbers are added sequentially to the queue. If the queue is full, it waits non-blockingly until the queue is not full before adding the current feeder number, ensuring that the status information of each feeder is synchronized in sequence. In the dequeue task, after waiting for a normal response to the previous frame, directly obtain the first feeder number in the current queue and add it to the new status information synchronization data frame of the feeder communication card corresponding to the current queue.

[0079] Step S2: The feeder communication card forwards the synchronization data command of the cabinet card to the feeder with the corresponding bit number, and reports the response from the feeder to the cabinet card.

[0080] Step S3: The feeder status information read by the rack card is updated and saved in the cache until the next synchronization of the feeder status information of the current tag number.

[0081] Step S4: The host computer directly and continuously synchronizes the feeder status information in the rack card buffer area, without needing to obtain data through multiple layers of forwarding.

[0082] More detailed steps are as follows:

[0083] Step S1: The rack card creates a status information synchronization queue module in its feeder status information cache area.

[0084] The cabinet card creates corresponding numbers of status information synchronization queues in the feeder status information buffer according to the number of feeder communication cards accessed. One feeder communication card corresponds to one status information synchronization queue. The queue members of one status information synchronization queue consist of the feeder status information of each feeder of the corresponding feeder communication card. The feeder status information includes line status and error status. Each status information synchronization queue forms a status information synchronization queue module. The status information synchronization queues in the status information synchronization queue module are arranged in sequence and cyclically executed. The cabinet card synchronizes the feeder status information with each feeder communication card in real time;

[0085] Step S2: After the feeder communication card receives the synchronization data instruction, it analyzes the feeder bit numbers that need to be synchronized, enables the channels of the feeders with the corresponding bit numbers through the built-in software of the feeder (prior art), sorts out the data frames, encrypts them, and then forwards them to the feeders with the corresponding bit numbers. After the feeder correctly responds and reports the synchronization status information, it immediately feeds back to the cabinet card to synchronize the feeder status information of the corresponding feeder in real time;

[0086] Step S3: After the cabinet card receives the data fed back by the feeder communication card, it updates and saves it in the feeder status information buffer until the feeder status information of the current bit number is synchronized next time according to the queue order of the status information synchronization queue module.

[0087] When the instruction received from the upper computer is to synchronize the feeder status information, there is no need to issue it through multiple levels. The content in the status information buffer can be directly packed and compressed and reported to the upper computer. The packing and compression mechanism compresses the complex and redundant data in the buffer to reduce the bandwidth requirements on the communication link with the upper computer and further improve the transmission efficiency.

[0088] Regarding the packing and compression mechanism, the packing and compression include compressing the status information of all feeders on a single feeder communication card into a 64-bit data type. Each bit represents the online status of the corresponding feeder arranged in the order of the feeder bit numbers of the feeder communication card. Compress the various error codes and error contents of a single feeder into one bit, and the bit has two states, 0 or 1. 0 represents no error, and 1 represents an error. The upper computer only needs to synchronize 256 bits to synchronize a total of 32 bytes of data. When there is an error status in the Nth feeder, only read and synchronize the error content of the Nth feeder.

[0089] For example, regarding the online status of feeders—that is, whether the interface of each feeder is connected—if one byte represents the online status of one feeder, it would require more than one hundred bytes. However, the online status of a feeder is only 0 or 1. Therefore, the status information of all feeders on a single feeder communication card can be compressed into a 64-bit data type, with each bit representing the online status of one feeder, leaving sufficient spare space for future expansion. Taking four communication cards, with a maximum of 36 feeders connected on each card, as an example, the host computer only needs to synchronize 256 bits, or 32 bytes of data, compared to the original requirement of reading 144 bytes, which is a significant improvement. This reduces bandwidth requirements. Similarly, the error status data of feeders is much larger and more complex. Through the data compression mechanism described above, the various error codes and error content of a single feeder are compressed into two states represented by one bit: 0 (no error) and 1 (error). The host computer only needs to synchronize 256 bits, or 32 bytes of data. When all feeders are error-free, the host computer can continuously synchronize the status information of all feeders connected to the feeder interface in real time with very low bandwidth requirements. When it is determined that a feeder is in an error state, the error content of that feeder is read. Through precise positioning, it is not necessary to synchronize the error content of all feeders (including feeders that are not in an error state).

[0090] Step S4: The host computer directly and cyclically synchronizes the feeder status information in the feeder status information buffer of the rack card. When the rack card receives the control command from the host computer to synchronize the feeder status information, it directly packages and compresses the contents of the feeder status information buffer and reports it directly to the host computer, without obtaining data through multiple layers of forwarding.

[0091] This invention creates a corresponding number of synchronization queues, and the synchronization of status information of all feeder communication cards is processed in parallel. The feeder communication cards do not interfere with each other. Each feeder communication card saves and updates the synchronized feeder status information in the status information cache area of ​​the rack card for real-time synchronization with the host computer. Compared with the traditional solution, it avoids the multi-level node forwarding of data layer by layer in the process of "host computer → rack card → communication card → feeder → communication card → rack card → host computer". According to actual tests, the synchronization period required for feeder status information is reduced from hundreds of milliseconds to tens of milliseconds, and specifically from more than 500ms to within 30ms, which greatly improves the synchronization efficiency and ensures the timeliness of feeder status information.

[0092] In step S1,

[0093] The queue members in each status information synchronization queue are sequentially cyclical. The rack card creates an enqueue module task and a dequeue module task for each feeder communication card, which are used to cycle through the queue members according to the feeder position number. In the enqueue module task, feeder position numbers are added to the queue sequentially. The queue member at the head of the status information synchronization queue is removed through the dequeue module task. The queue member that is removed is pushed into the tail of the status information synchronization queue through the enqueue module task.

[0094] Specifically, the rack card creates enqueue module tasks and dequeue module tasks for each feeder communication card, which cycle according to the feeder position number. In the enqueue module task, feeder position numbers are added to the queue sequentially. If the status information synchronization queue of the enqueue module task is full, it waits non-blockingly until the queue is not full before adding the current feeder position number. The status information of each feeder is synchronized in sequence. In the dequeue module task of the status information synchronization queue, after waiting for the previous frame to be responded to normally, it directly obtains the first feeder position number in the current queue and adds it to the new status information synchronization data frame of the feeder communication card corresponding to the current queue.

[0095] Specifically, the rack card creates enqueue module tasks and dequeue module tasks for each feeder communication card, cyclically based on the feeder tag number.

[0096] The rack card connects to n Feida communication cards and creates n status information synchronization queues for each card. Enqueue module task with n feeder positions in a cycle And the dequeue module task for n status information synchronization queues. ,

[0097] A status information synchronization queue Corresponding to a queuing module task A queuing module task ,

[0098] Initialized status information synchronization queue All members are arranged in the order of all feeder bits that the corresponding feeder communication card can access.

[0099] The corresponding feeder tag number,

[0100] Based on the task of the departure module The flyer ID of the first member of the queue is in the status information synchronization queue. The query retrieves queue members with the same feeder position number.

[0101] Deployment Module Task Remove the member at the front of the line.

[0102] The queue members obtained from the query are added to a new frame of status information synchronization data with the corresponding feeder communication card and sent to the corresponding feeder for execution.

[0103] Joining the team module task Push the eliminated members to the back of the line;

[0104] The rack card communicates with each feeder communication card point-to-point for data and commands via RS422, while each feeder communication card remains relatively independent.

[0105] Each queue member's data structure contains a feeder number and its corresponding control instruction. When no high-priority control instruction is received from the host computer, the feeder control instructions for all numbers are data synchronization instructions issued by the rack card.

[0106] For example, combined Figure 2 and Figure 4 The diagram illustrates the enqueueing and dequeueing mechanism of the status information synchronization queue in the rack card, using the status information synchronization queue as an example. For example, queue Each member's data structure includes a feeder tag number and its control instructions. When no high-priority control instructions are received from the host computer, the feeder control instructions for all tags are data synchronization instructions issued by the rack card. Conversely, the control instructions for the feeder tags that the host computer needs to control are high-priority control instructions issued by the host computer. To clearly illustrate the order of members in the queue, the feeder tag number is used to represent the data structure of the members in the queue in the diagram and below. Initialized queue All members are arranged in the order of all feeder numbers that can be accessed by the corresponding feeder communication card 1, i.e., feeder 1, feeder 2, ..., feeder m-1, feeder m. This is during a dequeue mission. The queue is determined at this time. If there are members, directly retrieve the queue. The first feeder tag number, feeder 1, is added to the new status information synchronization data frame of feeder communication card 1 and sent out. At this time, it is in the enqueue task. The queue was determined in the middle. If the queue is not full, push the bit number Feda1 into the queue. The rear of the queue; thus, they periodically carry out missions. Once it is determined that the previous frame was responded to normally, the queue is immediately retrieved. The first feeder tag number in the queue is added to the new status information synchronization frame and sent out during the enqueue task. Non-blocking waiting queue Until the state is not full, add the current sequence of feeder bits to ensure that the status information of each feeder is synchronized in sequence.

[0107] The host computer, acting as the master station, establishes communication with each slave station via EtherCAT at a fixed time period T. The time period T is XX milliseconds (please specify). Here, T is a preset, extremely short time period, ensuring real-time data synchronization between the master and slave stations. For example... Figure 5 As shown, the EtherCAT communication data packet contains read and write operations for each slave station, and the rack card described in this application is one of its slave stations. The rack card, through the optimized method for real-time data synchronization of a multi-level feeder control system provided in the second aspect of this invention, updates the synchronized feeder status information in the rack card's status information buffer. Each status is an independent buffer; for example, the online status buffer stores the online status of all feeders from position 1 to position m, and the error status is similarly handled. Whenever the rack card receives an EtherCAT communication data packet from the master station after a time period T, it compresses and packages the feeder's online and error statuses into the corresponding data segment. Simultaneously, the rack card checks if the data segment from the master station's write operation has a new control command. If so, it immediately responds and forwards the command to the corresponding feeder communication card via the command arbitration mechanism, thus ultimately delivering the control command to the target feeder.

Claims

1. A real-time data synchronization method for a multi-level feeder control system, characterized in that: The multi-level feeder control system adopts a master-slave architecture. The first level is the host computer, which serves as the master station of the entire multi-level feeder control system. The host computer directly synchronizes the feeder status information in real time from the feeder status information buffer area set in the cabinet card. At the same time, the host computer issues control commands according to the placement control process. The second level is the rack card, which acts as the first-level slave station of the host computer, enabling communication between the host computer and the rack card. The third level is the Feida communication card, and the rack card communicates with multiple Feida communication cards; The fourth level is the feeder. Each feeder communication card is connected to multiple feeders. The feeder acts as a terminal slave station. Each feeder responds to the instructions of the corresponding feeder communication card and reports its own status information to the corresponding feeder communication card. The real-time data synchronization method for a multi-level feeder control system includes the following steps: Step 1: Create a status information synchronization queue module. The rack card creates a corresponding number of status information synchronization queues in the feeder status information buffer based on the number of feeder communication cards connected. One feeder communication card corresponds to one status information synchronization queue. The queue members of a status information synchronization queue consist of the feeder status information of each feeder of the corresponding feeder communication card. The feeder status information includes line status and error status. The status information synchronization queues in the status information synchronization queue module are executed sequentially in a cyclical manner. The rack card synchronizes the feeder status information with each feeder communication card in real time. Step 2: After the feeder communication card receives the synchronization data instruction, it parses the feeder number that needs to be synchronized, enables the channel with the feeder of that number, organizes the data frame and forwards it to the feeder of the corresponding number, and synchronizes the feeder status information of the corresponding feeder in real time. Step 3: The rack card reads the feeder status information and updates and saves it in the feeder status information cache area of ​​the rack card. The feeder status information of the current position number is synchronized again according to the queue order of the status information synchronization queue module. The host computer directly synchronizes the feeder status information in the feeder status information cache area of ​​the rack card in a loop, without obtaining data through multiple layers of forwarding.

2. The real-time data synchronization method for a multi-level feeder control system according to claim 1, characterized in that: The cabinet card receives instructions from the host computer via the EtherCAT communication protocol. The cabinet card establishes communication with the feeder communication card based on the RS422 protocol. The feeder communication card forwards the instructions to the feeder connected to the corresponding bit number via the UART communication protocol. Each feeder communication card responds to the control command forwarded by the rack card, parses the command data frame of the control command and obtains the tag number of the target feeder to be controlled, monitors the information feedback of the target feeder and reports it to the rack card. Each feeder communication card simultaneously manages the power supply of dozens of feeders currently connected to the feeder communication card. The data frame is stored in the feeder status information buffer of the cabinet card. The data structure of the data frame includes an EtherCAT frame header, EtherCAT data and check data. The EtherCAT data includes the control instruction for writing operations by the host computer, the controlled feeder bit, the first other data, and the online status, error status and second other data for reading operations by the host computer. The online status is 0 or 1, and the error status is 0 or 1.

3. The real-time data synchronization method for a multi-level feeder control system according to claim 1, characterized in that: The cabinet card parses the control commands issued by the host computer and forwards them to the corresponding Feida communication card; The feeder communication card controls the power supply of N feeders currently connected to the feeder communication card, forwards the control commands of the cabinet card to the feeders with the corresponding bit numbers, and the status information synchronization of the feeder communication card is all processed in parallel. The synchronized feeder status information is saved and updated in the feeder status information buffer of the cabinet card for the host computer to use in real time for synchronization. The feeder responds to the control commands of the feeder communication card, feeds the pick and place machine quickly and accurately, and simultaneously reports feeder status information to the feeder communication card.

4. The real-time data synchronization method for a multi-level feeder control system according to claim 1, characterized in that: The cabinet card is also equipped with a first instruction scheduling optimization method for optimizing the instruction scheduling of the control system. The host computer issues control commands according to the mounting control process or during the optimization phase before mounting work. When the cabinet card does not receive a control command, it cyclically synchronizes the feeder status information according to the queue order of the status information synchronization queue. After the cabinet card receives a control command from the host computer, it immediately inserts the control command directly into the queue before the head of the status information synchronization queue of the corresponding feeder communication card through the command arbitration module and sends it down immediately. The corresponding feeder communication card immediately forwards the control command of the cabinet card to the feeder with the corresponding bit number, and the feeder with the corresponding bit number immediately responds to the control command of the feeder communication card.

5. The real-time data synchronization method for a multi-level feeder control system according to claim 4, characterized in that: The control commands issued by the host computer are high-priority commands. These commands include feeder feeding control commands in the placement process, pitch modification commands in the optimization stage, and commands to read or set feeder information. The high-priority control commands are immediately sent to the feeder communication card and executed immediately after passing through the command arbitration module in the cabinet card.

6. The real-time data synchronization method for a multi-level feeder control system according to any one of claims 1 to 5, characterized in that: The cabinet card is also equipped with a second instruction scheduling optimization method for optimizing the instruction scheduling of the control system. The queue members in each of the status information synchronization queues are sequentially cyclical. The cabinet card creates an enqueue module task and a dequeue module task for each feeder communication card, which are used to cycle through the queue members according to the feeder position number. In the enqueue module task, feeder position numbers are added to the queue sequentially. The queue member at the head of the status information synchronization queue is removed through the dequeue module task. The queue member that is removed is pushed into the tail of the status information synchronization queue through the enqueue module task.

7. The real-time data synchronization method for a multi-level feeder control system according to claim 6, characterized in that: If the status information synchronization queue of the enqueue module task is full, it will wait non-blockingly until the queue is not full, then add the current feeder bit number, and synchronize the status information of each feeder in sequence. In the dequeue module task of the status information synchronization queue, after waiting for the previous frame to be responded to normally, the first feeder tag number in the current queue is directly obtained and added to the new status information synchronization data frame of the feeder communication card corresponding to the current queue.

8. The real-time data synchronization method for a multi-level feeder control system according to claim 7, characterized in that: After receiving the data from the feeder communication card, the rack card updates and saves it in the feeder status information cache. When it receives the control command from the host computer to synchronize the feeder status information, the rack card directly packages and compresses the contents of the feeder status information cache and reports it directly to the host computer.

9. The real-time data synchronization method for a multi-level feeder control system according to claim 8, characterized in that: Packaging and compression involves compressing the status information of all feeders on a single feeder communication card into a 64-bit data type. Each bit represents the online status of the corresponding feeder, arranged in the order of feeder tag numbers on the feeder communication card. The various error codes and error content of the single feeder are compressed into a single bit, with the bit having two states: 0 represents no error and 1 represents an error. The host computer only needs to synchronize 256 bits, which is a total of 32 bytes of data. When the Nth feeder is in an error state, only the error content of the Nth feeder is read and synchronized.

10. The real-time data synchronization method for a multi-level feeder control system according to claim 6, characterized in that: The rack card creates enqueue module tasks and dequeue module tasks for each feeder communication card, cyclically based on the feeder position number. The rack card connects to n Feida communication cards and creates n status information synchronization queues for each card. Enqueue module task with n feeder positions in a cycle And the dequeue module task for n status information synchronization queues. , A status information synchronization queue Corresponding to a queuing module task A queuing module task , Initialized status information synchronization queue All members are arranged in the order of all feeder bits that the corresponding feeder communication card can access. The corresponding feeder tag number, Based on the task of the departure module The flyer ID of the first member of the queue is in the status information synchronization queue. The query retrieves queue members with the same feeder position number. Deployment module task Remove the member at the front of the line. The queue members obtained from the query are added to a new frame of status information synchronization data with the corresponding feeder communication card and sent to the corresponding feeder for execution. Joining the team module task Push the eliminated members to the back of the queue; The rack card communicates with each feeder communication card point-to-point for data and commands via RS422, while each feeder communication card remains relatively independent. Each queue member's data structure contains a feeder number and its corresponding control instruction. When no high-priority control instruction is received from the host computer, the feeder control instructions for all numbers are data synchronization instructions issued by the rack card.

Citation Information

Patent Citations

  • Driving and control integrated system and storage medium

    CN116300535A

  • Control system of SMT high-speed chip mounter based on EtherCAT

    CN119270738A