CN112638144B - Chip mounter control method adopting hierarchical state machine - Google Patents

Chip mounter control method adopting hierarchical state machine Download PDF

Info

Publication number
CN112638144B
CN112638144B CN202011514940.4A CN202011514940A CN112638144B CN 112638144 B CN112638144 B CN 112638144B CN 202011514940 A CN202011514940 A CN 202011514940A CN 112638144 B CN112638144 B CN 112638144B
Authority
CN
China
Prior art keywords
state
event
button
hierarchical
chip mounter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011514940.4A
Other languages
Chinese (zh)
Other versions
CN112638144A (en
Inventor
唐学峰
李博川
于缓缓
傅亚男
张云雷
周凯
金长明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Anxin Precision Technology Co Ltd
Original Assignee
Hefei Anxin Precision Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Anxin Precision Technology Co Ltd filed Critical Hefei Anxin Precision Technology Co Ltd
Priority to CN202011514940.4A priority Critical patent/CN112638144B/en
Publication of CN112638144A publication Critical patent/CN112638144A/en
Application granted granted Critical
Publication of CN112638144B publication Critical patent/CN112638144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05KPRINTED CIRCUITS; CASINGS OR CONSTRUCTIONAL DETAILS OF ELECTRIC APPARATUS; MANUFACTURE OF ASSEMBLAGES OF ELECTRICAL COMPONENTS
    • H05K13/00Apparatus or processes specially adapted for manufacturing or adjusting assemblages of electric components
    • H05K13/04Mounting of components, e.g. of leadless components
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05KPRINTED CIRCUITS; CASINGS OR CONSTRUCTIONAL DETAILS OF ELECTRIC APPARATUS; MANUFACTURE OF ASSEMBLAGES OF ELECTRICAL COMPONENTS
    • H05K13/00Apparatus or processes specially adapted for manufacturing or adjusting assemblages of electric components
    • H05K13/08Monitoring manufacture of assemblages
    • H05K13/0882Control systems for mounting machines or assembly lines, e.g. centralized control, remote links, programming of apparatus and processes as such

Abstract

The invention discloses a chip mounter control method adopting a hierarchical state machine, which comprises the following steps: 1, decomposing the working state of the chip mounter into a plurality of sub-states in a hierarchical state machine; 2, packaging each subsystem information of the chip mounter into events and temporarily storing the events into an event queue, and dividing event types into subsystem events, control panel button events and manual operation events; and 3, defining an instruction event scheduler between the level state machine and the chip mounter, wherein the instruction event scheduler is composed of an instruction queue and an event queue and is responsible for processing and forwarding events. The invention can carry out optimized management and control on the actions of the surface-mounted components of the surface-mounted machine, and reduce the misoperation and safety accidents of the surface-mounted machine, thereby improving the performance and the operation reliability of the surface-mounted machine.

Description

Chip mounter control method adopting hierarchical state machine
Technical Field
The invention relates to the technical field of chip mounter electronics, in particular to a chip mounter control method.
Background
The full-automatic multi-head arch type chip mounter equipment is characterized in that a plurality of mounting heads, a plurality of suction nozzles, a plurality of servo motor high-speed components and other mechanical device structures are adopted, in the process of automatically mounting components, the servo motor motion control, substrate transmission motion control, camera control, an image recognition system and other components are involved to execute corresponding actions, the flows of component absorption, component recognition, component mounting, suction nozzle exchange and the like are realized through complex state switching of component processing, and the purpose of quickly and accurately mounting the components is realized by combining an advanced machine vision recognition technology. The automatic numerical control equipment is a very complex high-speed and high-precision electromechanical integration and computer integrated control system and has different levels of real-time requirements.
How to properly manage and control the actions of the surface-mounted components of the surface-mounted machine becomes the key point and the difficulty of a surface-mounted machine control system. If the method implemented by using if-else or switch-case statements to program is used according to the conventional flow chart, a large number of conditional branch statements are introduced, and meanwhile, the readability and expansibility of the program are poor, so that the later function expansion and maintenance are not facilitated.
Secondly, along with the fact that the automation degree of the chip mounter is higher and higher, the high-speed mounting requirement is higher and faster, and in addition, the characteristics of high magnetic field intensity generated by high-speed movement of the servo motor, the repeated use times of equipment and the like and the operation of operators at any time can cause interference on the software and hardware operation of the existing chip mounter control system, possibly cause misoperation of the chip mounter and even cause safety accidents in the process of mounting components by the chip mounter. When the chip mounter operates normally, no matter what action is executed by any shaft servo motor, once an emergency occurs, the whole equipment shaft servo motor is required to be stopped immediately, and accidents are prevented. This requires that the servo motor control system of the chip mounter has a function of controlling all components of the entire chip mounter to stop operating immediately.
In an automatic component mounting control circuit of a chip mounter, a shutdown circuit in a control system generally has two control modes, the first control mode is to stop a power supply of a servo motor of a whole equipment shaft when an emergency stop button is pressed down, so that the equipment must be immediately stopped when an accident occurs to ensure the safety of life and equipment, and the mode has the advantages that when the emergency stop button is pressed down, the motion of all shafts can be immediately stopped, and the defect that a worker cannot know fault information generated by the control system by using an upper computer due to the fact that part of the power supply of the control circuit is not available, and the reason of the fault is difficult to accurately find; the second control mode is that the power supply is not stopped when the slap is stopped, but the signal of the slap stop button is sent to the upper computer, and the upper computer software is used for sending the instruction of stopping the shaft to stop the movement of the shaft, so that the purpose of stopping the movement of the shaft is achieved. The module has the advantages that even if the emergency stop button is turned off, the fault condition of the equipment can still be known through the upper computer, the fault position can be accurately positioned, and the fault finding is facilitated. Therefore, both the two conventional stop control modes have advantages and disadvantages, and the requirements of rapid fault diagnosis, stability and reliability in production are difficult to meet only by adopting a single stop control mode in practical application.
In summary, the control system of the chip mounter is a complex multi-task controller with different levels of real-time requirements, and the functions, actions, initial states of each subsystem in the system and the relationship of mutual operations among the subsystems must be clearly described in system modeling, and the relationship is directly related to the performance and operational reliability of the system. The control program developed by the conventional programming mode contains a large amount of hard-coded information depending on a specific chip mounter, and the developed control program is difficult to be applied to different state requirement control systems. Therefore, the conventional design, implementation and testing of the control program requires considerable time and cost.
Disclosure of Invention
The invention aims to solve the defects of the prior art and provides a chip mounter control method adopting a hierarchical state machine so as to optimally manage and control the actions of mounting elements of the chip mounter and reduce the false operation and safety accidents of the chip mounter, thereby improving the performance and the operation reliability of the chip mounter.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention relates to a chip mounter control method adopting a hierarchical state machine, which is characterized by being applied to a production environment consisting of an upper computer, the hierarchical state machine and a chip mounter and being carried out according to the following steps:
step 1, decomposing the working state of the chip mounter into a plurality of sub-states in a hierarchical state machine, including: an operating state S1 and a system fault state S2; the operating state S1 is a parent state and includes: a power-on initialization state S11, a production state S12, an application warning state S13, and a first history state H1; the production state S12 is also a parent state and includes: a reset state S12a, an auto-generation state S12b, a pause production state S12c, and a second history state H2;
at any time, the hierarchical state machine is always in a unique sub-state;
step 2, packaging each subsystem information of the chip mounter into events and temporarily storing the events into an event queue, and dividing event types into subsystem events, control panel button events and manual operation events;
the subsystem event is formed by packaging instruction interaction information or error code information generated by a subsystem, and comprises the following steps: application alert events, system error events, and subsystem status events;
the control panel button event is encapsulated by a control panel button trigger signal and comprises: an enabling control panel button Active, an automatic generating button Start, a Stop device operation button Stop, a servo motor enabling button Ready, a Reset state button Reset, a Clear Error warning information button Error Clear and an Emergency Stop button Emergency Stop; and each button press generates a corresponding button event;
the human operation event is an event generated by the operation and control of an operator through a GUI module, and comprises the following steps: continuing to execute and cancel operations;
step 3, defining an instruction event scheduler between the hierarchical state machine and the chip mounter, wherein the instruction event scheduler is composed of an instruction queue and an event queue and is responsible for processing and distributing instructions and events;
the event queue scheduler distributes events from the event queue to the hierarchical state machine;
after the distributed event is received by the hierarchical state machine and is used as a new driving event, all conversion included in the current sub-state is checked, and if the new driving event is matched with a predefined event, the hierarchical state machine transfers the current sub-state to a target state designated by the event; if the state matched with the driving event cannot be found, discarding the corresponding driving event, and keeping the sub-state unchanged; thus, each sub-state of the hierarchical state machine is transferred in an event-driven manner.
The chip mounter control method using the hierarchical state machine according to the present invention is also characterized in that the functions and operations of each sub-state in step 1 are as follows:
the startup initialization state S11 is an initial state and is a state entered after the chip mounter is started;
when the chip mounter enters the startup initialization state S11, the chip mounter executes the operations of checking whether the connection of each subsystem is successful, checking initialization information of each subsystem, and checking whether a servo motor completes initialization state operation; after initialization of each subsystem is completed, the chip mounter issues and executes the action of returning to the origin of the servo motor; in the starting initialization state S11, the moving command of the servo motor shaft is prohibited from being issued to the servo motor control module;
when the reset state S12a is entered, the mounter performs a reset operation including: checking whether all subsystems are executing the instructions, and if the subsystems execute the instructions, sending a command to stop executing and reset the subsystems; checking whether the instruction queue is empty, and if not, clearing all instructions in the instruction queue;
when the automatic production state S12b is entered, the mounter firstly obtains instruction sets of the plurality of subsystems according to mounting data in the component mounting substrate file through analysis, and then sequentially writes the instruction sets into an instruction queue according to the order, and secondly, when the instruction event scheduler detects an instruction to be executed in the instruction queue, the instruction event scheduler issues the instruction to the subsystems; according to the instruction set mounting flow action parameters obtained from the substrate file data, finishing the instruction set in the instruction queue so as to realize the production action of the chip mounter;
when the production pause state S12c is entered, the chip mounter pauses the operation of distributing the execution instruction queue to the subsystems, and each subsystem is stopped after the previous instruction is executed;
when the application warning state S13 is entered, the chip mounter firstly suspends the execution of the command queue and distributes the command queue to the subsystem action, then the GUI module is used for displaying warning information, and the operation personnel is waited to select whether to continue execution or cancel processing;
when entering a system fault state S2, the mounter performs an emergency stop operation;
when entering History State H1: leave the parent state S1 and automatically save the last active child state before exiting the parent state S1; thus automatically transitioning to the parent state S1 last active child state when the history state H1 is re-entered;
when entering History State H2: leave the parent state S12 and automatically save the last active child state before exiting the parent state S12; thus automatically transitioning to the parent state S12 last active child state when the history state H2 is re-entered.
The state transition process of the hierarchical state machine in the step 3 is as follows:
entering a power-on initialization state S11 and executing corresponding functions and operations after the chip mounter is powered on, transferring to a production state S12 after completing the corresponding operations in the power-on initialization state S11, and executing the corresponding functions and operations after entering a reset state S12 a;
when the human operation event is received and the current state is the starting initialization state S11, the hierarchical state machine discards the received human operation event from the event queue and does not execute the state transition;
when the button event generated by the auto-generate button Start is received and the current state is the reset state S12a, the hierarchical state machine transitions to the auto-production state S12b and performs the functions and operations of the auto-production state S12 b;
when a button event generated by the Stop device operation button Stop or the Reset state button Reset is received and the current state is the production state S12b, the hierarchical state machine transitions to the pause production state S12c and performs a corresponding function and operation;
when a button event generated by a Reset state button Reset is received and the current state is a suspended production state S12c, the hierarchical state machine transitions to a Reset state S12a and performs corresponding functions and operations;
when the button event generated by the auto-generate button Start is received and the current state is the suspended production state S12c, the hierarchical state machine transitions to the auto-generate state S12b and performs the corresponding function and operation;
when a button event generated by an enable control panel button Active or a servo motor enable button Ready is received and the current state is a reset state S12a or an automatically generated state S12b or a suspended production state S12c, the state machine discards the corresponding event from the event processing queue and does not perform a state transition;
when an application alert event is received and the current state is the production state S12, the hierarchical state machine transitions to the application alert state S13 and performs the corresponding functions and operations while the history state H2 saves the last active child state in the parent state production state S12;
when the continuous execution in the human operation event is received and the current state is the application warning state S13, the state machine transitions to the historical state H2 and executes the corresponding function and operation;
when a cancel operation in a human operation event is received and the current state is the application warning state S13, the state machine transitions to the reset state S12a and performs corresponding functions and operations;
when a system error event is received and is not currently in the system fault state S2, the state machine transitions to the system fault state S2 and performs the corresponding functions and operations, while the first history state H1 saves the last active sub-state of the working state S1;
when the Emergency Stop button is not released, any event of a control panel button event or a human operation event is received, and the current state is the system fault state S2, the hierarchical state machine discards the received corresponding event from the event processing queue, and does not execute the state transition;
when the Emergency Stop button is released, the button event generated by the servo motor enable button Ready is received, and the current state is the system fault state S2, the hierarchical state machine is transferred to the historical state H1, and corresponding functions and operations are executed;
upon receipt of a system error event in any of the sub-states, the hierarchical state machine enters the system fault state S2 and allows the other sub-states to be entered only when the Emergency shutdown button Emergency Stop is released.
The executing emergency stop operation comprises system fault emergency stop and emergency stop when an emergency stop button is pressed down;
when other subsystems have faults, the subsystem firstly feeds error code information back to the command event scheduler, then stops the motion of the servo motor and cuts off the power supply of the servo motor, and quits the commands being executed by all the subsystems, and then the upper computer clears all the command information in the command queue after acquiring the error code information of the subsystems and displays the command information on the GUI module;
the Emergency Stop is realized by pressing the Emergency Stop button, when the Emergency Stop button is pressed, the corresponding subsystem feeds back a trigger signal of an Emergency Stop relay to the command event scheduler, and the upper computer displays the pressed state information of the Emergency Stop button on the GUI module when acquiring the signal of the Emergency Stop button of the subsystem.
Compared with the prior art, the invention has the beneficial effects that:
the invention separates the control part from the working state of the chip mounter, processes the chip mounter by decomposing the working process of the chip mounter into a plurality of simple states, controls and manages the transfer process of the hierarchical state machine in the production process of the surface mounting element of the chip mounter, and ensures that the logic of a control system is clearer, so that the coding is simpler, the correct and efficient operation of the control task of the chip mounter is ensured, and the robustness of the system is better.
Drawings
FIG. 1 is a state transition diagram of a hierarchical state machine according to the present invention;
fig. 2 is a schematic diagram of a chip mounter control process proposed by the present invention.
Detailed Description
In this embodiment, a chip mounter control method using a hierarchical state machine is applied to a production environment formed by an upper computer, the hierarchical state machine, and a chip mounter, and includes steps of firstly performing induction analysis on the work of mounting components of the chip mounter, decomposing the work state of the chip mounter into a plurality of sub-states in the hierarchical state machine, linking different sub-states of the chip mounter through event-driven transfer, and then performing scheduling management on instructions and event queues by using an instruction event scheduler. The subsystem is divided according to the functions of the chip mounter and mainly comprises an XY axis motion subsystem, a substrate conveying device subsystem, a mounting head subsystem, a machine vision processing subsystem, a suction nozzle exchange station subsystem, a control panel subsystem and the like. And after receiving the task instruction, each subsystem executes corresponding action. Specifically, the control method comprises the following steps:
step 1, as shown in fig. 1, decomposing the working state of the chip mounter into a plurality of sub-states in a hierarchical state machine, including: an operating state S1 and a system fault state S2; further, the operating state S1 is a parent state, and the nested child state includes: a power-on initialization state S11, a production state S12, an application warning state S13, and a first history state H1; further, the production state S12 is also a parent state, and the nested child state includes: a reset state S12a, an auto-generation state S12b, a pause production state S12c, and a second history state H2; the father state is composed of a plurality of son states, and the son states inside the father state are transferred according to events.
The function and operation of the various sub-states is as follows:
the startup initialization state S11 is an initial state and is a state entered after the chip mounter is started;
when entering the starting initialization state S11, the chip mounter executes the operations of checking whether the connection of each subsystem is successful, checking the initialization information of each subsystem and whether the servo motor completes the initialization state operation; after the initialization of each subsystem is completed, the chip mounter issues and executes the return-to-origin point action of the servo motor; in the starting initialization state S11, the servo motor shaft movement instruction is prohibited from being issued to the servo motor control module;
when entering the reset state S12a, the mounter performs a reset operation including: checking whether all subsystems are executing the instructions, and if the subsystems execute the instructions, sending a command to stop executing and reset the subsystems; checking whether the instruction queue is empty, and if not, clearing all instructions in the instruction queue;
when the automatic production state S12b is entered, the chip mounter firstly analyzes the mounting data in the component mounting substrate file to obtain instruction sets of a plurality of subsystems, and then sequentially writes the instruction sets into an instruction queue according to the sequence, and then the instruction event scheduler issues the instructions to the subsystems when checking the instructions to be executed in the instruction queue; the instruction set obtained according to the substrate file data comprises component absorption, identification, component mounting and other mounting process action parameters, and the instruction set in the instruction queue is completed, so that the absorption, identification, mounting and other production actions of the chip mounter are realized;
when the production pause state S12c is entered, the chip mounter pauses the operation of distributing the execution instruction queue to the subsystems, and each subsystem is stopped after the previous instruction is executed;
when the application warning state S13 is entered, the chip mounter firstly suspends the execution of the command queue to distribute to the subsystem action, then displays warning information by using a GUI module, and waits for an operator to select whether to continue execution or cancel processing;
when entering the system fault state S2, the chip mounter performs an emergency stop operation; this state indicates that a serious error has occurred in the device and the action command will no longer be executed. In the embodiment, the emergency stop operation is divided into system fault emergency stop and emergency stop when the emergency stop button is pressed down;
when other subsystems have faults, the subsystem firstly feeds error code information back to the command event scheduler, then stops the motion of the servo motor and cuts off the power supply of the servo motor, and exits commands being executed by all subsystems, and then the upper computer clears all command information in the command queue after acquiring the subsystem error code information and displays the command information on the GUI module; helping the operator to find and locate problems. According to the scheme, the upper computer can search the problem source by only stopping the servo motor and normally executing other functional modules in the subsystem.
The Emergency Stop is realized by pressing the Emergency Stop button, when the Emergency Stop button is pressed, the corresponding subsystem feeds back a trigger signal of an Emergency Stop relay to the command event scheduler, and when the upper computer acquires the signal of the Emergency Stop button of the subsystem, the upper computer displays the pressed state information of the Emergency Stop button on the GUI module. After the state of the emergency stop button is recovered, the normal operation of the chip mounter can be recovered only by resetting the safety relay.
When entering History State H1: leave the parent state S1 and automatically save the last active child state before exiting the parent state S1; thus automatically transitioning to the parent state S1 last active child state when the history state H1 is re-entered;
when entering History State H2: leave the parent state S12 and automatically save the last active child state before exiting the parent state S12; thus automatically transitioning to the parent state S12 last active child state when the history state H2 is re-entered;
as shown in FIG. 1, at any time, the hierarchy state machine is always in a unique sub-state;
step 2, resolving the task into a plurality of instructions to be written into an instruction queue, wherein the instruction queue sequentially issues the instructions to each subsystem through I/O according to a logic sequence, the subsystems execute corresponding actions according to the received instructions, meanwhile, the subsystems feed back information in real time, information of each subsystem of the chip mounter is packaged into events and temporarily stored in the event queue, and event types are divided into subsystem events, control panel button events and manual operation events;
the subsystem event is formed by packaging instruction interaction information or error code information generated by the subsystem, and comprises the following steps: a, applying a warning event, namely generating a warning information signal by a subsystem; the system error event is a system error signal when the subsystem or the control system generates unpredictable errors and cannot continue to operate; the C subsystem state event refers to a servo motor, a component state or a subsystem connection state information signal.
The control panel button event is encapsulated by a control panel button trigger signal and comprises: an enabling control panel button Active, an automatic generating button Start, a Stop device operation button Stop, a servo motor enabling button Ready, a Reset state button Reset, a Clear Error warning information button Error Clear and an Emergency Stop button Emergency Stop; and each button press generates a corresponding button event; e.g., Reset button event, is when a control panel Reset button trigger signal is received.
The manual operation event is an event generated by the operation of an operator through a GUI module of the upper computer, and comprises the following steps: continuing to execute or cancel the operation; the method for displaying the relevant information of the working state of the current chip mounter through the GUI module mainly comprises the following steps: working state, subsystem state, error information, control instruction information, etc.;
step 3, as shown in fig. 2, an instruction event scheduler is defined between the hierarchical state machine and the chip mounter, and is composed of an instruction queue and an event queue and is responsible for the encapsulation, processing and forwarding of events; in the command event scheduler, there are two processing methods for processing the written new control command: direct processing and queue processing. The direct processing is that the instruction is directly issued to the subsystem without the need of system operation conditions; the queue processing is to add the control instruction into the instruction queue and issue the control instruction to the corresponding subsystem from the instruction queue according to the sequence.
The event queue scheduler distributes the events from the event queue to the hierarchical state machine;
as shown in fig. 1, after receiving the distributed event as a new driving event, the hierarchical state machine sequentially processes the transition of the sub-states and the event, checks all transitions included in the current sub-state, and if the new driving event matches with a predefined event, the hierarchical state machine transitions from the current sub-state to a target state specified by the event; if the state matched with the driving event cannot be found, discarding the corresponding driving event, and keeping the sub-state unchanged; thus, each sub-state of the hierarchical state machine is transferred in an event-driven manner.
As shown in fig. 1, the hierarchical state machine sequentially reads events from the event queue for processing, and executes predefined functional operations after entering a sub-state; the state transition process of the hierarchical state machine is as follows:
entering a power-on initialization state S11 and executing the functions and operations described in the initialization state S11 after the chip mounter is powered on; when a subsystem connection success event, a self-test completion event and a servo motor return to an original point event are received, and the current state is a power-on initialization state S11, the production state S12 is transferred, the production state S12 is a father state, the initialization sub state is a reset state S12a, and therefore the production state S12 is transferred to a reset state S12a, and corresponding functions and operations of the reset state S12a are executed;
when the human operation event is received and the current state is the starting initialization state S11, the hierarchical state machine discards the received human operation event from the event queue and does not execute the state transition;
when the button event generated by the auto generation button Start is received and the current state is the reset state S12a, the hierarchical state machine transitions to the auto production state S12b and performs the functions and operations of the auto production state S12 b;
when a button event generated by the Stop device operation button Stop or the Reset state button Reset is received and the current state is the production state S12b, the hierarchical state machine transitions to the suspended production state S12c and performs the function and operation of the suspended production state S12 c;
when the button event generated by the Reset state button Reset is received and the current state is the suspended production state S12c, the hierarchical state machine transitions to the Reset state S12a and performs the functions and operations of the Reset state S12 a;
when the button event generated by the auto generation button Start is received and the current state is the suspended production state S12c, the hierarchical state machine transitions to the auto generation state S12b and performs the functions and operations of the auto generation state S12 b;
when a button event generated by an enable control panel button Active or a servo motor enable button Ready is received and the current state is a reset state S12a or an automatically generated state S12b or a suspended production state S12c, the hierarchical state machine discards the corresponding event from the event processing queue and does not perform state transition;
when an application alert event is received and the current state is the production state S12, the hierarchical state machine transitions to the application alert state S13 and performs the corresponding functions and operations while the second historical state H2 saves the last active sub-state of the production state S12;
when the continuous execution in the human operation event is received and the current state is the application warning state S13, the hierarchical state machine transitions to a second historical state H2 and executes corresponding functions and operations; if the saved sub-state of the history state H2 is the suspended state S12c, the suspended state S12c is entered;
when a cancel operation in the human operation event is received and the current state is the application warning state S13, the state machine transitions to the reset state S12a and performs the functions and operations of the reset state S12 a;
when a system error event such as a system error or a sudden stop button is received and the current state is not the system fault state S2, the state machine shifts to the system fault state S2 and executes corresponding functions and operations, and meanwhile, the first history state H1 saves the last active sub-state of the working state S1;
when the Emergency Stop button is not released, and any event in a control panel button event or a human operation event is received, and the current state is the system fault state S2, the hierarchical state machine discards the received corresponding event from the event processing queue and does not execute state transition;
when the Emergency Stop button is released, the button event generated by the servo motor enable button Ready is received, and the current state is the system fault state S2, the hierarchical state machine is transferred to the historical state H1, and corresponding functions and operations are executed;
upon receipt of a system error event in any of the sub-states, the hierarchical state machine enters the system fault state S2 and is permitted to enter the other sub-states only when the Emergency shutdown button Emergency Stop is released.
In summary, the invention uses the hierarchical state machine to describe the working state of the chip mounter, separates the control part of the chip mounter from the working state, and decomposes the production process of the chip mounter into different running state systems based on the hierarchical state machine, so that the complex control logic relationship of the chip mounter becomes simple and clear, and the correct and efficient running of the control task of the chip mounter is ensured.

Claims (2)

1. A chip mounter control method adopting a hierarchical state machine is characterized by being applied to a production environment formed by an upper computer, the hierarchical state machine and a chip mounter and comprising the following steps:
step 1, decomposing the working state of the chip mounter into a plurality of sub-states in a hierarchical state machine, including: an operating state S1 and a system fault state S2; the operating state S1 is a parent state and includes: a power-on initialization state S11, a production state S12, an application warning state S13, and a first history state H1; the production state S12 is also a parent state and includes: a reset state S12a, an auto-generation state S12b, a pause production state S12c, and a second history state H2;
at any time, the hierarchical state machine is always in a unique sub-state;
the function and operation of each sub-state in step 1 are as follows:
the startup initialization state S11 is an initial state and is a state entered after the chip mounter is started;
when the chip mounter enters the startup initialization state S11, the chip mounter executes the operations of checking whether the connection of each subsystem is successful, checking initialization information of each subsystem, and checking whether a servo motor completes initialization state operation; after initialization of each subsystem is completed, the chip mounter issues and executes the action of returning to the origin of the servo motor; in the starting initialization state S11, the moving command of the servo motor shaft is prohibited from being issued to the servo motor control module;
when the reset state S12a is entered, the mounter performs a reset operation including: checking whether all subsystems are executing the instructions, and if the subsystems execute the instructions, sending a command to stop executing and reset the subsystems; checking whether the instruction queue is empty, and if not, clearing all instructions in the instruction queue;
when the automatic production state S12b is entered, the mounter firstly obtains instruction sets of the plurality of subsystems according to mounting data in the component mounting substrate file through analysis, and then sequentially writes the instruction sets into an instruction queue according to the order, and secondly, when the instruction event scheduler detects an instruction to be executed in the instruction queue, the instruction event scheduler issues the instruction to the subsystems; according to the instruction set mounting flow action parameters obtained from the substrate file data, finishing the instruction set in the instruction queue so as to realize the production action of the chip mounter;
when the production pause state S12c is entered, the chip mounter pauses the operation of distributing the execution instruction queue to the subsystems, and each subsystem is stopped after the previous instruction is executed;
when the application warning state S13 is entered, the chip mounter firstly suspends the execution of the command queue and distributes the command queue to the subsystem action, then the GUI module is used for displaying warning information, and the operation personnel is waited to select whether to continue execution or cancel processing;
when entering a system fault state S2, the mounter performs an emergency stop operation;
when entering History State H1: leave the parent state S1 and automatically save the last active child state before exiting the parent state S1; thus automatically transitioning to the parent state S1 last active child state when the history state H1 is re-entered;
when entering History State H2: leave the parent state S12 and automatically save the last active child state before exiting the parent state S12; thus automatically transitioning to the parent state S12 last active child state when the history state H2 is re-entered;
step 2, packaging each subsystem information of the chip mounter into events and temporarily storing the events into an event queue, and dividing event types into subsystem events, control panel button events and manual operation events;
the subsystem event is formed by packaging instruction interaction information or error code information generated by a subsystem, and comprises the following steps: application alert events, system error events, and subsystem status events;
the control panel button event is encapsulated by a control panel button trigger signal and comprises: an enabling control panel button Active, an automatic generating button Start, a Stop device running button Stop, a servo motor enabling button Ready, a Reset state button Reset, a clear error warning information button errorcclear and an emergency Stop button emergenystop; and each button press generates a corresponding button event;
the human operation event is an event generated by the operation and control of an operator through a GUI module, and comprises the following steps: continuing to execute and cancel operations;
step 3, defining an instruction event scheduler between the hierarchical state machine and the chip mounter, wherein the instruction event scheduler is composed of an instruction queue and an event queue and is responsible for processing and distributing instructions and events;
the event queue scheduler distributes events from the event queue to the hierarchical state machine;
after the distributed event is received by the hierarchical state machine and is used as a new driving event, all conversion included in the current sub-state is checked, and if the new driving event is matched with a predefined event, the hierarchical state machine transfers the current sub-state to a target state designated by the event; if the state matched with the driving event cannot be found, discarding the corresponding driving event, and keeping the sub-state unchanged; therefore, each sub-state of the hierarchical state machine is transferred in an event-driven mode;
the state transition process of the hierarchical state machine in the step 3 is as follows:
entering a power-on initialization state S11 and executing corresponding functions and operations after the chip mounter is powered on, transferring to a production state S12 after completing the corresponding operations in the power-on initialization state S11, and executing the corresponding functions and operations after entering a reset state S12 a;
when the human operation event is received and the current state is the starting initialization state S11, the hierarchical state machine discards the received human operation event from the event queue and does not execute the state transition;
when the button event generated by the auto-generate button Start is received and the current state is the reset state S12a, the hierarchical state machine transitions to the auto-production state S12b and performs the functions and operations of the auto-production state S12 b;
when a button event generated by the Stop device operation button Stop or the Reset state button Reset is received and the current state is the production state S12b, the hierarchical state machine transitions to the pause production state S12c and performs a corresponding function and operation;
when a button event generated by a Reset state button Reset is received and the current state is a suspended production state S12c, the hierarchical state machine transitions to a Reset state S12a and performs corresponding functions and operations;
when the button event generated by the auto-generate button Start is received and the current state is the suspended production state S12c, the hierarchical state machine transitions to the auto-generate state S12b and performs the corresponding function and operation;
when a button event generated by an enable control panel button Active or a servo motor enable button Ready is received and the current state is a reset state S12a or an automatically generated state S12b or a suspended production state S12c, the state machine discards the corresponding event from the event processing queue and does not perform a state transition;
when an application alert event is received and the current state is the production state S12, the hierarchical state machine transitions to the application alert state S13 and performs the corresponding functions and operations while the history state H2 saves the last active child state in the parent state production state S12;
when the continuous execution in the human operation event is received and the current state is the application warning state S13, the state machine transitions to the historical state H2 and executes the corresponding function and operation;
when a cancel operation in a human operation event is received and the current state is the application warning state S13, the state machine transitions to the reset state S12a and performs corresponding functions and operations;
when a system error event is received and is not currently in the system fault state S2, the state machine transitions to the system fault state S2 and performs the corresponding functions and operations, while the first history state H1 saves the last active sub-state of the working state S1;
when the emergency shutdown button EmergencyStop is not released, any event of a control panel button event or a human operation event is received, and the current state is the system fault state S2, the hierarchical state machine discards the received corresponding event from the event processing queue, and does not execute state transition;
when the emergency stop button Emergenystop is released, and a button event generated by a servo motor enabling button Ready is received, and the current state is a system fault state S2, the hierarchical state machine is transferred to a historical state H1 and executes corresponding functions and operations;
upon receipt of a system error event in any of the sub-states, the hierarchical state machine enters the system fault state S2 and only in the state of the emergency stop button emergency stop is the hierarchical state machine allowed to enter the other sub-states.
2. The mounter control method according to claim 1, wherein said execution of emergency stop operation is divided into system failure emergency stop and emergency stop button slapping emergency stop;
when other subsystems have faults, the subsystem firstly feeds error code information back to the command event scheduler, then stops the motion of the servo motor and cuts off the power supply of the servo motor, and quits the commands being executed by all the subsystems, and then the upper computer clears all the command information in the command queue after acquiring the error code information of the subsystems and displays the command information on the GUI module;
the emergency stop is carried out by the emergency stop button, when the emergency stop button is pressed down, the corresponding subsystem feeds back a trigger signal of the emergency stop relay to the command event scheduler, and the upper computer displays the pressed-down state information of the emergency stop button on the GUI module when acquiring the signal of the emergency stop button of the subsystem.
CN202011514940.4A 2020-12-21 2020-12-21 Chip mounter control method adopting hierarchical state machine Active CN112638144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011514940.4A CN112638144B (en) 2020-12-21 2020-12-21 Chip mounter control method adopting hierarchical state machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011514940.4A CN112638144B (en) 2020-12-21 2020-12-21 Chip mounter control method adopting hierarchical state machine

Publications (2)

Publication Number Publication Date
CN112638144A CN112638144A (en) 2021-04-09
CN112638144B true CN112638144B (en) 2022-03-22

Family

ID=75318090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011514940.4A Active CN112638144B (en) 2020-12-21 2020-12-21 Chip mounter control method adopting hierarchical state machine

Country Status (1)

Country Link
CN (1) CN112638144B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113942497A (en) * 2021-10-18 2022-01-18 长春一汽富晟集团有限公司 Image fusion parking controller state machine skipping method
CN115903695B (en) * 2022-11-07 2023-10-10 哈尔滨工业大学 Multifunctional chip mounter production flow control method based on layered finite state machine
CN115843174B (en) * 2023-02-17 2023-06-16 合肥安迅精密技术有限公司 Event-driven-based chip mounter button enabling control method, system and medium
CN116108707B (en) * 2023-04-14 2023-06-16 合肥安迅精密技术有限公司 Virtual chip mounter simulation system, method and storage medium
CN116149240B (en) * 2023-04-18 2023-07-14 合肥安迅精密技术有限公司 Chip mounter software and hardware interaction information real-time monitoring analysis system, method and storage medium
CN116975604B (en) * 2023-09-22 2023-12-08 张家港市得道电子有限公司 Fault prediction method and system for chip mounter driving system
CN117082847B (en) * 2023-10-19 2024-01-09 合肥安迅精密技术有限公司 Automatic control equipment and method for tray of chip mounter

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6324496B1 (en) * 1998-06-18 2001-11-27 Lucent Technologies Inc. Model checking of hierarchical state machines
CN102929697A (en) * 2012-10-09 2013-02-13 Tcl集团股份有限公司 State machine, scheduling method and device and universal serial bus (USB) media play control device
CN207589324U (en) * 2017-11-10 2018-07-06 深大云网络(深圳)有限公司 One kind is based on the reliable hierarchical states device of wifi-P2P application operations

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002229606A (en) * 2001-01-31 2002-08-16 Nec Corp State transition model executing device, state transition model executing method and program
US7536526B2 (en) * 2005-07-11 2009-05-19 General Electric Company Hierarchical state based migration of structured data
CN105900025A (en) * 2014-01-07 2016-08-24 三菱电机株式会社 Control device, development device, and development program
CN104142666B (en) * 2014-07-24 2017-02-15 华南理工大学 Production control device and method for multi-process equipment on basis of state machines
CN104200316B (en) * 2014-08-26 2017-12-01 华南理工大学 A kind of SMT closed loops integrated optimization system and its optimization method
CN105353721A (en) * 2015-11-10 2016-02-24 中国科学院合肥物质科学研究院 Fully automatic LED mounting machine control system
JP6848256B2 (en) * 2016-03-10 2021-03-24 富士電機株式会社 Multitasking control device, multitasking control system, and vending machine
CN106945045B (en) * 2017-04-19 2019-12-17 广州视源电子科技股份有限公司 communication method and system for robot control based on ROS and OROCOS

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6324496B1 (en) * 1998-06-18 2001-11-27 Lucent Technologies Inc. Model checking of hierarchical state machines
CN102929697A (en) * 2012-10-09 2013-02-13 Tcl集团股份有限公司 State machine, scheduling method and device and universal serial bus (USB) media play control device
CN207589324U (en) * 2017-11-10 2018-07-06 深大云网络(深圳)有限公司 One kind is based on the reliable hierarchical states device of wifi-P2P application operations

Also Published As

Publication number Publication date
CN112638144A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN112638144B (en) Chip mounter control method adopting hierarchical state machine
US20070168082A1 (en) Task-based robot control system for multi-tasking
EP0709777B1 (en) Method of and apparatus for debugging multitask programs
US6317638B1 (en) Multi-layer state machine for a hybrid real-time control system and method of operation thereof
JP2012524354A (en) Safety controller for controlling an automation system and method for generating a user program
CN103645678A (en) Real-time response type network control system
CN112061093B (en) Locomotive braking system for realizing automatic driving and realization method thereof
JP2009146039A (en) Safety control system
US7664985B2 (en) Watchdog system in a distributed computerized application environment
JPH0259901A (en) Fault diagnosing system
CN106945045B (en) communication method and system for robot control based on ROS and OROCOS
US6779174B2 (en) Industrial controller with clock-synchronous running level model
CN111752638A (en) Automatic control platform and automatic platform control method
US20050182509A1 (en) Intelligent disturbance management
CN109814493A (en) A kind of control method, control system and the control device of rotating-disk testing sorting machine
CN109491324B (en) Control device and control method
KR20230091111A (en) robot watchdog
Rodrigues et al. Multi-approach debugging of industrial IoT workflows
JP2010108504A (en) Robot software component thread processsing system and method
EP2212752A2 (en) Methods and systems for operating an automated system
CN113448866B (en) Embedded software development auxiliary debugging system and debugging method
CN202189265U (en) Emergency shutdown system for compressor in ethylene unit
US20240111661A1 (en) Method and apparatus for testing control software, and computer-readable storage medium
WO2022168336A1 (en) Control device, control method, and control program
Anderson et al. Open architecture controller solution for custom machine systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant