[go: up one dir, main page]

CN102169436B - General control kernel system used for integrated circuit manufacturing equipment - Google Patents

General control kernel system used for integrated circuit manufacturing equipment Download PDF

Info

Publication number
CN102169436B
CN102169436B CN201110120570.0A CN201110120570A CN102169436B CN 102169436 B CN102169436 B CN 102169436B CN 201110120570 A CN201110120570 A CN 201110120570A CN 102169436 B CN102169436 B CN 102169436B
Authority
CN
China
Prior art keywords
lock
service
control module
request
module
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.)
Expired - Fee Related
Application number
CN201110120570.0A
Other languages
Chinese (zh)
Other versions
CN102169436A (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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN201110120570.0A priority Critical patent/CN102169436B/en
Publication of CN102169436A publication Critical patent/CN102169436A/en
Priority to PCT/CN2011/081932 priority patent/WO2012151885A1/en
Application granted granted Critical
Publication of CN102169436B publication Critical patent/CN102169436B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种用于集成电路制造设备的通用控制内核系统,包括:配置模块,用于在所述内核系统启动时,将对象实例化并将实例化后的对象注册到名称空间中,创建初始名称空间树结构,对所述初始名称空间树结构中的对象进行初始化;控制模块,用于根据配置模块创建的初始名称空间树结构控制高层控制单元调用并执行低层控制单元的服务,其中控制对像的等级由低到高依次为物理层、功能层和操作层,且所述控制对象还包括与所述操作层同等级别的维护层;监控模块,用于监控所述内核系统的条件并在条件满足时独立地执行相应的动作。本发明提供支持软件互锁、数据日志、通信功能的强大应用程序编程接口,通过灵活的配置策略实现组件开发和软件复用。

Figure 201110120570

The invention discloses a general control kernel system for integrated circuit manufacturing equipment, comprising: a configuration module, used for instantiating objects and registering the instantiated objects into the name space when the kernel system starts, Create an initial name space tree structure, and initialize objects in the initial name space tree structure; a control module, configured to control the high-level control unit to call and execute the service of the low-level control unit according to the initial name space tree structure created by the configuration module, wherein The level of the control object is the physical layer, the functional layer and the operation layer in order from low to high, and the control object also includes a maintenance layer at the same level as the operation layer; a monitoring module for monitoring the condition of the kernel system And when the conditions are met, the corresponding actions are executed independently. The invention provides a powerful application programming interface supporting software interlocking, data logging, and communication functions, and realizes component development and software reuse through flexible configuration strategies.

Figure 201110120570

Description

用于集成电路制造设备的通用控制内核系统General Control Core System for Integrated Circuit Manufacturing Equipment

技术领域 technical field

本发明涉及计算机应用技术和集成电路装备技术领域,特别涉及一种用于集成电路制造设备的通用控制内核系统。The invention relates to the fields of computer application technology and integrated circuit equipment technology, in particular to a general control core system for integrated circuit manufacturing equipment.

背景技术 Background technique

随着微电子技术、信息技术、网络技术等的飞速发展,全球信息产业迅猛成长、网络经济快速兴起、知识经济初见端倪,现代国防和未来战争中的尖端技术不断崛起,人类进入了信息和网络时代。由于微电子技术的核心地位,微电子比以往任何时候都更显示出其重要的战略地位,微电子产业已经成为全球经济的重要支柱和经济、社会发展的强大推动力。With the rapid development of microelectronics technology, information technology, network technology, etc., the rapid growth of the global information industry, the rapid rise of the network economy, the beginning of knowledge economy, and the continuous rise of cutting-edge technologies in modern national defense and future wars, human beings have entered the information and Internet Age. Due to the core position of microelectronics technology, microelectronics has shown its important strategic position more than ever before, and the microelectronics industry has become an important pillar of the global economy and a powerful driving force for economic and social development.

内核系统作为IC(Integrated Circuit,集成电路)产业的一部分,用于开发实时设备控制应用程序,具有举足轻重的作用。但是现有的集成电路的内核系统通用性差,从而使得开发人员的开发设备控制应用程序的效率较低,且开发后的应用程序性能鲁棒性差。As a part of the IC (Integrated Circuit, integrated circuit) industry, the kernel system is used to develop real-time device control applications and plays a pivotal role. However, the commonality of the core system of the existing integrated circuit is poor, so that the developer's efficiency in developing device control application programs is low, and the performance of the developed application programs is poor in robustness.

发明内容 Contents of the invention

本发明的目的旨在至少解决上述技术缺陷之一,特别提出一种高效通用且配置灵活的用于集成电路制造设备的通用控制内核系统。The purpose of the present invention is to at least solve one of the above-mentioned technical defects, and in particular propose a general control core system for integrated circuit manufacturing equipment with high efficiency, general purpose and flexible configuration.

为达到上述目的,本发明的实施例提出一种用于集成电路制造设备的通用控制内核系统,包括:配置模块,所述配置模块用于在所述内核系统启动时,将对象实例化并将实例化后的对象注册到名称空间中,创建初始名称空间树结构,对所述初始名称空间树结构中的对象进行初始化,其中,所述对象映射所述硬件设备的行为;控制模块,所述控制模块用于根据配置模块创建的初始名称空间树结构控制高层控制单元调用并执行低层控制单元的服务,其中控制对像的等级由低到高依次为物理层、功能层和操作层,且所述控制对象还包括与所述操作层同等级别的维护层;和监控模块,所述监控模块用于监控所述内核系统的条件并在条件满足时独立地执行相应的动作。In order to achieve the above object, an embodiment of the present invention proposes a general control kernel system for integrated circuit manufacturing equipment, including: a configuration module, which is used to instantiate an object and The instantiated object is registered in the namespace, an initial namespace tree structure is created, and the objects in the initial namespace tree structure are initialized, wherein the object maps the behavior of the hardware device; the control module, the The control module is used to control the high-level control unit to call and execute the service of the low-level control unit according to the initial name space tree structure created by the configuration module. The control object also includes a maintenance layer at the same level as the operation layer; and a monitoring module, which is used to monitor the conditions of the kernel system and independently execute corresponding actions when the conditions are met.

在本发明的一个实施例中,所述配置模块包括:配置文件解析器,所述配置文件解析器分析配置文件,根据所述配置文件的信息实例化所述对象;注册单元,所述注册单元用于将实例化的对象注册至名称空间,创建初始名称空间树结构,所述初始名称空间树结构为多个名称的集合;初始化单元,所述初始化单元按照优先搜索算法变量所述初始名称空间树结构,并根据所述配置文件的信息对注册后的对象进行初始化。In one embodiment of the present invention, the configuration module includes: a configuration file parser, which analyzes the configuration file, and instantiates the object according to the information of the configuration file; a registration unit, the registration unit It is used to register the instantiated object to the name space, and create an initial name space tree structure, the initial name space tree structure is a collection of multiple names; an initialization unit, the initialization unit follows the priority search algorithm variable described initial name space tree structure, and initialize the registered objects according to the information in the configuration file.

在本发明的一个实施例中,所述注册单元还用于创建别名,其中所述一个对象对应一个或多个别名。In an embodiment of the present invention, the registration unit is also used to create an alias, wherein the one object corresponds to one or more aliases.

在本发明的一个实施例中,通过以下两种方式之一访问对象:1)通过引用名称空间树结构中的名称访问所述名称对应的对象;2)通过引用所述别名访问所述别名对应的对象。In one embodiment of the present invention, the object is accessed in one of the following two ways: 1) accessing the object corresponding to the name by referring to the name in the namespace tree structure; 2) accessing the object corresponding to the alias by referring to the alias Object.

在本发明的一个实施例中,所述控制模块包括:物理层控制单元,所述物理层控制单元读取所述硬件设备中的底层设备的数据项,并向所述底层设备提供服务;功能层控制单元,所述功能层控制单元通过调用所述物理层控制单元的服务以提供功能层的服务;操作层控制单元,所述操作层控制单元通过调用所述功能层控制单元的服务以提供操作层的服务;和维护层控制单元,所述维护层控制单元执行对所述物理层控制单元和功能层控制单元的故障定位和修理,其中,所述维护层控制单元调用所述物理层控制单元和功能层控制单元的服务。In one embodiment of the present invention, the control module includes: a physical layer control unit, the physical layer control unit reads the data items of the bottom device in the hardware device, and provides services to the bottom device; function A layer control unit, the function layer control unit provides the service of the function layer by invoking the service of the physical layer control unit; an operation layer control unit, the operation layer control unit provides the service by invoking the service of the function layer control unit a service at the operation layer; and a maintenance layer control unit that performs fault location and repair of the physical layer control unit and the functional layer control unit, wherein the maintenance layer control unit invokes the physical layer control unit The unit and function layers control the services of the unit.

在本发明的一个实施例中,所述物理层控制单元进一步包括EPICS协议通信部件,所述EPICS协议通信部件利用EPICS协议与硬件设备进行通信以交换数据项,包括读取所述硬件设备中的底层设备的状态值,并向所述硬件设备发送设置点。In one embodiment of the present invention, the physical layer control unit further includes an EPICS protocol communication part, and the EPICS protocol communication part uses the EPICS protocol to communicate with the hardware device to exchange data items, including reading the state values of underlying devices and send setpoints to said hardware devices.

在本发明的一个实施例中,所述数据项根据承载数据的类型分为离散型、连续型和字符串型;所述数据项根据读/写操作类型分为只读型和读/写型。In one embodiment of the present invention, the data items are divided into discrete type, continuous type and string type according to the type of data carried; the data items are divided into read-only type and read/write type according to the type of read/write operation .

在本发明的一个实施例中,利用互锁检查所述数据项的值,互锁包括:设置点互锁,用于控制读取的所述硬件设备的数据项或写入的所述硬件设备的数据项仅在设定条件满足时允许修改。In one embodiment of the present invention, the value of the data item is checked using an interlock, the interlock comprising: a setpoint interlock for controlling the data item of the hardware device being read or written to the hardware device The data items of are only allowed to be modified when the set conditions are satisfied.

在本发明的一个实施例中,所述设置点互锁包括:读写数据项,所述读写数据项为从所述硬件设备读取的数据项或从所述硬件设备写入的数据项;和校验符,所述校验符用于判断是否允许所述读写数据项的修改;报警,所述报警用于在否决所述读写数据项的修改时,抛出阻塞式报警。In one embodiment of the present invention, the set point interlock includes: read and write data items, the read and write data items are data items read from the hardware device or data items written from the hardware device ; and a checksum, the checksum is used to determine whether the modification of the read-write data item is allowed; an alarm is used to throw a blocking alarm when the modification of the read-write data item is rejected.

在本发明的一个实施例中,所述报警提供三个恢复动作:放弃、重试和继续执行。In one embodiment of the present invention, the alert provides three recovery actions: abort, retry and continue execution.

在本发明的一个实施例中,设置点互锁还包括触发器、限定符,所述触发器用于设置修改所述读写数据项的条件,所述限定符用于判断是否需要验证所述校验符的条件。In one embodiment of the present invention, the set point interlock further includes a trigger and a qualifier, the trigger is used to set the conditions for modifying the read-write data item, and the qualifier is used to judge whether the calibration needs to be verified. The condition of the verifier.

在本发明的一个实施例中,所述监控模块通过取值互锁监控所述内核系统的安全状态,并在所述内核系统的不安全条件触发时进行矫正,其中所述取值互锁包括:触发器,所述触发器设置所述内核系统的不安全条件;行为列表,所述行为列表为触发所述不安全条件后的动作,其中当所述行为列表包括多个动作时,所述多个动作逐个执行。In one embodiment of the present invention, the monitoring module monitors the security state of the kernel system through a value interlock, and corrects when an unsafe condition of the kernel system is triggered, wherein the value interlock includes : trigger, the trigger sets the unsafe condition of the kernel system; a behavior list, the behavior list is an action after triggering the unsafe condition, wherein when the behavior list includes multiple actions, the Multiple actions are executed one by one.

在本发明的一个实施例中,所述取值互锁还包括:报警,所述报警用于提供非阻塞式报警。In an embodiment of the present invention, the value interlock further includes: an alarm, and the alarm is used to provide a non-blocking alarm.

在本发明的一个实施例中,所述高层控制单元调用并执行低层控制单元的服务包括如下步骤:所述高层控制单元向所述低层控制单元发送服务器锁请求或服务锁请求以获得服务器锁或服务锁,对请求的服务的参数进行初始化,向所述低层控制单元发送运行锁请求以获得运行锁;所述高层控制单元在获得所述运行锁后,调用并执行所述运行锁对应的低层控制单元的服务,并在服务完成后,释放所述运行锁;所述高层控制单元释放所述服务器锁或服务锁,其中,所述服务器锁请求用于请求获得所述服务器锁,所述高层控制单元利用所述服务器锁向所述低层控制单元调用服务,并锁定所述低层控制单元;所述服务锁请求用于请求获得所述服务锁,所述高层控制单元利用所述服务锁向所述低层控制单元调用指定服务,并锁定对所述指定服务的调用;所述运行锁请求用于请求获得所述运行锁,所述高层控制单元利用所述运行锁执行所述指定服务,并锁定所述指定服务的执行。In one embodiment of the present invention, the high-level control unit calling and executing the service of the low-level control unit includes the following steps: the high-level control unit sends a server lock request or a service lock request to the low-level control unit to obtain a server lock or Service lock, initialize the parameters of the requested service, and send a running lock request to the low-level control unit to obtain the running lock; after the high-level control unit obtains the running lock, call and execute the low-level lock corresponding to the running lock The service of the control unit, and release the running lock after the service is completed; the high-level control unit releases the server lock or service lock, wherein the server lock request is used to request to obtain the server lock, and the high-level The control unit uses the server lock to call a service to the low-level control unit, and locks the low-level control unit; the service lock request is used to request to obtain the service lock, and the high-level control unit uses the service lock to send the service to the low-level control unit. The low-level control unit invokes the specified service and locks the call to the specified service; the running lock request is used to request to obtain the running lock, and the high-level control unit uses the running lock to execute the specified service and locks Execution of the specified service.

在本发明的一个实施例中,所述低层控制单元在收到来自所述高层控制单元的服务器锁请求或服务锁请求时,如果当前没有活跃的所述服务器锁或服务锁或运行锁时,则所述低层控制单元授予所述高层控制单元服务器锁;如果当前没有活跃的所述服务器锁或服务锁或运行锁,或者当前服务锁与所述服务锁请求的服务锁执行的服务相同,则所述低层控制单元授予所述高层控制单元服务锁。In one embodiment of the present invention, when the low-level control unit receives the server lock request or service lock request from the high-level control unit, if there is no active server lock, service lock or running lock, Then the low-level control unit grants the high-level control unit a server lock; if there is currently no active server lock or service lock or running lock, or the current service lock and the service lock requested by the service lock perform the same service, then The low-level control unit grants the high-level control unit a service lock.

在本发明的一个实施例中,所述高层控制单元请求的服务当前未执行,且符合以下任一种条件时,所述低层控制单元授予所述高层控制单元运行锁,1)没有活跃的服务器锁、服务锁或运行锁;2)仅有一个针对当前请求的服务的活跃的服务锁;3)仅有一个所述高层控制单元具有的服务器锁。In one embodiment of the present invention, when the service requested by the high-level control unit is not currently executed, and meets any of the following conditions, the low-level control unit grants the high-level control unit a running lock: 1) There is no active server 2) there is only one active service lock for the currently requested service; 3) there is only one server lock owned by the high-level control unit.

在本发明的一个实施例中,所述低层控制单元将未被授予服务器锁、服务锁或运行锁的服务器锁请求、服务锁请求或运行锁请求按照到达的先后顺序放置在锁请求等待队列中。In one embodiment of the present invention, the low-level control unit places server lock requests, service lock requests, or run lock requests that are not granted server locks, service locks, or run locks in the lock request waiting queue in the order of arrival .

在本发明的一个实施例中,所述低层控制单元在所述高层控制单元释放所述运行锁后,检查所述锁请求等待队列,如果当前高层控制单元保持服务器锁,则所述低层控制单元执行当前高层控制单元的下一个运行锁请求对应的服务;如果当前保持着服务锁,则所述低层控制单元执行所述服务锁对应的服务的下一个运行锁请求对应的服务;如果当前没有活跃的服务器锁、服务锁或运行锁,且下一个请求为服务器锁请求,则对该服务器锁请求授予服务器锁,并执行拥有该服务器锁的高层控制单元的运行锁请求对应的服务;如果当前没有活跃的服务器锁、服务锁或运行锁,且下一个请求为服务锁请求,则对该服务锁请求授予服务锁,并执行所有高层控制单元针对该运行锁请求对应的服务;如果当前没有活跃的服务器锁、服务锁或运行锁,且下一个请求为运行锁请求,则所述低层控制单元执行所述运行锁请求对应的服务。In one embodiment of the present invention, the low-level control unit checks the lock request waiting queue after the high-level control unit releases the running lock, and if the current high-level control unit holds the server lock, the low-level control unit Execute the service corresponding to the next running lock request of the current high-level control unit; if the service lock is currently held, the low-level control unit executes the service corresponding to the next running lock request of the service corresponding to the service lock; if there is no active server lock, service lock or running lock, and the next request is a server lock request, grant the server lock to the server lock request, and execute the service corresponding to the running lock request of the high-level control unit that owns the server lock; if there is no Active server lock, service lock or running lock, and the next request is a service lock request, then grant the service lock to the service lock request, and execute all high-level control units to request the corresponding services for the running lock; if there is no active A server lock, a service lock or a running lock, and the next request is a running lock request, then the low-level control unit executes the service corresponding to the running lock request.

在本发明的一个实施例中,进一步包括报警模块,用于在所述内核系统发生异常,发出报警。In one embodiment of the present invention, an alarm module is further included, configured to issue an alarm when an abnormality occurs in the kernel system.

在本发明的一个实施例中,所述报警模块发出阻塞式报警和非阻塞式报警,所报警模块在抛出所述阻塞式报警后将会阻塞发送对象所在线程直至清除所述阻塞式报警;所述报警模块在抛出所述非阻塞式报警后,发送对象所在线程继续运行。In one embodiment of the present invention, the alarm module sends a blocking alarm and a non-blocking alarm, and the alarm module will block the thread where the sending object is located after throwing the blocking alarm until the blocking alarm is cleared; After the alarm module throws the non-blocking alarm, the thread where the sending object is located continues to run.

在本发明的一个实施例中,进一步包括日志模块,用于以日志的形式记录所述内核系统运行过程中的信息,其中,所述日志模块包括:数据日志单元,所述数据日志单元用于以第一预定周期记录所述内核系统的数据和事件;和系统日志单元,所述系统日志单元用于以第二预定周期记录所述内核系统的调用信息和跟踪信息。In one embodiment of the present invention, it further includes a log module, which is used to record information during the operation of the kernel system in the form of a log, wherein the log module includes: a data log unit, and the data log unit is used for recording data and events of the kernel system in a first predetermined period; and a system log unit, configured to record call information and trace information of the kernel system in a second predetermined period.

在本发明的一个实施例中,所述数据日志单元采用的日志记录形式包括:基于时间的日志记录,所述基于时间的日志记录通过一个或多个条件触发器触发;周期日志记录,所述周期日志记录通过一个时间间隔触发器触发。In one embodiment of the present invention, the logging form adopted by the data logging unit includes: time-based logging, the time-based logging is triggered by one or more conditional triggers; periodic logging, the Periodic logging is triggered by an interval trigger.

在本发明的一个实施例中,所述系统日志单元记录所述数据项的修改、所述互锁的信息、所述报警发出的信息以及清除所述报警的信息。In one embodiment of the present invention, the system log unit records the modification of the data item, the information of the interlock, the information of the alarm and the information of clearing the alarm.

本发明实施例提供的用于集成电路制造设备的通用控制内核系统基于Windows xp操作系统,采用JAVA实现,具有如下优点:The general control kernel system for integrated circuit manufacturing equipment provided by the embodiment of the present invention is based on Windows XP operating system, adopts JAVA to realize, has the following advantages:

1)通过管理系统的并行性和资源互锁,提供统一的接口给应用程序中不同类型的I/O,以及一个进行错误处理和错误恢复的省时框架,解决控制应用程序开发中费时、易错的问题。1) Through the parallelism and resource interlocking of the management system, a unified interface is provided for different types of I/O in the application program, and a time-saving framework for error handling and error recovery, which solves the time-consuming and easy problems in the development of control application programs. wrong question.

2)提供支持软件互锁、数据日志、通信功能的强大应用程序编程接口。具体而言,本发明实施例的通用控制内核系统的互锁API(Application Programming Interface,应用程序编程接口)保证人员和设备的安全。Recipe API能够存储和检索工艺过程参数。数据日志API能够快速获得运行时的工艺过程参数信息。2) Provide a powerful application programming interface that supports software interlocking, data logging, and communication functions. Specifically, the interlock API (Application Programming Interface, Application Programming Interface) of the general control kernel system of the embodiment of the present invention ensures the safety of personnel and equipment. Recipe API can store and retrieve process parameters. The data log API can quickly obtain the process parameter information at runtime.

3)通过灵活的配置策略实现组件开发和软件复用。本发明实施例的通用控制内核系统配置策略可以方便同一应用程序内以及不同应用程序之间的代码重用。并且,通用控制内核系统配置文件允许软件开发人员配置组件的属性,虽然上述属性在不同应用程序中会有所不同,但不需重新编译。3) Realize component development and software reuse through flexible configuration strategies. The common control kernel system configuration policy in the embodiment of the present invention can facilitate code reuse within the same application program and among different application programs. Also, the common control kernel system configuration file allows software developers to configure the properties of the components, although the above properties will be different in different applications, but without recompilation.

4)提供必要的工具支持快速开发和调试应用程序。本发明实施例的通用控制内核系统通用控制内核系统提供了应用程序调试和性能跟踪的两个强大功能,包括系统日志服务和控制台接口,其中系统日志服务包括生成系统操作记录,控制台接口包括查看和修改应用程序运行时的通用控制内核系统环境状态。4) Provide necessary tools to support rapid development and debugging of applications. The general control kernel system of the embodiment of the present invention provides two powerful functions of application program debugging and performance tracking, including system log service and console interface, wherein the system log service includes generating system operation records, and the console interface includes View and modify the state of the common control kernel system environment while the application is running.

本发明实施例的通用控制内核系统可以使开发人员能够快速开发健壮的控制应用程序,通过灵活的配置策略实现组件开发和软件复用,还可以提供必要的工具支持快速开发和调试应用程序。The general control kernel system of the embodiment of the present invention can enable developers to quickly develop robust control application programs, realize component development and software reuse through flexible configuration strategies, and can also provide necessary tools to support rapid development and debugging of application programs.

本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.

附图说明 Description of drawings

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:

图1为根据本发明实施例的用于集成电路制造设备的通用控制内核系统的结构示意图;1 is a schematic structural diagram of a general control kernel system for integrated circuit manufacturing equipment according to an embodiment of the present invention;

图2为配置模块的结构示意图;Fig. 2 is a schematic structural diagram of a configuration module;

图3为名称空间的示意图;Figure 3 is a schematic diagram of a namespace;

图4为名称空间UML类图;Figure 4 is a namespace UML class diagram;

图5为控制模块的结构示意图;Fig. 5 is the structural representation of control module;

图6为数据项(DataItem)的示意图;Fig. 6 is a schematic diagram of a data item (DataItem);

图7为控制模块的调用服务的示意图;Fig. 7 is a schematic diagram of calling service of the control module;

图8为控制模块调用链的示意图;Fig. 8 is a schematic diagram of a control module calling chain;

图9为报警模块的报警过程示意图;和Figure 9 is a schematic diagram of the alarm process of the alarm module; and

图10为日志模块的结构示意图。FIG. 10 is a schematic structural diagram of a log module.

具体实施方式 Detailed ways

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

如图1所示,本发明实施例提供的用于集成电路制造设备的通用控制内核系统1000,包括配置模块100、控制模块200和监控模块300。其中,配置模块100用于在所述内核系统启动时,将对象实例化并将实例化后的对象注册到名称空间中,创建初始名称空间树结构,对所述初始名称空间树结构中的对象进行初始化,其中,所述对象映射所述硬件设备的行为;控制模块200用于根据配置模块创建的初始名称空间树结构控制高层控制单元调用并执行低层控制单元的服务,其中控制对像的等级由低到高依次为物理层、功能层和操作层,且所述控制对象还包括与所述操作层同等级别的维护层;监控模块300用于监控所述内核系统的条件并在条件满足时独立地执行相应的动作。As shown in FIG. 1 , a general control kernel system 1000 for integrated circuit manufacturing equipment provided by an embodiment of the present invention includes a configuration module 100 , a control module 200 and a monitoring module 300 . Wherein, the configuration module 100 is used for instantiating objects and registering the instantiated objects into the namespace when the kernel system starts, creating an initial namespace tree structure, and configuring the objects in the initial namespace tree structure Initialize, wherein the object maps the behavior of the hardware device; the control module 200 is used to control the call of the high-level control unit and execute the service of the low-level control unit according to the initial name space tree structure created by the configuration module, wherein the level of the control object From low to high, they are physical layer, functional layer and operation layer, and the control object also includes a maintenance layer at the same level as the operation layer; the monitoring module 300 is used to monitor the conditions of the kernel system and when the conditions are met perform the corresponding actions independently.

如图2所示,配置模块100包括配置文件解析器110、注册单元120和初始化单元130。其中,配置文件解析器110用于分析配置文件,根据所述配置文件的信息实例化所述对象;注册单元120用于将实例化的对象注册至名称空间,创建初始名称空间树结构,其中初始名称空间树结构为多个名称的集合;初始化单元130用于按照优先搜索算法变量所述初始名称空间树结构,并根据所述配置文件的信息对注册后的对象进行初始化。As shown in FIG. 2 , the configuration module 100 includes a configuration file parser 110 , a registration unit 120 and an initialization unit 130 . Wherein, the configuration file parser 110 is used to analyze the configuration file, and instantiate the object according to the information of the configuration file; the registration unit 120 is used to register the instantiated object into the namespace, and create an initial namespace tree structure, wherein the initial The name space tree structure is a collection of multiple names; the initialization unit 130 is used to variable the initial name space tree structure according to the priority search algorithm, and initialize the registered objects according to the information of the configuration file.

配置模块100的配置过程发生在应用程序的启动过程中,负责实例化和初始化对象。应用程序中的大部分对象都应该在应用程序启动时期实例化,而不是在应用程序运行时期。名称空间的结构由配置文件信息和可配置(实现Configurable接口)对象build()方法中的代码决定。名称空间结构不一定要反映对象间的功能关系,或物理层、功能层和操作层间的关系,也不一定反映两个对象的拥有关系。The configuration process of the configuration module 100 occurs during the startup process of the application program, and is responsible for instantiating and initializing objects. Most objects in an application should be instantiated at application startup, not at runtime. The structure of the namespace is determined by the configuration file information and the code in the build() method of the configurable (implementing the Configurable interface) object. The namespace structure does not necessarily reflect the functional relationship between objects, or the relationship between physical, functional, and operational layers, nor does it necessarily reflect the ownership relationship between two objects.

可以通过配置模块100实例化和初始化的对象必须实现Configurable接口,其接口信息如下:Objects that can be instantiated and initialized through the configuration module 100 must implement the Configurable interface, and the interface information is as follows:

public abstract void build()public abstract void build()

public abstract void init()public abstract void init()

public abstract void verifyInit()public abstract void verifyInit()

public abstract void startRunTime()public abstract void startRunTime()

其中,build()接口方法用于实例化其他需要创建的对象;init()接口方法用于初始化对象,典型操作是创建对象之间的链接关系和改变对象状态;verifyInit()接口方法用于验证属性以确保一切都设置正确,从而保证对象可以安全地执行作业,避免运行时错误;startRunTime()方法用于启动运行时,包括将对象设置为运行时状态,例如允许一些线程开始运行,或连接到外部设备。Among them, the build() interface method is used to instantiate other objects that need to be created; the init() interface method is used to initialize the object, and the typical operation is to create the link relationship between objects and change the object state; the verifyInit() interface method is used to verify property to make sure everything is set up correctly, so that the object can safely execute the job and avoid runtime errors; the startRunTime() method is used to start the runtime, including setting the object to a runtime state, such as allowing some threads to start running, or connecting to an external device.

配置模块100的配置过程包括如下五个阶段:The configuration process of the configuration module 100 includes the following five stages:

第一阶段:配置文件解析器110分析配置文件,注册单元120根据配置文件信息实例化对象,并将对象注册到名称空间中,创建初始名称空间树结构;The first stage: the configuration file parser 110 analyzes the configuration file, the registration unit 120 instantiates the object according to the configuration file information, and registers the object into the namespace, and creates an initial namespace tree structure;

第二阶段:初始化单元130按照深度优先搜索算法从上至下、从左至右遍历第一阶段创建的初始名称空间树结构,根据第一阶段解析的配置文件初始化信息对注册对象进行初始化,通过调用注册结点关联的可配置对象的build()方法创建完成整个名称空间树结构;The second stage: the initialization unit 130 traverses the initial namespace tree structure created in the first stage from top to bottom and from left to right according to the depth-first search algorithm, initializes the registration object according to the configuration file initialization information parsed in the first stage, and passes Call the build() method of the configurable object associated with the registration node to create the entire namespace tree structure;

第三阶段:初始化单元130按照深度优先搜索算法遍历名称空间树结构,调用名称空间树中注册对象的init()方法完成对象的初始化工作;The third stage: the initialization unit 130 traverses the namespace tree structure according to the depth-first search algorithm, and calls the init() method of the registered object in the namespace tree to complete the initialization of the object;

第四阶段:初始化单元130按照深度优先搜索算法遍历名称空间树结构,调用名称空间树中注册对象的verifyInit()方法完成对象的初始化验证工作;The fourth stage: the initialization unit 130 traverses the name space tree structure according to the depth-first search algorithm, and calls the verifyInit() method of the registered object in the name space tree to complete the initialization verification work of the object;

第五阶段:初始化单元130按照深度优先搜索算法遍历名称空间树结构,调用名称空间树中注册对象的startRunTime()方法执行对象运行前的准备工作或设置对象为运行状态。The fifth stage: the initialization unit 130 traverses the name space tree structure according to the depth-first search algorithm, and calls the startRunTime() method of the object registered in the name space tree to perform preparatory work before running the object or set the object to the running state.

其中,配置过程的第一阶段由配置文件解析器110完成,第二至第四阶段由ReferenceBroker完成,即注册单元120和初始化单元130采用ReferenceBroker完成。换言之,配置模块100的配置过程包括初始化Parse解析生成的初始名称空间树结构的注册对象,依次调用Configurable接口的build()、init()、verifyInit()和startRunTime()完成。通用控制内核系统配置功能方便了基于组件的应用程序的开发。Wherein, the first stage of the configuration process is completed by the configuration file parser 110, and the second to fourth stages are completed by the ReferenceBroker, that is, the registration unit 120 and the initialization unit 130 are completed by the ReferenceBroker. In other words, the configuration process of the configuration module 100 includes initializing the registration object of the initial namespace tree structure generated by Parse parsing, and calling build(), init(), verifyInit() and startRunTime() of the Configurable interface in sequence to complete. The common control kernel system configuration function facilitates the development of component-based applications.

ReferenceBroker是一个单体对象,负责将对象注册到名称空间中,并维护对象引用与名称之间的映射。ReferenceBroker主要提供三种功能:ReferenceBroker is a singleton object responsible for registering objects into the namespace and maintaining the mapping between object references and names. ReferenceBroker mainly provides three functions:

1)注册对象:建立对象与名称之间的映射关系;1) Register object: establish the mapping relationship between object and name;

2)创建别名:建立别名与名称空间树节点的映射关系;2) Create an alias: establish a mapping relationship between an alias and a namespace tree node;

3)引用注册对象。3) Reference the registered object.

名称空间是由节点构成的树结构,树中的大部分节点都与对象相关联。名称空间是对象的一个注册机构,在其中各个对象通过它们的名称相互联系,从而提供一个公共地址空间。通过使用ReferenceBroker注册对象来创建名称空间,在名称空间注册命名对象,内核系统1000中任何一个对象都可以通过名称来引用名称空间中的任何一个命名对象。注册时需指定对象的名称,以及注册对象相对于树中其他对象的位置。内核系统1000中的所有对象都可以查询ReferenceBroker来获得注册在名称空间中的任何一个对象的引用。A namespace is a tree structure of nodes, most of which are associated with objects. A namespace is a registry of objects in which objects are related to each other by their names, providing a common address space. By using the ReferenceBroker to register an object to create a namespace, and to register a named object in the namespace, any object in the kernel system 1000 can refer to any named object in the namespace by name. Registration specifies the name of the object and the location of the registered object relative to other objects in the tree. All objects in the kernel system 1000 can query the ReferenceBroker for a reference to any object registered in the namespace.

在本发明的一个实施例中,通过以下两种方式之一访问对象:In one embodiment of the invention, objects are accessed in one of two ways:

1)通过引用名称空间树结构中的名称访问名称对应的对象;1) Access the object corresponding to the name by referring to the name in the namespace tree structure;

2)通过引用别名访问别名对应的对象。2) Access the object corresponding to the alias by referring to the alias.

关于通过引用名称空间树结构中的名称访问名称对应的对象,初始名称空间树中的绝大部分节点都和命名对象相关联,这些对象可以通过两种方式标识:Regarding accessing objects corresponding to names by referring to names in the namespace tree structure, most nodes in the initial namespace tree are associated with named objects, which can be identified in two ways:

完全限定名:从名称空间树的根节点到当前对象。名称空间中的每个完全限定名都是唯一的。如图3所示,objectG的完全限定名为“/objectA/objectF/objectG”。Fully qualified name: from the root node of the namespace tree to the current object. Each fully qualified name within a namespace is unique. As shown in Figure 3, the fully qualified name of objectG is "/objectA/objectF/objectG".

相对名:总是有一个起点,该起点称为参考对象。换言之,参考对象是当使用相对名注册一个对象或引用一个对象时,必须明确地提供一个起点,这个起点即为一个参考对象。从参考对象到当前对象。例如,如果objectP为参考对象,则objectG的相对名是“../../objectA/objectF/objectG”。Relative names: There is always a starting point, which is called the reference object. In other words, when using a relative name to register an object or refer to an object, a starting point must be clearly provided, and this starting point is a reference object. From the reference object to the current object. For example, if objectP is the reference object, the relative name of objectG is "../../objectA/objectF/objectG".

节点所引用的命名对象的名称为部分名,如objectG的部分名为“objectG”。部分名不是唯一的。The name of the named object referenced by the node is a partial name, for example, the partial name of objectG is "objectG". Section names are not unique.

关于通过引用别名访问别名对应的对象,首先对别名的概念进行说明。别名可以通过注册单元120创建,提供了访问名称空间中一个原始对象(以及其他对象)的另一条路径。一个对象可以对应一个或多个别名。当建立一个别名时,在名称空间中插入了一个“别名节点(alias node)”。如图3所示,aliasOfObjectF为一个别名节点,它指向objectF节点,从而objectF对象有两条路径可以访问:第一条路径:“/objectA/objectF”;第二条路径:“/aliasOfObjectF”。objectJ也有两条路径可以访问:第一条路径:“/objectA/objectF/objectJ”;第二条路径:“/aliasOfObjectF/objectJ”。Regarding accessing the object corresponding to the alias by referring to the alias, the concept of the alias is explained first. Aliases can be created through registry unit 120, providing another path to access an original object (as well as other objects) in the namespace. An object can correspond to one or more aliases. When an alias is established, an "alias node" is inserted into the namespace. As shown in Figure 3, aliasOfObjectF is an alias node, which points to the objectF node, so the objectF object has two paths to access: the first path: "/objectA/objectF"; the second path: "/aliasOfObjectF". objectJ also has two paths to access: the first path: "/objectA/objectF/objectJ"; the second path: "/aliasOfObjectF/objectJ".

下面参考图4对名称空间树的各类型节点进行说明。Various types of nodes of the namespace tree will be described below with reference to FIG. 4 .

名称空间是一种树状数据结构,包括三种类型的节点:A namespace is a tree-like data structure that includes three types of nodes:

一般节点:一般节点和对象没有建立关联关系;General node: There is no association between general nodes and objects;

注册节点:注册节点和对象建立关联关系;Registration node: the registration node establishes an association relationship with the object;

别名节点:别名节点指向树中其他节点,方便通过别名访问。Alias node: Alias nodes point to other nodes in the tree for easy access through aliases.

如图4所示,NamedObject是通用控制内核系统库中一个重要的类,系统库中大部分类都是从NamedObject派生出来的。NamedObject继承自OssObject类,实现了Configurable和MsgLogger接口。NamedObject为命名对象,它的一个重要特性是可以注册到名称空间中,并且在名称空间建立完成后可通过名称来引用,而且其派生类方便地继承了系统日志记录功能。As shown in Figure 4, NamedObject is an important class in the general control kernel system library, and most classes in the system library are derived from NamedObject. NamedObject inherits from the OssObject class and implements the Configurable and MsgLogger interfaces. NamedObject is a named object, one of its important characteristics is that it can be registered in the namespace, and can be referenced by name after the namespace is established, and its derived classes conveniently inherit the system logging function.

名称空间树结构的实现是由UnNamedNode、AliasNode和ReferenceNode三大类型节点组成。其中,UnNamedNode可以注册在关联(引用)命名对象NamedObject的ReferenceNode节点之下,并关联一个可配置Configurable对象。其中,NamedObject可以实现Configurable接口。The implementation of the namespace tree structure is composed of three types of nodes: UnNamedNode, AliasNode and ReferenceNode. Among them, UnNamedNode can be registered under the ReferenceNode node of the associated (referenced) named object NamedObject, and associated with a configurable object. Among them, NamedObject can implement the Configurable interface.

AliasNode节点和ReferenceNode节点均为NamespaceNode节点。其中,AliasNode作为别名节点,没有子节点。AliasNode指向名称空间中的一个ReferenNode节点。Both AliasNode and ReferenceNode are NamespaceNode. Among them, AliasNode is used as an alias node and has no child nodes. AliasNode points to a ReferenNode in the namespace.

ReferenceNode节点是名称空间中主要节点,它可以关联一个命名对象NamedObject,也可以不关联任何对象(此时相当于一般节点)。ReferenceBroker负责管理和维护整个名称空间树结构,并在运行时根据名称返回相应节点所关联的对象。The ReferenceNode node is the main node in the namespace, it can be associated with a named object NamedObject, or not associated with any object (equivalent to a general node at this time). ReferenceBroker is responsible for managing and maintaining the entire namespace tree structure, and returns the object associated with the corresponding node according to the name at runtime.

控制模块200和监控模块300是通用内核系统1000的主要功能模块,继承自公有类ControlObject和ControlMonitor。这些类具有内建的功能,使得控制逻辑更加容易实现和维护。ControlObject的典型应用是表示一个定义良好的设备控制领域。每个ControlObject都提供了一个相关联的服务集以完成相应领域的控制操作。例如,一个表示阀门的控制对象可能拥有打开和关闭两个服务,这也为实际阀门设备具有的两个操作。ControlObject具有内建特性以解决较困难的控制问题,例如错误恢复和多线程。The control module 200 and the monitoring module 300 are the main functional modules of the general kernel system 1000, which inherit from the public classes ControlObject and ControlMonitor. These classes have built-in functionality that makes the control logic easier to implement and maintain. A typical application of ControlObject is to represent a well-defined device control domain. Each ControlObject provides an associated service set to complete the control operations in the corresponding domain. For example, a control object that represents a valve might have two services, open and close, which are the two operations that an actual valve device has. ControlObject has built-in features to solve difficult control problems, such as error recovery and multithreading.

下面结合具体实施例分别对控制模块和监控模块进行说明。The control module and the monitoring module will be described respectively below in conjunction with specific embodiments.

控制模块200采用分层组织,由低到高依次为物理层、功能层、操作层/维护层。相应地,如图5所示,控制模块200包括物理层控制单元210、功能层控制单元220、操作层控制单元230和维护层控制单元240。其中,物理层控制单元210用于读取硬件设备2000中的底层设备的数据项,并向底层设备提供服务;功能层控制单元220通过调用物理层控制单元210的服务以提供功能层的服务;操作层控制单元230通过调用功能层控制单元220的服务以提供操作层的服务;维护层控制单元240执行对物理层控制单元210和功能层控制单元220的故障定位和修理,其中,维护层控制单元240可以调用物理层控制单元210和功能层控制单元220的服务。高层控制单元可以调用同层或低层控制单元的方法和服务,从而建立起控制模块200的调用链。The control module 200 adopts a hierarchical organization, which is a physical layer, a functional layer, and an operation layer/maintenance layer in sequence from low to high. Correspondingly, as shown in FIG. 5 , the control module 200 includes a physical layer control unit 210 , a function layer control unit 220 , an operation layer control unit 230 and a maintenance layer control unit 240 . Wherein, the physical layer control unit 210 is used to read the data items of the bottom device in the hardware device 2000, and provide services to the bottom device; the function layer control unit 220 provides the service of the function layer by calling the service of the physical layer control unit 210; The operation layer control unit 230 provides the service of the operation layer by calling the service of the function layer control unit 220; the maintenance layer control unit 240 performs fault location and repair to the physical layer control unit 210 and the function layer control unit 220, wherein the maintenance layer control The unit 240 may invoke services of the physical layer control unit 210 and the functional layer control unit 220 . The high-level control unit can invoke the methods and services of the same-level or low-level control units, thereby establishing a call chain of the control module 200 .

下面结合具体实施例分别对控制模块200中的服务调用过程进行描述。The service calling process in the control module 200 will be described below in combination with specific embodiments.

如图5所示,物理层控制单元210位于最底层,映射硬件设备2000中的低层设备,例如硬件设备2000中简单的设备。物理层控制单元210包括EPICS协议通信部件211,用于利用EPICS协议与硬件设备2000进行通信以交换数据项(DataItem),包括读取硬件设备2000中的底层设备的状态值,并向硬件设备2000发送相关联的设置点。例如一个阀门控制对象类,其可能引用一个表示打开或关闭阀门的螺线管的读/写DataItem,以及一个表示阀门开闭状态的接触传感器的只读DataItem。由于上述DataItems的操作不能进行简化,因此该阀门对象属于最底层。As shown in FIG. 5 , the physical layer control unit 210 is located at the lowest layer, and maps low-level devices in the hardware device 2000 , such as simple devices in the hardware device 2000 . The physical layer control unit 210 includes an EPICS protocol communication part 211, which is used to communicate with the hardware device 2000 using the EPICS protocol to exchange data items (DataItem), including reading the status value of the bottom device in the hardware device 2000, and sending the data to the hardware device 2000 Send the associated setpoint. For example a valve control object class that might reference a read/write DataItem representing a solenoid that opens or closes a valve, and a read-only DataItem representing a contact sensor that represents the valve's open or closed state. Since the operation of the above-mentioned DataItems cannot be simplified, the valve object belongs to the bottom layer.

数据项(DataItem)提供了内核系统1000与外部硬件设备2000之间以及内核系统1000内的各个模块之间进行数据交换的一种机制。其中,通过提供到I/O设备驱动器一个抽象接口以实现与外部硬件设备2000之间的数据交换。通过存储需要在整个内核系统1000中全局可见的内部数据以实现内核系统1000内的各个模块之间的数据交换。物理设备的DataItems通过EPICS I/O和物理设备相关联。The data item (DataItem) provides a mechanism for exchanging data between the kernel system 1000 and the external hardware device 2000 and between various modules in the kernel system 1000 . Wherein, the data exchange with the external hardware device 2000 is realized by providing an abstract interface to the I/O device driver. Data exchange between modules in the kernel system 1000 is realized by storing internal data that needs to be globally visible in the whole kernel system 1000 . The DataItems of the physical device are associated with the physical device through EPICS I/O.

在本发明的一个实施例中,数据项(DataItem)根据承载数据类型的不同,可分为离散型(int)、连续型(double)、字符串型(string),以及一般类型(任何java对象)。In one embodiment of the present invention, the data item (DataItem) can be divided into discrete type (int), continuous type (double), string type (string), and general type (any java object ).

DataItem根据读/写(I/O)操作类型的不同,可分为只读类型和读/写类型。如图6所示,只读DataItem与一个数据源相关联,只有此数据源可以更新其值,此数据源可以为一个I/O对象,也可以为一个非I/O对象。只读数据项(DataItem)可读且可申请。DataItem can be divided into read-only type and read/write type according to different read/write (I/O) operation types. As shown in Figure 6, a read-only DataItem is associated with a data source, and only this data source can update its value. This data source can be an I/O object or a non-I/O object. Read-only data items (DataItem) can be read and applied for.

读写DataItem与一个目标相关联,对读写DataItem的设置将会传递到相应的物理设备I/O点上,读写DataItem也可用于非I/O目的,仅表示一个可读写的变量。读写DataItem可读、可写、可申请、可veto。The read-write DataItem is associated with a target, and the settings for the read-write DataItem will be transferred to the corresponding physical device I/O point. The read-write DataItem can also be used for non-I/O purposes, and only represents a variable that can be read and written. Read and write DataItem can be read, written, applied for, and vetoed.

在本发明的一个实施例中,具有数据源的DataItem包括三个重要特性:访问模式、轮循(Polling)和有效性。In one embodiment of the present invention, a DataItem with a data source includes three important characteristics: access mode, polling and validity.

1)访问模式:从DataItem或其数据源读1) Access mode: read from DataItem or its data source

本地:从本地DataItem取值;Local: get the value from the local DataItem;

远程:通过其数据源读远程物理设备,然后返回值。由于远程访问比本地访问的时间长,当等待设备返回值时需要等待;Remote: read the remote physical device through its data source, and then return the value. Since remote access takes longer than local access, you need to wait when waiting for the device to return a value;

智能:若轮循(polling)则使用本地访问,否则使用远程访问。Smart: use local access if polling, otherwise use remote access.

2)轮循(Polling):DataItem是否被其数据源持续更新。以下情况下将自动实现polling:具有subscribers、具有attachers或者在一个DataSpec中被使用,这个DataSpec正被一个使用同步模式的CollectionSpec使用。2) Polling: Whether the DataItem is continuously updated by its data source. Polling is automatically implemented in the following cases: has subscribers, has attachers or is used in a DataSpec that is being used by a CollectionSpec using synchronous mode.

3)有效性:DataItem和其数据源之间是否匹配3) Validity: Whether there is a match between the DataItem and its data source

invalid:数据从未读过,且数据源offline;invalid: the data has never been read, and the data source is offline;

not_init:数据没有被读,且数据源online;not_init: the data has not been read, and the data source is online;

stale:数据也许不fresh,但数据源online;stale: the data may not be fresh, but the data source is online;

offline:数据也许不fresh,但数据源offline;offline: the data may not be fresh, but the data source is offline;

good:数据fresh,其中一个具有内部数据源或没有数据源的DataItem的数据值总是good。good: The data is fresh, where the data value of a DataItem with an internal data source or without a data source is always good.

数据项(DataItem)相关的接口包括:Subscriber接口、Vetoer接口TimeListener接口。Data item (DataItem) related interfaces include: Subscriber interface, Vetoer interface, TimeListener interface.

Subscriber接口:void updateFromItem(DataItem,NewValue,Valid)。Sub scriber接口的方法为调用DataItem.subscribe(Subscriber)注册到DataItem上,当DataItem值发生变化时将自动调用Subscriber的接口方法updateFromItem执行相应的动作。Subscriber interface: void updateFromItem(DataItem, NewValue, Valid). The method of the Subscriber interface is to call DataItem.subscribe(Subscriber) to register on the DataItem. When the value of the DataItem changes, it will automatically call the Subscriber interface method updateFromItem to perform the corresponding action.

Vetoer接口:void checkVeto(DataItem,ProposedValue)。Vetoer接口的方法为调用DataItem.subscribeVetoer(Vetoer)注册到DataItem上,当DataItem的值被设置后将调用Vetoer的接口方法checkVeto来验证提议的值是被接收或者被否决。Vetoer interface: void checkVeto(DataItem, ProposedValue). The method of the Vetoer interface is to call DataItem.subscribeVetoer(Vetoer) to register on the DataItem. When the value of the DataItem is set, the interface method checkVeto of Vetoer will be called to verify whether the proposed value is accepted or rejected.

TimeListener接口:updateFromTimer()方法。TimeListener接口的方法为调用Timer.subscribeTimerListener(TimeListener)注册到Timer上,并在定时到后,调用TimeListener的接口方法subscribeTimerListener执行相应的动作。TimeListener interface: updateFromTimer() method. The method of the TimeListener interface is to call Timer.subscribeTimerListener (TimeListener) to register on the Timer, and after the timer expires, call the interface method subscribeTimerListener of TimeListener to perform corresponding actions.

数据项(DataItem)包括必须属性和可选属性。其中,必需属性构成对象的状态state。Data item (DataItem) includes required attributes and optional attributes. Among them, the required properties constitute the state of the object.

必需属性:value,timestamp,validity;Required attributes: value, timestamp, validity;

可选属性:data source,target,typeInfo,peer,simulator。Optional attributes: data source, target, typeInfo, peer, simulator.

为了提供覆盖DataItem值改变的安全层,在内核系统1000时实行设置点互锁。设置点互锁基于DataItem,申请到DataItems上,并在DataItems值发生变化时执行相应的动作。设置点互锁是预防性的。设置点互锁仅仅能检查DataItem的值,而不能检查一个对象的状态。具体而言,设置点互锁控制读取的硬件设备2000的数据项或写入的硬件设备2000的数据项仅在设定条件满足时允许修改。In order to provide a layer of security that overrides DataItem value changes, a setpoint interlock is implemented at kernel system 1000 time. The setpoint interlock is based on DataItem, applied to DataItems, and performs corresponding actions when the value of DataItems changes. The setpoint interlock is preventive. A setpoint interlock can only check the value of a DataItem, not the state of an object. Specifically, the set point interlock controls that the data item of the hardware device 2000 read or written into the data item of the hardware device 2000 is allowed to be modified only when the set condition is satisfied.

设置点互锁包括一个读写数据项(DataItem)、一个或多个校验符和一个报警。此外,设置点互锁还可以进一步包括一个触发器和一个限定符。其中,触发器和限定符均为可选条件。设置点互锁可用如下公式表示:A setpoint interlock consists of a read-write data item (DataItem), one or more checksums, and an alarm. In addition, the setpoint interlock can further include a trigger and a qualifier. Among them, triggers and qualifiers are optional conditions. The setpoint interlock can be expressed by the following formula:

SetpointInterlock=R-W DataItem+Trigger+Qualifier+{Checkers}+Blocking Alarm。SetpointInterlock=R-W DataItem+Trigger+Qualifier+{Checkers}+Blocking Alarm.

当触发器条件触发为true,限定符条件为true,至少一个校验符为false时,设置点互锁将会否决对一个DataItem提议的修改,否则提议的修改将被允许。The setpoint interlock will veto a proposed modification to a DataItem when the trigger condition is true, the qualifier condition is true, and at least one validator is false, otherwise the proposed modification will be allowed.

读写DataItem:读写数据项(DataItem)为从硬件设备2000读取的数据项或从硬件设备2000写入的数据项。设置点互锁关联一个特定的DataItem,所述特定的数据项在触发器条件中指定或者直接在设置点互锁中指定;Read-write DataItem: The read-write data item (DataItem) is a data item read from the hardware device 2000 or a data item written from the hardware device 2000 . The setpoint interlock is associated with a specific DataItem specified in the trigger condition or directly in the setpoint interlock;

触发器:触发器用于设置修改读写数据项的条件。触发器为检查的第一个条件,这个条件为一个复杂条件,一般为涉及对DataItem提议修改的一个条件。如果没有显示指定一个读写DataItem,则设置点互锁关联的DataItem是触发器复杂条件中左边起的第一个读写DataItem。(后根遍历)Trigger: Triggers are used to set conditions for modifying read and write data items. The trigger is the first condition to check. This condition is a complex condition, generally a condition involving the proposed modification of the DataItem. If a read-write DataItem is not explicitly specified, the DataItem associated with the setpoint interlock is the first read-write DataItem from the left in the trigger complex condition. (back root traversal)

限定符:限定符用于判断是否需要验证校验符的条件。验证校验符的条件为一个复杂条件。只有这个特定条件满足时,才需要检查后续的条件。限定符基于DataItem的当前值工作,即便限定符中包含与触发器中相同的DataItem。触发器检查DataItem的提议值(当前值并未发生修改),而限定符检查相同DataItem的当前值。限定符的用途在于简化一个复杂的触发器条件。Qualifier: The qualifier is used to determine whether the verification character needs to be verified. The condition to validate the validator is a complex condition. Subsequent conditions need to be checked only if this particular condition is met. The qualifier works based on the current value of the DataItem, even if the qualifier contains the same DataItem as the trigger. A trigger checks the proposed value of a DataItem (the current value has not been modified), while a qualifier checks the current value of the same DataItem. The purpose of qualifiers is to simplify a complex trigger condition.

校验符:校验符用于判断是否允许读写数据项的修改。校验符决定提议的设置值是否被允许的描述。校验符接口当前只有一个实现需求。需求基于条件,可以为一个简单条件或者一个复杂条件。只有当相应条件为true时,提议的设置值才被允许。如果需求不能满足要求,可以通过实现校验符接口来自定义特殊检查需求。校验符也可以基于DataItem的当前值工作。一个设置点互锁必须至少包括一个校验符。Verifier: The verifier is used to determine whether the modification of the read-write data item is allowed. Description of validators that determine whether a proposed setting value is allowed or not. The Verifier interface currently only requires one implementation. A requirement is based on a condition, which can be a simple condition or a complex condition. The proposed setting value is only allowed if the corresponding condition is true. If the requirements cannot meet the requirements, you can customize the special inspection requirements by implementing the verifier interface. Validators can also work based on the current value of the DataItem. A setpoint interlock must include at least one verifier.

报警:报警用于在否决读写数据项的修改时,抛出阻塞式报警。如果提议的设置值被否决,将会抛出一个阻塞式报警。一个设置点互锁必须包含一个阻塞报警。如果没有使用设置报警方法显示指定报警,则设置点互锁将会建立它自己的报警。报警可以提供三个恢复动作放弃(Abort)、重试(Retry)和继续执行(Continue)。如果使用设置报警方法传递了一个null参数,表示没有任何报警会和设置点互锁相关联,这样在提议值被否决时,将会抛出异常。Alarm: The alarm is used to throw a blocking alarm when the modification of the read-write data item is vetoed. If the proposed setting value is overruled, a blocking alert will be thrown. A setpoint interlock must include a blocked alarm. If no specified alarm is displayed using the Set Alarm method, the Setpoint Interlock will create its own alarm. The alarm can provide three recovery actions: abandon (Abort), retry (Retry) and continue execution (Continue). If a null parameter is passed using the setalarm method, it means that no alarm will be associated with the setpoint interlock, so that an exception will be thrown if the proposed value is overruled.

下面对本发明中涉及的条件和事件的概念进行说明。The concepts of conditions and events involved in the present invention will be described below.

一个条件为一个对象,涉及DataItems和常量的比较。条件的值可以分为true、false或unknown。其中,unknown为当条件关联一个或多个DataItem offline时的取值。在通用控制内核系统1000中创建一个条件对象,就可以在内核系统1000中任意位置通过条件名称来访问这个条件。换言之,不需要每次需要时都重写逻辑判断语句,可以通过引用一个条件对象来reuse同一个逻辑判断。A condition is an object involving comparisons of DataItems and constants. The value of the condition can be classified as true, false or unknown. Among them, unknown is the value when the condition is associated with one or more DataItem offline. A condition object is created in the general control kernel system 1000, and the condition can be accessed anywhere in the kernel system 1000 through the condition name. In other words, instead of rewriting the logical judgment statement every time it is needed, the same logical judgment can be reused by referencing a condition object.

条件可以为简单条件或复杂条件。简单条件例如为比较两个DataItem,或比较一个DataItem和一个常量。两个比较的元素必须类型兼容,即可比较。复杂条件例如为通过二元逻辑运算符(AND、OR)将两个条件关联起来,如此关联从而形成一棵条件树,条件树中的每个结点都可以判断。Conditions can be simple or complex. Simple conditions are for example comparing two DataItems, or comparing a DataItem with a constant. The two compared elements must be of compatible types to be comparable. A complex condition is, for example, linking two conditions through a binary logic operator (AND, OR), so as to form a condition tree, and each node in the condition tree can be judged.

每个条件包括左项和/或右项、运算符,即每个条件包括两个或三个元素。表1示出了条件的结构。Each condition includes left and/or right terms, operators, that is, each condition includes two or three elements. Table 1 shows the structure of the conditions.

表1Table 1

Figure BDA0000060331430000111
Figure BDA0000060331430000111

从表1中可以看出,条件运算符包括:As can be seen from Table 1, conditional operators include:

1)比较运算符:“>”、“>=”、“<”、“<=”、“==”、“!=”;1) Comparison operators: ">", ">=", "<", "<=", "==", "!=";

2)逻辑运算符:“AND”、“OR”、“NOT”;2) Logical operators: "AND", "OR", "NOT";

3)其他运算符:“CHANGES”、“TIMER”、“FOR”。3) Other operators: "CHANGES", "TIMER", "FOR".

条件主要用于以下三种情况:Conditions are mainly used in the following three situations:

1)waitFor方法,其中waitFor方法为基础控制类中的一个方法;1) waitFor method, wherein the waitFor method is a method in the basic control class;

2)事件,通过条件来创建事件,用来创建事件的条件称为事件源;2) Events, create events through conditions, and the conditions used to create events are called event sources;

3)使用条件来提供决策信息,根据其值来决定的执行代码类型。3) Use conditions to provide decision information, and determine the execution code type according to its value.

事件从条件(事件源)创建,事件一旦创建就已存在,但却是不活跃的,直到条件树中的第一个条件触发为true。当最后一个(最外层)条件触发为true时,也就是当判断完整个条件树时,事件发生。事件发生后,将自己作为参数,通知其注册者。Events are created from conditions (event sources), once created an event exists but is inactive until the first condition in the condition tree fires true. When the last (outermost) condition trigger is true, that is, when the entire condition tree is judged, the event occurs. When an event occurs, notify its registrants with itself as a parameter.

表2示出了本发明实施例的通用控制内核系统1000的条件和事件对应表。Table 2 shows the corresponding table of conditions and events of the general control kernel system 1000 in the embodiment of the present invention.

表2Table 2

如表2所示,如果一个事件基于多个条件的OR连接,那么在事件发生时需要知道是哪个条件触发了整个条件为真。条件列表提供的信息是在事件发生时每个条件的取值状态。条件列表是一个向量,包含了事件发生时不同条件的引用及其取值。As shown in Table 2, if an event is based on the OR connection of multiple conditions, it is necessary to know which condition triggers the entire condition to be true when the event occurs. The information provided by the condition list is the value status of each condition when the event occurs. The condition list is a vector containing references and values for the different conditions when the event occurs.

由二元逻辑运算符连接起来的复杂条件构成一棵条件树。其中条件树包括叶子节点和分支节点。条件树中的每个结点都表示一个条件,所述条件可以用于判断。条件树由基础条件抽象类派生的各种具体子类表示的条件结点所组成。其中,叶子节点表示简单条件,可以为改变条件(表示DataItem“CHANGES”条件)和抽象类叶条件的派生类(Equal、NotEqualCondition、Greater、GreaterEqual、Less、LessEqual)。Complex conditions joined by binary logical operators form a condition tree. The conditional tree includes leaf nodes and branch nodes. Each node in the condition tree represents a condition, which can be used for judgment. The condition tree is composed of condition nodes represented by various concrete subclasses derived from the basic condition abstract class. Among them, the leaf node represents a simple condition, which can be a change condition (representing a DataItem "CHANGES" condition) and a derived class of an abstract leaf condition (Equal, NotEqualCondition, Greater, GreaterEqual, Less, LessEqual).

分支节点表示复合条件,包括Not、条件改变条件和由二元逻辑运算符连接的抽象类分支条件的派生类。其中,Not表示一元逻辑运算符NOT连接的复合条件,条件改变条件表示条件“CHANGES”条件。由二元逻辑运算符连接的抽象类分支条件的派生类包括And和Or。Branch nodes represent compound conditions, including Not, condition change conditions, and derived classes of the abstract class Branch Condition connected by binary logical operators. Among them, Not represents the compound condition connected by the unary logical operator NOT, and the condition change condition represents the condition "CHANGES". Derived classes of the abstract class BranchCondition joined by binary logical operators include And and Or.

事件从(事件源)条件创建,对应一棵条件树,从而也创建了一棵事件树。相应的事件树也有叶子节点和分支节点。事件树由控制事件抽象类派生的各种具体子类表示的事件结点所组成。其中,叶子节点可以为改变事件(与改变条件相对应)和叶事件(与叶条件相对应);分支节点可以为条件改变事件(与条件改变条件相对应)、无事件(与无条件相对应),时间事件(表示条件“FOR”周期条件,与一种时间条件相对应)以及逻辑事件(与分支条件相对应)。Events are created from (event source) conditions, corresponding to a condition tree, which also creates an event tree. The corresponding event tree also has leaf nodes and branch nodes. The event tree is composed of event nodes represented by various concrete subclasses derived from the control event abstract class. Among them, leaf nodes can be change events (corresponding to change conditions) and leaf events (corresponding to leaf conditions); branch nodes can be condition change events (corresponding to condition change conditions), no events (corresponding to no conditions) , a time event (representing the condition "FOR" cycle condition, corresponding to a time condition) and a logic event (corresponding to a branch condition).

条件树为静态的概念,而事件树为动态的概念。在抽象类控制事件的定义中包含了3个成员变量:Condition containerCondition、BaseCondition topOfConditionTree和EventSubscriber eventSubscriber。其中,Condition containerCondition表示与对应条件树中的基本条件结点的条件封装。BaseCondition topOfConditionTree表示条件树的根结点。EventSubscriber eventSubscriber表示向其注册的事件申请者,在实现时实际上是该事件结点在事件树中的父结点:条件树中每个非根结点有且只有一个父结点;向条件树的根结点注册的对象实现了EventSubscriber接口,以便在整个条件值触发为true时能够得到及时通知。The condition tree is a static concept, while the event tree is a dynamic concept. The definition of the abstract class control event contains 3 member variables: Condition containerCondition, BaseCondition topOfConditionTree and EventSubscriber eventSubscriber. Among them, Condition containerCondition represents the condition encapsulation with the basic condition node in the corresponding condition tree. BaseCondition topOfConditionTree represents the root node of the condition tree. EventSubscriber eventSubscriber represents the event applicant registered with it, which is actually the parent node of the event node in the event tree when it is implemented: each non-root node in the condition tree has one and only one parent node; to the condition tree The object registered by the root node implements the EventSubscriber interface, so that it can be notified in time when the entire condition value is triggered to be true.

事件树的动态性通过Subscriber模式实现:事件树中分支结点通过实现EventSubscriber接口(条件改变事件、无事件、逻辑事件)或TimerListener接口(时间事件),向其子结点注册,在其子结点条件值发生变化时得到通知,执行相应的动作。事件树中叶子结点与DataItem相关联,通过实现UntypedSubscriber接口(改变事件)或DiscreteSubscriber、ContinuousSubscriber和TextSubscriber(叶事件)接口,并向关联DataItem注册,在关联DataItem值发生变化时得到通知,并执行相应动作。The dynamism of the event tree is realized through the Subscriber mode: the branch nodes in the event tree register with their child nodes by implementing the EventSubscriber interface (condition change event, no event, logic event) or the TimerListener interface (time event). When the point condition value changes, it will be notified and the corresponding action will be executed. The leaf node in the event tree is associated with the DataItem. By implementing the UntypedSubscriber interface (change event) or the DiscreteSubscriber, ContinuousSubscriber and TextSubscriber (leaf event) interfaces, and registering with the associated DataItem, it will be notified when the value of the associated DataItem changes, and execute the corresponding action.

因而,事件树是一种由下至上的通知机制:DataItem→叶子节点→分支节点(父结点)→根结点,从而完成整个事件树的条件值的及时判断。当事件树最外层根结点的条件值触发为true时,事件发生,通过调用其注册者所实现的EventSubscriber接口的updateFromEvent接口方法,执行相应动作。Therefore, the event tree is a bottom-up notification mechanism: DataItem → leaf node → branch node (parent node) → root node, so as to complete the timely judgment of the condition value of the entire event tree. When the condition value trigger of the outermost root node of the event tree is true, the event occurs, and the corresponding action is executed by calling the updateFromEvent interface method of the EventSubscriber interface implemented by its registrant.

在事件树的创建、事件值的判断和注册者的通知时,使用事件锁。在事件树创建过程中,整个事件树从根结点开始递归创建,事件树中所有结点共享同一个事件锁,以保证不同结点事件值的更新得到有效同步,可控进行,而不会出现不一致的情况。Event locks are used when creating event trees, judging event values, and notifying registrants. During the event tree creation process, the entire event tree is recursively created from the root node, and all nodes in the event tree share the same event lock to ensure that the update of event values of different nodes is effectively synchronized and controlled, without An inconsistency occurred.

功能层控制单元220通过调用物理层的服务,而被操作层控制单元230所调用。功能层控制单元220提供一个完整的服务。例如,一个功能层真空蒸发对象可能调用一个物理层阀门对象和一个物理层泵对象,提供将腔室抽为真空的操作。功能层控制单元220通常为管理者。例如,一个功能层隔离阀对象可以控制物理层中多个隔离阀的动作。The functional layer control unit 220 is invoked by the operation layer control unit 230 by invoking the service of the physical layer. The functional layer control unit 220 provides a complete service. For example, a functional layer vacuum evaporation object might call a physical layer valve object and a physical layer pump object to provide operations to evacuate the chamber. The functional layer control unit 220 is usually a manager. For example, one functional layer isolation valve object can control the actions of multiple isolation valves in the physical layer.

操作层控制单元230位于最高层。在本发明实施例的通用控制内核系统1000中,操作员可以使用通用控制内核系统1000的任何客户端。因此一个通用控制内核系统1000的操作员可以为一个操作人员,也可以为一个集群装备监管软件(例如CTC),还可以为任何与通用控制内核系统应用程序的操作层进行交互的软件实体。操作层控制单元230可以通过功能层控制单元220调用功能层的服务,而不能越过功能层控制单元220直接调用物理层控制单元210的服务。The operation layer control unit 230 is located at the highest layer. In the general control core system 1000 of the embodiment of the present invention, the operator can use any client of the general control core system 1000 . Therefore, the operator of a common control kernel system 1000 can be an operator, can also equip a cluster with supervisory software (such as CTC), and can also be any software entity that interacts with the operation layer of the common control kernel system application program. The operation layer control unit 230 can call the service of the function layer through the function layer control unit 220 , but cannot bypass the function layer control unit 220 and directly call the service of the physical layer control unit 210 .

维护层控制单元240位于最高层。维护层通过一个用户接口与外界交互的除了操作层之外的另一层。维护层控制单元240提供给维护工程师(非操作员)一个视图,用于执行底层的故障定位和修理。维护层控制单元240可以直接调用物理层控制单元210和功能层控制单元220。The maintenance layer control unit 240 is located at the highest layer. The maintenance layer is another layer other than the operation layer that interacts with the outside world through a user interface. The maintenance level control unit 240 provides maintenance engineers (non-operators) with a view for performing low-level fault location and repair. The maintenance layer control unit 240 can directly call the physical layer control unit 210 and the function layer control unit 220 .

各层控制单元之间的交互采用客户端/服务器的方式,其中提供服务的控制单元为服务器,调用服务的控制单元称为客户端。在本发明的一个实施例中,一个控制单元可以同时为服务器和客户端。例如:操作层控制单元230既为服务器,又为客户端。The interaction between the control units of each layer adopts the method of client/server, in which the control unit that provides the service is the server, and the control unit that invokes the service is called the client. In an embodiment of the present invention, one control unit can be both a server and a client. For example: the operation layer control unit 230 is both a server and a client.

具体而言,操作层控制单元230可以调用低层控制单元的服务,同时也会被操作员(例如一个CTC)调用其服务。功能层控制单元220通常既为服务器,又为客户端。功能层控制单元220可以调用低层控制单元的服务,同时也会被高层控制单元调用其服务。物理层控制单元210通常仅为服务器,高层控制单元会调用其服务,但物理层控制单元210不会自己调用服务,而是简单地调用关联DataItems的setValue()方法来设置物理设备的I/O点。当一个控制单元(客户端)请求另一个控制单元(服务器)的服务时,请求将会排队,直到另一个控制对象空闲。客户端将会阻塞直到请求的服务开始执行,而服务器将会上锁直到请求的服务完成执行。Specifically, the operation layer control unit 230 can invoke the services of the lower layer control units, and at the same time be invoked by an operator (such as a CTC). The functional layer control unit 220 is usually both a server and a client. The function layer control unit 220 can invoke the services of the lower layer control units, and at the same time be invoked by the higher layer control units. The physical layer control unit 210 is usually only a server, and the high-level control unit will call its service, but the physical layer control unit 210 will not call the service itself, but simply call the setValue() method of the associated DataItems to set the I/O of the physical device point. When a control unit (client) requests the services of another control unit (server), the request will be queued until another control object is free. The client will block until the requested service starts executing, and the server will block until the requested service finishes executing.

所有的上锁(包括unlock)方法都是控制对象类的一部分,由客户端在服务器上调用。一个控制对象的锁可以包括以下几种情况:All lock (including unlock) methods are part of the control object class and are called by the client on the server. The lock of a control object can include the following situations:

1)没有锁;1) No lock;

2)一个运行锁;2) A run lock;

3)一个服务器锁;3) A server lock;

4)一个服务锁;4) A service lock;

5)一个服务器锁和一个运行锁;5) A server lock and a running lock;

5)多个服务锁(针对相同的服务)和一个运行锁。5) Multiple service locks (for the same service) and one run lock.

其中,服务器锁请求用于请求获得服务器锁,高层控制单元利用所述服务器锁向低层控制单元调用服务,并锁定低层控制单元。服务锁请求用于请求获得服务锁,高层控制单元利用所述服务锁向低层控制单元调用指定服务,并锁定对所述指定服务的调用。运行锁请求用于请求获得运行锁,高层控制单元利用所述运行锁执行所述指定服务,并锁定所述指定服务的执行。Wherein, the server lock request is used to request to obtain a server lock, and the high-level control unit uses the server lock to call a service to the low-level control unit, and locks the low-level control unit. The service lock request is used to request to obtain a service lock, and the high-level control unit uses the service lock to call a specified service to the low-level control unit, and locks the call to the specified service. The running lock request is used to request to obtain a running lock, and the high-level control unit uses the running lock to execute the specified service and lock the execution of the specified service.

创建一个控制对象,需派生自控制对象或已有控制对象的派生类。创建控制对象的一个服务,需作为控制对象的公有(public)内部类,并派生自控制服务。To create a control object, it needs to be derived from the control object or the derived class of the existing control object. A service for creating a control object needs to be a public inner class of the control object and derived from the control service.

如图7所示,作为控制对象的公有(public)内部类需要实现控制服务中定义的抽象方法:public void execute()throws BaseException来定制特定的服务逻辑。但是一个服务的execute()方法不能调用相同控制对象的其他服务,这样将会发生死锁,因为一个控制对象一次只允许一个服务执行。As shown in Figure 7, the public inner class as the control object needs to implement the abstract method defined in the control service: public void execute() throws BaseException to customize specific service logic. But the execute() method of a service cannot call other services of the same control object, so a deadlock will occur because a control object only allows one service to execute at a time.

高层控制单元调用并执行低层控制单元的服务包括如下步骤:The high-level control unit calls and executes the service of the low-level control unit including the following steps:

1)准备阶段:1) Preparation stage:

1.1)处理锁请求:在高层控制单元请求执行一个服务时,通常首先申请一个服务器锁或服务锁。1.1) Processing lock request: When the high-level control unit requests to execute a service, it usually first applies for a server lock or service lock.

低层控制单元在收到来自高层控制单元的服务器锁请求或服务锁请求时,如果当前没有活跃的服务器锁或服务锁或运行锁时,则低层控制单元授予所高层控制单元服务器锁。When the low-level control unit receives the server lock request or service lock request from the high-level control unit, if there is no active server lock, service lock or running lock, the low-level control unit grants the server lock to all high-level control units.

如果当前没有活跃的服务器锁或服务锁或运行锁,或者当前服务锁与所述服务锁请求的服务锁执行的服务相同,则低层控制单元授予高层控制单元服务锁。If there is currently no active server lock, service lock or running lock, or the current service lock performs the same service as the service lock requested by the service lock, then the low-level control unit grants the high-level control unit a service lock.

如果锁请求没有被立即授予,则将其放置在锁请求等待队列的队尾。低层控制单元将未被授予服务器锁、服务锁或运行锁的服务器锁请求、服务锁请求或运行锁请求按照到达的先后顺序放置在锁请求等待队列中。所有的锁请求在等待队列中具有相同的优先级。如果多个客户端尝试同时获得一个锁,只有一个锁请求将被授予,而其他的锁请求则将会排队等待授予。使用unlock方法移除所有的锁。如果一个服务器或客户端中止,所有的锁将自动释放。锁的请求和授予需要使用一定的数据结构,并考虑数据结构的一致性,即实现多个线程对同一数据结构访问的同步。If the lock request is not granted immediately, it is placed at the end of the lock request waiting queue. The low-level control unit places server lock requests, service lock requests or run lock requests that are not granted server locks, service locks or run locks in the lock request waiting queue in the order of arrival. All lock requests have the same priority in the wait queue. If multiple clients try to acquire a lock at the same time, only one lock request will be granted, while other lock requests will be queued for grant. Use the unlock method to remove all locks. If a server or client aborts, all locks are automatically released. The request and grant of the lock need to use a certain data structure, and consider the consistency of the data structure, that is, to realize the synchronization of multiple threads accessing the same data structure.

1.2)实例化和调用:客户端实例化和调用服务。一个新的控制服务内部类实例被创建,并对请求的服务所需的参数进行初始化。1.2) Instantiation and invocation: the client instantiates and invokes the service. A new control service inner class instance is created and initialized with the required parameters for the requested service.

1.3)检查可用性:请求的服务立即被许可(即申请到运行锁),如果请求的服务当前没有执行(即没有任何服务在当前执行),且符合以下任一种条件时,所述低层控制单元授予所述高层控制单元运行锁。1.3) Check availability: the requested service is immediately permitted (i.e., a running lock is applied for), and if the requested service is not currently being executed (i.e., no service is currently being executed), and any of the following conditions is met, the low-level control unit A run lock is granted to the higher level control unit.

A)没有活跃的服务器锁、服务锁或运行锁;A) No active server locks, service locks or run locks;

B)仅有一个针对当前请求的服务的活跃的服务锁;B) There is only one active service lock for the currently requested service;

C)仅有一个所述高层控制单元具有的服务器锁,换言之,仅仅有一个活跃的服务器锁,并且被当前这个客户端所拥有。C) There is only one server lock owned by the high-level control unit, in other words, there is only one active server lock, and it is owned by the current client.

如果运行锁请求没有被立即授予,将其放置在锁请求等待队列的队尾。If the running lock request is not granted immediately, it is placed at the end of the lock request waiting queue.

2)执行服务2) Executing the service

2.1)调用:当控制单元准备运行服务时,客户端自动获得了服务器的运行锁。要执行服务,服务器调用所请求服务的execute()方法。execute()方法也许会调用其他的方法或其他的服务,从而建立起一个调用链。当另一个服务被调用时,当前服务被认为是运行在“父模式”中,因此父服务的(运行)锁仍然保持,直到所有的从属方法和服务完成。调用服务并不将控制传递给它所调用的服务,而是自己保持这种控制,从而运行锁将会一直保持,直到服务完成。2.1) Calling: When the control unit is ready to run the service, the client automatically obtains the running lock of the server. To execute a service, the server calls the execute() method of the requested service. The execute() method may call other methods or other services, thus establishing a call chain. When another service is invoked, the current service is considered to be running in "parent mode", so the (running) lock of the parent service is still held until all dependent methods and services complete. The calling service does not pass control to the service it called, but holds that control itself, so that the run lock will be held until the service completes.

当一个控制服务在一个控制单元调用了一个服务,这两个实体被认为是同一个调用链的一部分。在一条调用链中可以链接多个控制单元。调用链中的高层控制单元一般要阻塞,因为它们等待调用链中的低层控制单元完成其服务。调用链仅仅在一个对象保持对另一个对象的锁时才有效,一旦服务调用完成、所有锁都被释放,服务器就不在调用链中了。When a control service invokes a service in a control unit, the two entities are considered to be part of the same invocation chain. Several control units can be linked in a call chain. Higher control units in the call chain typically block because they wait for lower control units in the call chain to complete their services. The call chain is only valid as long as one object holds a lock on another object, once the service call is complete and all locks are released, the server is no longer in the call chain.

2.2)报警和中止:在执行过程中,服务可能会遇到一个条件,这使它抛出一个报警。报警恢复可能需要服务重新执行。这个服务以RetryException异常的形式抛出来,这个异常被控制对象系统截获,系统接着继续调用这个控制服务的execute()方法,重新执行导致报警抛出的代码。恢复选项也可能需要服务中途中止,这个机制同retry相似,一个AbortException将被控制对象系统截获,并导致对象中止这个服务。2.2) Alerting and aborting: During execution, a service may encounter a condition which causes it to throw an alert. Alarm recovery may require service re-execution. This service is thrown out in the form of RetryException, which is intercepted by the control object system, and the system then continues to call the execute() method of this control service to re-execute the code that caused the alarm to be thrown. The recovery option may also require the service to be terminated midway. This mechanism is similar to retry. An AbortException will be intercepted by the control object system and cause the object to terminate the service.

2.3)完成:服务执行完成,释放运行锁。2.3) Completion: The service execution is completed, and the running lock is released.

2.4)释放服务器锁或服务锁:高层控制单元将会释放服务器锁或服务锁。2.4) Release the server lock or service lock: the high-level control unit will release the server lock or service lock.

如图8所示,控制对象以呼叫方式或开始方式对其他控制对象的调用形成了一个控制服务服务调用链。在图8中,控制对象CO_A以call方式调用CO_B的控制服务,CO_B的控制服务以开始方式调用CO_C和CO_D的控制服务,而CO_C的控制服务又调用CO_F的控制服务。控制对象CO_E也以呼叫方式请求CO_B的控制服务(可以与控制对象CO_A请求的相同,也可能不同)。由于授予的活跃运行锁至多只有一个,控制对象一次只能执行一个服务请求。因而CO_E对CO_B的运行锁请求放在CO_B的lockManager数据成员的waitingLockRequests队列中等待授予。As shown in FIG. 8 , a control object calls other control objects in a call mode or a start mode to form a control service service invocation chain. In Figure 8, the control object CO_A invokes the control service of CO_B in call mode, the control service of CO_B calls the control services of CO_C and CO_D in the start mode, and the control service of CO_C calls the control service of CO_F. The control object CO_E also requests the control service of CO_B by means of a call (it may be the same as that requested by the control object CO_A, or it may be different). Since at most one active run lock is granted, the control object can only execute one service request at a time. Therefore, CO_E's running lock request to CO_B is placed in the waitingLockRequests queue of the lockManager data member of CO_B to wait for grant.

如果调用链中的一个对象在执行服务时被请求中止或捕捉到异常,这个对象将通过服务器和客户端的形式中止其关联的所有控制对象。例如,对图8中的任何对象(例如CO_D)启动中止,将最终中止图中所有的控制对象。中止过程包括:If an object in the call chain is requested to abort or catches an exception while executing the service, this object will abort all its associated control objects in the form of server and client. For example, initiating abort on any object in Figure 8 (eg, CO_D) will eventually abort all control objects in the diagram. The abort process includes:

S1:CO_D移除其所授予的所有锁请求,完成中止,并将中止请求沿着调用链向上传递到其客户端CO_B;S1: CO_D removes all lock requests granted by it, completes the abort, and passes the abort request up the call chain to its client CO_B;

S2:CO_B再将中止请求沿着一条调用链分支向下依次传递给服务器CO_C、及CO_C的服务器CO_F;S2: CO_B then sends the abort request to the server CO_C and the server CO_F of CO_C in turn along a call chain branch;

S3:CO_F先完成中止,CO_C接着完成中止;S3: CO_F completes the suspension first, and CO_C completes the suspension next;

控制回到CO_B,CO_B完成中止,并沿着两条调用链分支将中止请求传递到其客户端,即CO_A和CO_E,相应地CO_A和CO_E也相继完成中止;The control returns to CO_B, CO_B completes the suspension, and passes the suspension request to its client along the two call chain branches, that is, CO_A and CO_E, and accordingly CO_A and CO_E also complete the suspension one after another;

S4:中止过程结束,但控制对象并未被销毁。S4: The abort process ends, but the control object is not destroyed.

每当一个服务执行完成,低层控制单元在所述高层控制单元释放所述运行锁后,低层控制单元(服务器)将检查锁请求等待队列,来决定接下来执行哪个服务。检查锁请求等待队列包括遍历锁请求等待队列中的每一个锁请求。Whenever a service execution is completed, after the high-level control unit releases the running lock, the low-level control unit (server) will check the lock request waiting queue to determine which service to execute next. Checking the lock request waiting queue includes traversing each lock request in the lock request waiting queue.

1)当前这个客户端(高层控制单元)仍然保持着服务器锁,服务器(低层控制单元)将执行拥有服务器锁的客户端的下一个服务请求(运行锁请求)。1) The current client (high-level control unit) still holds the server lock, and the server (low-level control unit) will execute the next service request (running lock request) of the client with the server lock.

2)当前保持着一个服务锁,服务器(低层控制单元)将执行对这个服务的下一个服务请求(运行锁请求)。2) Currently holding a service lock, the server (lower layer control unit) will execute the next service request (running lock request) for this service.

3)当前没有活跃的锁,即没有活跃的服务器锁或服务锁,运行锁在服务执行前后自动申请和释放,并且下一个请求是一个服务器锁,那么对该服务器锁请求授予服务器锁。服务器(低层控制单元)接着执行拥有这个服务器锁的客户端(高层控制单元)的下一个服务请求(运行锁)。3) There is currently no active lock, that is, there is no active server lock or service lock. The running lock is automatically applied for and released before and after the service is executed, and the next request is a server lock, then the server lock request is granted a server lock. The server (low-level control unit) then executes the next service request (run lock) of the client (high-level control unit) that owns the server lock.

4)当前没有活跃的锁,并且下一个请求是一个服务锁,则对该服务锁请求授予服务锁。服务器(低层控制单元)接着执行任何客户端(高层控制单元)针对这个服务的执行请求(运行锁)。4) There is currently no active lock, and the next request is a service lock, then grant the service lock to the service lock request. The server (lower level control unit) then executes any client (higher level control unit) execution request for this service (run lock).

5)当前没有活跃的服务器锁、服务锁或运行锁,并且下一个是服务请求为运行锁请求,服务器(低层控制单元)执行所述运行锁请求对应的服务。5) There is currently no active server lock, service lock or running lock, and the next service request is a running lock request, and the server (lower control unit) executes the service corresponding to the running lock request.

控制模块200所提供的服务通过内部类控制服务的形式实现。高层控制单元接收命令,然后调用低层控制单元执行命令。在最底层的物理层控制单元210设置或读取DataItems的值来执行设备I/O。控制模块200具有如下的重要特性:The services provided by the control module 200 are implemented in the form of internal class control services. The high-level control unit receives the command, and then calls the low-level control unit to execute the command. The physical layer control unit 210 at the lowest layer sets or reads the value of DataItems to perform device I/O. The control module 200 has the following important characteristics:

1)允许控制单元之间互不干扰地并发地执行服务,而不需建立独立的线程来执行,这通过在控制单元上设置锁来实现;1) Allow the control units to execute services concurrently without interfering with each other without establishing independent threads for execution, which is achieved by setting locks on the control units;

2)包括一个功能强大的方法-waitFor,waitFor用于暂停服务的执行直到某个条件得到满足;2) Including a powerful method -waitFor, waitFor is used to suspend the execution of the service until a certain condition is met;

3)健壮地处理异常和中止,因为当前控制单元可以获得其自身与其他控制单元之间的关系,所述其他控制单元为当前控制单元的客户端或服务器。3) Robust handling of exceptions and aborts, since the current control unit can obtain relationships between itself and other control units, which are clients or servers of the current control unit.

控制服务是控制单元的一个重要内建特性,适合于两个控制单元(客户端请求服务,而服务器执行服务)之间的交互,提供了一个内建安全层,包括:Control service is an important built-in feature of the control unit, which is suitable for the interaction between two control units (the client requests the service, and the server executes the service), providing a built-in security layer, including:

1)竞争条件:在服务器上一次只能执行一个服务。在一个服务运行时,服务所在的服务器上锁。控制对象排队所有的服务请求,决定何时、以何种顺序执行排队的请求。1) Race condition: Only one service can execute at a time on the server. When a service is running, the server where the service is located is locked. The control object queues all service requests and decides when and in what order to execute the queued requests.

2)线程同步:服务实现了多线程,但并没有使用Java线程同步机制。同步机制应用了“临界区”的思想,在“临界区”一次只能由一个线程在临界区中执行,服务应用和同步机制相同的概念。2) Thread synchronization: The service implements multi-threading, but does not use the Java thread synchronization mechanism. The synchronization mechanism applies the idea of "critical section". In the "critical section", only one thread can execute in the critical section at a time. The service application has the same concept as the synchronization mechanism.

3)异常处理:服务自动处理异常,如中止和重试。3) Exception handling: The service automatically handles exceptions, such as abort and retry.

监控模块(ControlMonitor)300用于监控内核系统1000的条件并在条件满足时独立地执行相应的动作。ControlMonitor对象和内核系统1000的其他模块并发执行操作。监控模块300检测一组条件,并在特定条件满足时执行相应的动作。例如,监控模块300在一个特定过程执行的时候执行维护一个腔式压力的任务,这个控制对象仅在这个特定过程执行时才运行。ControlMonitor的一个用途是作为后台仿真器,监视连续型数据项被设置为特定范围内的某个值,然后让传感器数据项来仿真期望的响应。The monitoring module (ControlMonitor) 300 is used to monitor the conditions of the kernel system 1000 and independently execute corresponding actions when the conditions are met. The ControlMonitor object and other modules of the kernel system 1000 perform operations concurrently. The monitoring module 300 detects a set of conditions and performs corresponding actions when certain conditions are met. For example, the monitoring module 300 performs the task of maintaining a cavity pressure when a specific process is executed, and the control object is only run when the specific process is executed. One use of ControlMonitor is as a background simulator, monitoring continuous data items being set to a value within a specific range, and then having sensor data items simulate the desired response.

监控模块300包含一个运行标志,所述标志在实例化监控模块300对象时自动创建。运行标志为一个DataItem,用于表示监控模块300的状态,即当前是否正在运行。The monitoring module 300 contains a runtime flag that is automatically created when the monitoring module 300 object is instantiated. The running flag is a DataItem, which is used to indicate the status of the monitoring module 300, that is, whether it is currently running.

通过调用startRunning()方法启动一个监控模块300。当调用了这个startRunning()方法,内核系统1000设置运行标志为开,并调用execute()方法。必须通过重载execute()方法来执行监控功能。execute()包括一个waitFor()方法等待一个特定条件发生。当条件发生时,execute()执行指定的动作,然后一般再返回到waitFor()方法,从而形成一个循环。因此,运行的监控模块300可以执行waitFor()或者特定的动作。A monitoring module 300 is started by calling the startRunning() method. When the startRunning() method is called, the kernel system 1000 sets the running flag to on, and calls the execute() method. The monitoring function must be executed by overloading the execute() method. execute() includes a waitFor() method that waits for a specific condition to occur. When the condition occurs, execute() performs the specified action, and then generally returns to the waitFor() method, thus forming a loop. Therefore, the running monitoring module 300 may perform waitFor() or specific actions.

通过调用stopRunning()方法停止一个监控模块300,内核系统1000设置运行标志为关。如果监控模块300在等待,waitFor()方法退出,开始执行execute()。如果监控模块300正在执行动作,动作将会继续。设置运行标志为关不会自动停止监控模块300,需要循环条件中加入对运行标志的判断。By calling the stopRunning() method to stop a monitoring module 300, the kernel system 1000 sets the running flag to off. If the monitoring module 300 is waiting, the waitFor() method exits, and execute() is started. If the monitoring module 300 is performing an action, the action will continue. Setting the running flag to off will not automatically stop the monitoring module 300 , and a judgment on the running flag needs to be added to the loop condition.

监控模块300可以为控制模块200中的一个控制单元的客户端,表示其execute()方法可以调用一个控制单元的服务。但是,监控模块300自身并不提供服务,不会成为服务器。因此,监控模块300总是在调用链的顶端。The monitoring module 300 can be a client of a control unit in the control module 200, which means that its execute() method can call a service of a control unit. However, the monitoring module 300 itself does not provide services and will not become a server. Therefore, the monitoring module 300 is always at the top of the call chain.

监控模块300可以通过调用startAbort()或haltMonitor()方法被中止。当监控模块300被要求中止时,它确保调用链中所有在其之下正在执行服务的控制对象都完成中止,然后控制转到应用程序定义的abort代码。接着监控模块300停止执行,除非它被定制为在一个abort后继续执行。haltMonitor()中止监控模块300执行,阻塞调用者直到中止成功完成。The monitoring module 300 can be aborted by calling the startAbort() or haltMonitor() methods. When the monitoring module 300 is required to abort, it ensures that all control objects in the call chain that are executing services under it have completed the abort, and then the control transfers to the abort code defined by the application. The monitoring module 300 then stops executing unless it is ordered to continue executing after an abort. haltMonitor() halts execution of the monitor module 300, blocking the caller until the halt successfully completes.

监控模块300比Interlock灵活,Interlock只能设置一个DataItem,而监控模块300可以通过重载execute()方法实现多种动作。The monitoring module 300 is more flexible than Interlock. Interlock can only set one DataItem, while the monitoring module 300 can implement multiple actions by overloading the execute() method.

当满足以下条件时,控制单元的服务远程可用:The service of the control unit is available remotely when the following conditions are met:

1)将通用控制内核系统1000和ClusterLink CTC或GFX集成起来;1) Integrate the general control core system 1000 with ClusterLink CTC or GFX;

2)编写自己的Java或C++客户端和通用控制内核系统1000进行通信,所述客户端可以为维护或操作接口、工厂内CTC、数据收集系统等等。2) Write your own Java or C++ client to communicate with the general control kernel system 1000. The client can be a maintenance or operation interface, a CTC in the factory, a data collection system, and the like.

通用控制内核系统1000的远程接口允许控制对象服务被一个独立的程序远程调用。当一个服务被以这种方式调用时,被称为远程调用。远程程序可以和通用控制内核系统1000运行在同一台计算机上,也可以运行在同一网络中的不同计算机上。此时需要遵循预定的规则以使一个控制对象的服务远程可访问。The remote interface of the common control kernel system 1000 allows control object services to be invoked remotely by an independent program. When a service is called in this way, it is called a remote call. The remote program can run on the same computer as the common control kernel system 1000, or can run on different computers in the same network. At this time, predetermined rules need to be followed to make the service of a control object remotely accessible.

在本发明的一个实施例中,监控模块300可以通过取值互锁监控内核系统1000的安全状态,并在内核系统1000的不安全条件触发时进行矫正。取值互锁是矫正性的。取值互锁检测DataItem是否达到一个特定值,并自动执行一系列相关的操作。例如,一个取值互锁可以用于检测设备中的一个不安全条件,并在不安全条件发生时执行一系列动作,将设备恢复到一个安全状态。In an embodiment of the present invention, the monitoring module 300 can monitor the safety state of the kernel system 1000 through value interlocking, and correct when an unsafe condition of the kernel system 1000 is triggered. Value interlocks are corrective. The value interlock detects whether the DataItem reaches a specific value, and automatically executes a series of related operations. For example, a value interlock can be used to detect an unsafe condition in equipment and perform a series of actions to restore the equipment to a safe state when the unsafe condition occurs.

取值互锁包括一个触发器和一个行为列表,此外,取值互锁还可以包括一个非阻塞式报警。其中,非阻塞式报警为可选条件。取值互锁可用公式表示为:ValueInterlock=Trigger+{Action}+Unblocking Alarm。A value interlock includes a trigger and a list of actions. In addition, a value interlock can also include a non-blocking alarm. Among them, non-blocking alarm is an optional condition. The value interlock can be expressed as: ValueInterlock=Trigger+{Action}+Unblocking Alarm.

触发器:触发器设置内核系统1000的不安全条件,用于描述不安全状态。当取值互锁陷入的触发器条件时,表示内核系统1000处于不安全状态。触发器条件可以为一个简单条件,或则一个复杂条件。Trigger: A trigger sets an unsafe condition of the kernel system 1000 and is used to describe an unsafe state. When the value interlock falls into the trigger condition, it means that the kernel system 1000 is in an unsafe state. A trigger condition can be a simple condition, or a complex condition.

行为列表:行为列表为触发不安全条件后的动作,其中当所述行为列表包括多个动作时,多个动作可以逐个执行。具体而言,行为列表为具有execute方法的一个对象。当触发器条件触发为真时,取值互锁将自动调用行为的execute接口方法。当前行为接口有三个实现类,即Assignment、Addition和Ensure,对一个读写DataItem进行修改。如果上述三个行为实现类无法满足需求,可以通过实现行为接口来自定义特殊动作需求。行为中修改的DataItem可以为触发器条件中的一个DataItem,也可以为一个完全不同的DataItem。如果取值互锁有多个行为,则所有行为将一个接一个地执行。Behavior list: the behavior list is an action after an unsafe condition is triggered, and when the behavior list includes multiple actions, the multiple actions can be executed one by one. Specifically, the action list is an object with an execute method. When the trigger condition is true, the value interlock will automatically call the execute interface method of the behavior. The current behavior interface has three implementation classes, namely Assignment, Addition and Ensure, which modify a read-write DataItem. If the above three behavior implementation classes cannot meet the requirements, you can customize the special action requirements by implementing the behavior interface. The DataItem modified in the behavior can be a DataItem in the trigger condition, or a completely different DataItem. If a value interlock has multiple actions, all actions will be executed one after the other.

报警:报警为非阻塞报警。如果存在所述非阻塞报警,则将其在Ensure动作中抛出。Alarm: The alarm is a non-blocking alarm. If there is said non-blocking alarm, it is thrown in the Ensure action.

通用控制内核系统1000进一步包括报警模块400,用于在内核系统1000发生异常时发出报警。报警模块400可以通知操作员或其他实体(如远程主机)异常的发生,同时提供可供选择的恢复动作,用于清除报警。The general control kernel system 1000 further includes an alarm module 400 for sending an alarm when the kernel system 1000 is abnormal. The alarm module 400 can notify an operator or other entity (such as a remote host) of the occurrence of an abnormality, while providing optional recovery actions for clearing the alarm.

报警模块400发出的报警类型包括阻塞式报警和非阻塞式报警。其中,报警模块400在抛出阻塞式报警后将会阻塞发送对象所在线程直至清除阻塞式报警。清除阻塞式报警作为报警恢复动作的一部分。报警模块400在抛出非阻塞式报警后,发送对象所在线程不必阻塞而是继续运行。非阻塞式报警用于警告操作员一个可能的错误,或提醒操作员一个动作正在执行。The alarm types issued by the alarm module 400 include blocking alarms and non-blocking alarms. Wherein, the alarm module 400 will block the thread where the sending object is located after throwing the blocking alarm until the blocking alarm is cleared. Blocking alarms are cleared as part of an alarm recovery action. After the alarm module 400 throws a non-blocking alarm, the thread where the sending object is located does not need to be blocked but continues to run. Non-blocking alarms are used to warn the operator of a possible error, or to alert the operator that an action is in progress.

如图9所示,报警模块400包括下述属性:一个整型报警标识、一个消息(message)、一个描述(description)、一个严重等级(severity)、一个可选的自动恢复选项(autorecovery),以及一个或多个恢复选项(recovery)。其中,消息(message)是对报警模块400的简要描述,描述(description)时对报警模块400的详细描述。每个自动恢复选项或恢复选项包括四个属性:一个恢复消息(recovery message)、一个访问组(access group)、一个恢复类型(recovery type),以及一个可选的恢复动作(recoveryaction)。As shown in Figure 9, the alarm module 400 includes the following attributes: an integer alarm identifier, a message (message), a description (description), a severity level (severity), an optional automatic recovery option (autorecovery), And one or more recovery options (recovery). Wherein, the message (message) is a brief description of the alarm module 400, and the description (description) is a detailed description of the alarm module 400. Each automatic recovery option or recovery option includes four attributes: a recovery message, an access group, a recovery type, and an optional recovery action.

报警标识:表示报警ID,将报警映射到一个数字标识,可能为远程接口所需。Alarm ID: Indicates the alarm ID, maps the alarm to a digital ID, and may be required by the remote interface.

消息(message):用于日志记录或显示给操作员,分为两种类型:静态和动态。Message (message): Used for logging or displaying to the operator, divided into two types: static and dynamic.

1)静态:报警消息不会发生变化;1) Static: the alarm message will not change;

2)动态:报警消息包含依赖于运行时环境的信息,通过在报警消息字串中插入标记(Marker:“<MarkerName>”)来实现。在发送报警时,报警消息中“<MarkerName>”将会替换为当时的标记值。可以通过两种方式实现映射:<MarkerName,ObjectName,AttrName>和<MarkerName,MarkerValue>。2) Dynamic: the alarm message contains information that depends on the runtime environment, which is realized by inserting a marker (Marker: "<MarkerName>") into the alarm message string. When sending an alarm, "<MarkerName>" in the alarm message will be replaced by the current marker value. Mapping can be achieved in two ways: <MarkerName, ObjectName, AttrName> and <MarkerName, MarkerValue>.

严重等级(severity):每个报警被赋予一个整型的严重性等级,可用于报警客户端对报警的过滤,或是在GUI(Graphical User Interface,图形用户界面)报警页面上用不同颜色显示不同严重等级的报警。Severity: Each alarm is assigned an integer severity level, which can be used to filter alarms by the alarm client, or display different colors in different colors on the GUI (Graphical User Interface, Graphical User Interface) alarm page. Severity level alarms.

自动恢复(autorecovery):自动恢复是一个可选属性,用于自动恢复。若自动回复属性非空,在报警模块400抛出报警时将自动执行恢复动作来清除报警。当一个报警被清除后,将不再执行操作员选择的动作。在使用自动恢复选项来建立系统恢复时,需要特别注意包括自动恢复选项和一系列可供操作员选择的恢复选项的情况。自动恢复选项具有以下两个优点:首先,报警抛出后不需要用户干预:例如报警只有一个系统恢复选项,或只有一个用户定义恢复选项时;其次,在进一步执行其他动作时,需要使系统处于一个安全状态:通常自动恢复选项是用户定义恢复选项时。Autorecovery: Autorecovery is an optional attribute used for automatic recovery. If the auto-reply attribute is not empty, when the alarm module 400 throws an alarm, it will automatically perform a recovery action to clear the alarm. When an alarm is cleared, no operator-selected actions will be performed. When using the automatic recovery option to establish a system recovery, special attention needs to be paid to including the automatic recovery option and a range of recovery options from which the operator can choose. The automatic recovery option has the following two advantages: First, no user intervention is required after the alarm is thrown: for example, when the alarm has only one system recovery option, or only one user-defined recovery option; second, when performing other actions further, the system needs to be in A safe state: Usually the automatic recovery option is when the user defines the recovery option.

恢复(recovery):一组报警恢复选项,是一个或多个恢复对象的列表。一个恢复对象包含四个属性:恢复消息(recovery message)、访问组(access group)、恢复类型(recovery type)和恢复动作(recovery action)。Recovery: A set of alarm recovery options, which is a list of one or more recovery objects. A recovery object contains four attributes: recovery message, access group, recovery type, and recovery action.

恢复消息(recovery message):显示给操作员的恢复选项消息;recovery message: recovery option message displayed to the operator;

访问组(access group):访问组可能用于CTC端:不同的操作员被分配不同的访问组,只能操作具有此访问组属性的报警恢复选项;Access group: access group may be used on CTC side: different operators are assigned different access groups, and can only operate alarm recovery options with this access group attribute;

恢复类型(recovery type):报警恢复类型包括系统类型和用户自定义类型。其中系统类型包括放弃ABORT、重试RETRY、继续CONTINUE和清除CLEAR。用户自定义类型为SER_ONLY。于每个系统恢复类型,均包括系统内建功能执行对应恢复类型的恢复动作;Recovery type: Alarm recovery type includes system type and user-defined type. The system types include abandoning ABORT, retrying RETRY, continuing CONTINUE and clearing CLEAR. The user-defined type is SER_ONLY. For each system recovery type, it includes the system built-in function to execute the recovery action corresponding to the recovery type;

恢复动作(recovery action):接受一个实现接口RecoveryAction接口的对象作为恢复动作。Recovery action (recovery action): Accept an object that implements the interface RecoveryAction interface as a recovery action.

对于系统恢复类型,恢复动作是可选的。恢复动作和系统恢复类型组合使用可以在执行内核系统1000内建的恢复动作之前使内核系统1000处于一个安全状态.For system restore types, restore actions are optional. The combination of recovery action and system recovery type can put the kernel system 1000 in a safe state before executing the recovery action built into the kernel system 1000.

对于用户恢复类型,恢复动作是必需的。需要定义完整的报警恢复功能,通过系统恢复选项(仅限于ABORT、RETRY、CONTINUE)来清除报警。For user restore type, restore action is required. A complete alarm recovery function needs to be defined to clear the alarm through the system recovery options (only ABORT, RETRY, CONTINUE).

报警模块400具有以下优点:The alarm module 400 has the following advantages:

1)每当内核系统1000不能解决一个错误情况时,报警模块400用于通知操作员,并让操作员决定如何处理;1) Whenever the kernel system 1000 cannot resolve an error situation, the alarm module 400 is used to notify the operator and allow the operator to decide how to handle it;

2)当某个状态发生,不需要停止当前服务的执行,但需要操作员对此状态有所了解。2) When a certain state occurs, there is no need to stop the execution of the current service, but the operator needs to know about this state.

报警模块400包括发送单元,当特定情况出现时利用发送单元发送报警。报警模块400进一步包括监视单元,当报警的状态或其某个恢复动作的状态发生变化时,通知监视单元。例如:当报警模块400发送或清除一个报警,开始或结束执行一个恢复动作时,通知监视单元。The alarm module 400 includes a sending unit, which is used to send an alarm when a specific situation occurs. The alarm module 400 further includes a monitoring unit, which notifies the monitoring unit when the status of the alarm or the status of a recovery action changes. For example: when the alarm module 400 sends or clears an alarm, and starts or finishes executing a recovery action, it notifies the monitoring unit.

当报警模块400发送了一个报警,发送对象将会被阻塞(如果此报警为一个阻塞报警),系统调用注册到此报警的客户的updateAlarmState()回调函数。报警模块400的一个典型客户为监控模块300,当报警模块400发送一定数目的报警或发送某种类型的报警时,监控模块300将执行特定的动作。报警恢复动作的执行者,即报警模块既可以为远程客户端也可以为本地客户端。When the alarm module 400 sends an alarm, the sending object will be blocked (if the alarm is a blocking alarm), and the system calls the updateAlarmState() callback function of the client registered to the alarm. A typical client of the alarm module 400 is the monitoring module 300. When the alarm module 400 sends a certain number of alarms or sends a certain type of alarm, the monitoring module 300 will perform specific actions. The executor of the alarm recovery action, that is, the alarm module can be either a remote client or a local client.

本发明实施例提供的通用控制内核系统1000进一步包括日志模块,用于以日志的形式记录所述通用控制内核系统1000运行过程中的信息。日志模块定义了日志文件包含的信息,用于过滤系统日志信息。可以在运行时修改日志模块,从而改变将要记录的日志信息的数量和等级。The general control core system 1000 provided by the embodiment of the present invention further includes a log module, configured to record information during the operation of the general control core system 1000 in the form of a log. The log module defines the information contained in the log file, which is used to filter the system log information. The logging module can be modified at runtime, thereby changing the amount and level of logging information that will be logged.

如图10所示,日志模块500包括数据日志单元510和系统日志单元520。As shown in FIG. 10 , the log module 500 includes a data log unit 510 and a system log unit 520 .

数据日志单元510,用于以第一预定周期记录内核系统1000的数据和事件。数据日志是通用控制内核系统1000的一种机制,允许数据和事件形成日志并记录进文件,从而提供有用的调试和性能跟踪信息给应用程序开发人员。数据日志单元510每隔预定时间或当某个事件发生时,将数据记录进日志文件。记录的数据包括时间和/或发生的事件,以及此时特定数据项的值。部分数据日志会话可以并发执行,根据不同的规范收集不同的数据。The data log unit 510 is configured to record data and events of the kernel system 1000 at a first predetermined period. Data logging is a mechanism of the general control kernel system 1000 that allows data and events to be logged and recorded into files, thereby providing useful debugging and performance tracking information to application developers. The data log unit 510 records data into a log file every predetermined time or when a certain event occurs. The recorded data includes the time and/or event that occurred, and the value of a particular data item at that time. Some data log sessions can be executed concurrently to collect different data according to different specifications.

数据日志单元510收集数据并将其写入日志文件。收集的数据内容和收集的时间等信息包含在一个会话中。每个会话包括收集描述,其中收集描述包括数据描述,数据描述包括对DataItems的引用。可以同时打开多个会话进行日志记录。The data log unit 510 collects data and writes it into a log file. Information such as what data is collected and when it was collected is included in a session. Each session includes a collection description that includes a data description that includes references to DataItems. Multiple sessions can be opened for logging at the same time.

下面对数据日志单元510中涉及的术语进行解释。The terms involved in the data log unit 510 are explained below.

DataSpec:DataItems的列表,表示一起记录的数据,指定what to log。例如,一个DataSpec可以指定记录以下DataItems的值:压力、晶片传感器、温度、打开传感器和阀门1。DataSpec: A list of DataItems, indicating the data recorded together, specifying what to log. For example, a DataSpec could specify to record the values of the following DataItems: Pressure, Wafer Sensor, Temperature, Open Sensor, and Valve1.

CollectionSpec:DataSpecs的列表,表示将DataSpecs的列表基于相同的触发器一起记录到文件中,指定when to log。这些定义触发数据记录的触发器是时间间隔(在特定时间记录数据,称为时间触发)和条件(在条件满足时记录数据,称为事件触发)。例如,一个CollectionSpec指定以10s的时间间隔记录DataSpecA中指定的DataItems。CollectionSpec: A list of DataSpecs, indicating that the list of DataSpecs will be recorded into a file based on the same trigger, specifying when to log. These triggers that define what triggers data logging are time interval (record data at a specific time, called time trigger) and condition (record data when a condition is met, called event trigger). For example, a CollectionSpec specifies to record the DataItems specified in DataSpecA at intervals of 10s.

Session:一组CollectionSpec,表示将一组CollectionSpec同时记录并记录到相同目的地,例如为一个文件)。在正常操作中,多个Sessions可以同时打开,将数据记录到不同的文件中。Session允许应用人员根据不同目的记录数据。例如,一个会话用于应用程序开发,达到调试目的。另一个会话用于在应用程序部署过程中记录数据,达到跟踪数据目的。这两个会话可以使用部分相同的CollectionSpecs,而其他CollectionSpecs则是针对不同目的所特有的。应用人员可以创建一个会话收集绘图数据,另一个会话收集存档数据,第三个会话收集调试数据。Session: A set of CollectionSpec, which means that a set of CollectionSpec is recorded simultaneously and recorded to the same destination, such as a file). In normal operation, multiple Sessions can be open at the same time, recording data to different files. Session allows application personnel to record data according to different purposes. For example, one session is used for application development, for debugging purposes. Another session is used to log data during application deployment for tracking data purposes. The two sessions can use some of the same CollectionSpecs, while other CollectionSpecs are specific for different purposes. Application personnel can create a session to collect drawing data, another session to collect archive data, and a third session to collect debug data.

DataLogDestination:表示目的地信息,这个目的地信息被StorageManager管理。当前仅有的DataLogDestination和StorageManager类是DataLogFile和TextStorageManager类。DataLogDestination: Indicates destination information, which is managed by StorageManager. Currently the only DataLogDestination and StorageManager classes are the DataLogFile and TextStorageManager classes.

DataLogFile:抽象类DataLogDestination的子类。一个DataLogFile对象接收数据,并将数据写入一个永久的文本文件。DataLogFile: A subclass of the abstract class DataLogDestination. A DataLogFile object receives data and writes the data to a permanent text file.

TextStorageManager:抽象类StorageManager的子类。抽象类StorageManager用于基于文本的存储管理,定义了所有日志文件的目录结构。TextStorageManager: A subclass of the abstract class StorageManager. The abstract class StorageManager is used for text-based storage management and defines the directory structure of all log files.

数据日志单元510为了记录数据日志,必须定义Session,并将其链接到一个目的地。例如一个数据日志文件(文本文件),并调用Session.open方法打开(激活)Session。当Session打开时,没有内容记录进目的地,直到一个CollectionSpec中的一个触发器发生。一个触发器可以为一个条件,或者一个时间间隔。当一个触发器发生时,关于触发器以及这个CollectionSpec关联的所有DataItems的信息都被记录到目的地。In order to record data logs, the data log unit 510 must define a Session and link it to a destination. For example, a data log file (text file), and call the Session.open method to open (activate) the Session. When the Session is open, nothing is recorded into the destination until a trigger in a CollectionSpec occurs. A trigger can be a condition, or a time interval. When a trigger occurs, information about the trigger and all DataItems associated with this CollectionSpec are logged to the destination.

数据日志单元510的数据日志记录规则为:The data logging rules of the data logging unit 510 are:

DataItems:一个DataItem可以用在多个DataSpec,而不管DataSpec是否锁定。DataItems: A DataItem can be used in multiple DataSpecs, regardless of whether the DataSpec is locked or not.

DataSpecs:一个DataSpec可以用在多个CollectionSpec中,而不管CollectionSpec是否被激活。换言之,一个DataSpec可以同时被多个Session上锁。DataSpecs: A DataSpec can be used in multiple CollectionSpecs, regardless of whether the CollectionSpec is activated or not. In other words, a DataSpec can be locked by multiple Sessions at the same time.

CollectionSpecs:一个CollectionSpec不能在多个Session中使用。换言之,一个CollectionSpec不能同时在多个Session中处于激活状态。CollectionSpecs: A CollectionSpec cannot be used in multiple Sessions. In other words, a CollectionSpec cannot be active in multiple Sessions at the same time.

DataLogFiles:一般一个DataLogFile是一个Session的唯一属性。DataLogFiles不用于在多个Sessions问共享。一个DataLogFile不能连接到多个打开的Session。DataLogFiles: Generally a DataLogFile is the only attribute of a Session. DataLogFiles are not intended to be shared among multiple Sessions. A DataLogFile cannot be connected to multiple open Sessions.

数据日志单元510可以采用以下两种日志记录形式:基于时间的日志记录和周期日志记录。其中,基于事件的日志记录(Event-based logging)是通过指定一个或多个条件触发器触发。周期日志记录(Periodic logging)需要指定一个时间间隔触发器触发。The data logging unit 510 may adopt the following two logging forms: time-based logging and periodic logging. Among them, event-based logging (Event-based logging) is triggered by specifying one or more conditional triggers. Periodic logging needs to specify a time interval trigger to trigger.

(1)创建DataSpec:使用DataSpec.addToData()方法来添加DataItems。(1) Create a DataSpec: Use the DataSpec.addToData() method to add DataItems.

(2)创建CollectionSpec:具有如下属性:(2) Create CollectionSpec: it has the following attributes:

(2.1)1个或多个DataSpec对象:使用CollectionSpec.addToDataSpecs()方法来添加DataSpec对象。(2.1) One or more DataSpec objects: use the CollectionSpec.addToDataSpecs() method to add DataSpec objects.

(2.2)1个或多个触发器:触发器的条件为使用addToTriggers()方法添加。时间间隔触发器使用setInterval()方法。(2.2) 1 or more triggers: The condition of the trigger is added using the addToTriggers() method. Interval triggers use the setInterval() method.

(2.3)数据采集方式:(2.3) Data collection method:

同步模式:CollectionSpec将其attach到其所包含的DataItem上,以保证其所采集的数据均为good。对DataItem数值的读取总是放在触发器所在线程中。同步模式推荐用于使用一个具有较短时间间隔的时间间隔触发器,或者是频繁发生的条件触发器。Synchronous mode: CollectionSpec attaches it to the DataItem it contains to ensure that all the data it collects is good. The reading of the DataItem value is always placed in the thread where the trigger is located. Synchronous mode is recommended for using an interval trigger with a short interval, or a condition trigger that occurs frequently.

异步模式:CollectionSpec使用智能模式采集数据,以保证所收集的数据总为good。对DataItem数值的读取总是放在一个单独的线程中,以避免阻塞触发器所在线程。异步模式推荐用于一个不频繁发生的时间间隔触发器。Asynchronous mode: CollectionSpec uses intelligent mode to collect data to ensure that the collected data is always good. Reading of DataItem values is always done in a separate thread to avoid blocking the trigger's thread. Asynchronous mode is recommended for an infrequently occurring interval trigger.

缺省模式:由内核系统1000决定使用哪种模式。当时间间隔小于或等于10秒时使用同步模式,当时间间隔大于10秒或没有时间间隔触发器时使用异步模式。在内核系统1000中,数据日志单元510推荐采用缺省模式。Default mode: which mode to use is determined by the kernel system 1000 . Synchronous mode is used when the interval is less than or equal to 10 seconds, and asynchronous mode is used when the interval is greater than 10 seconds or there is no interval trigger. In the kernel system 1000, the data log unit 510 recommends using a default mode.

(3)建立DataLogFile:数据文件的名称自动由DataLogFile对象创建,需要使用DataLogFile对象的命名模板。有两种形式的命名模板:(3) Create DataLogFile: The name of the data file is automatically created by the DataLogFile object, and the naming template of the DataLogFile object needs to be used. There are two forms of named templates:

(3.1)系统内建模板:root/<mmmdd>/<name><number>.<extension>,(3.1) System built-in template: root/<mmmdd>/<name><number>.<extension>,

如dlog/May21/dlog2.txt。每当打开一个Session时,一个使用当前日期和下一个序号的新数据文件被创建。如果是当天的第一个数据文件,number为1。Such as dlog/May21/dlog2.txt. Whenever a Session is opened, a new data file is created using the current date and the next sequence number. If it is the first data file of the day, number is 1.

root:由TextStorageManager.setRootDlogDirectory()指定。root: specified by TextStorageManager.setRootDlogDirectory().

mmmdd:表示月和日,由系统提供,月用英文名称表示。mmmdd: indicates the month and day, provided by the system, and the month is indicated by its English name.

name:由DataLogFile.setNameTemplate()指定。name: specified by DataLogFile.setNameTemplate().

number:由系统提供的序列号。number: The serial number provided by the system.

extension:可选的,如果使用setNameTemplate()方法时指定了一个扩展名。extension: Optional, if an extension is specified when using the setNameTemplate() method.

(3.2)用户自定义模板:如果内核系统1000提供的模版不适合,可以自定义模版。自定义模版需要创建core包中的LogFile并设置相应属性,并在实例化一个DataLogFile对象时作为构造函数参数传递。(3.2) User-defined template: If the template provided by the kernel system 1000 is not suitable, the template can be customized. The custom template needs to create the LogFile in the core package and set the corresponding properties, and pass it as a constructor parameter when instantiating a DataLogFile object.

(4)创建一个会话:(4) Create a session:

(4.1)一个或多个CollectionSpecs:使用addToSpecs()方法添加。(4.1) One or more CollectionSpecs: Added using the addToSpecs() method.

(4.2)一个DataLogDestination对象,以及对StorageManager对象的引用,以确定数据日志文件的文件名和路径。如果没有设置StorageManager的数据日志目录,则缺省目录是“当前目录/dlog/”(4.2) A DataLogDestination object, and a reference to the StorageManager object to determine the file name and path of the data log file. If the data log directory of StorageManager is not set, the default directory is "current directory/dlog/"

(5)打开数据日志记录功能:内核系统1000中同时可以有多个Session处于打开状态。(5) Enabling the data logging function: in the kernel system 1000, multiple Sessions may be open at the same time.

使用Session.open方法打开一个会话,必须满足以下条件:To open a session using the Session.open method, the following conditions must be met:

(5.1)Session所包含的CollectionSpecs不能处于活跃状态,即不能已经使用;(5.1) The CollectionSpecs contained in the Session cannot be active, that is, they cannot be used;

(5.2)关联的DataLogDestination不能已经使用,即不能有其他已打开的Session连接到这个目的地;(5.2) The associated DataLogDestination cannot be used already, that is, no other opened Session can be connected to this destination;

当一个Session打开时,Session被认为是打开的(″open″)、Session包含的CollectionSpecs被认为是活跃的(″active″)、CollectionSpecs包含的DataSpecs被认为是上锁的(″locked″)When a Session is opened, the Session is considered open ("open"), the CollectionSpecs contained in the Session are considered active ("active"), and the DataSpecs contained in the CollectionSpecs are considered locked ("locked")

当一个条件触发器发生时,以下数据被写入数据日志文件中:触发的条件的记录以及条件触发的时间;相应CollectionSpec包含的所有DataSpecs中的所有DataItems的数值,触发条件中涉及的DataItems不被记录,除非其包含在一个DataSpec中。When a conditional trigger occurs, the following data is written into the data log file: the record of the triggered condition and the time when the condition was triggered; the values of all DataItems in all DataSpecs contained in the corresponding CollectionSpec, and the DataItems involved in the triggering condition are not record unless it is contained in a DataSpec.

当时间间隔到时(时间间隔触发器触发时),以下数据被写入数据日志文件中:数据被收集的时间和相应CollectionSpec包含的所有DataSpecs中的所有DataItems的数值。When the time interval is up (when the time interval trigger is triggered), the following data is written to the data log file: the time when the data was collected and the values of all DataItems in all DataSpecs contained in the corresponding CollectionSpec.

(6)关闭数据日志记录功能:使用Session.close方法关闭一个会话。(6) Close the data logging function: use the Session.close method to close a session.

(7)修改数据日志设置:(7) Modify data log settings:

(7.1)如果一个DataSpec上锁了,不能向这个DataSpec添加或从这个DataSpec中移除DataItems。(7.1) If a DataSpec is locked, DataItems cannot be added to or removed from the DataSpec.

(7.2)如果一个CollectionSpec是活跃的,不能向这个CollectionSpec添加或从这个CollectionSpec中移除DataSpecs。但是,可以修改时间间隔和数据采集模式,以及添加或删除触发器。(7.2) If a CollectionSpec is active, DataSpecs cannot be added to or removed from this CollectionSpec. However, the time interval and data collection mode can be modified, and triggers can be added or removed.

(7.3)如果一个Session已经打开,不能添加或删除CollectionSpecs,或改变目的地。(7.3) If a Session is already open, CollectionSpecs cannot be added or deleted, or the destination changed.

系统日志单元520用于以第二预定周期记录内核系统1000的调用信息和跟踪信息。系统日志是通用控制内核系统1000的一种机制,允许某个特定范围内的调试和性能跟踪的有用日志信息自动产生。这些信息主要包括ControlObject服务调用和完成情况的信息,以及数据项的值发生变化时、互锁陷入时、报警发出或清除报警时的相关信息。开发人员也可以在系统日志单元520中插入自定义的日志信息,从而在运行时记录进日志文件。The system log unit 520 is configured to record call information and trace information of the kernel system 1000 at a second predetermined period. Syslog is a mechanism for general control kernel system 1000 that allows automatic generation of useful log information for debugging and performance tracking within a certain scope. These information mainly include information about ControlObject service invocation and completion, and related information when the value of a data item changes, when an interlock falls, when an alarm is issued or cleared. Developers can also insert self-defined log information into the system log unit 520, so as to record into log files during runtime.

系统日志单元520允许用户获取已经建立在通用控制内核系统1000中的跟踪信息,也可以额外包括和捕获在通用控制内核系统1000中的跟踪消息。当系统日志单元520执行时,捕捉到的消息被写入到一个目的地(日志文件或通用控制内核系统控制台)。系统日志单元520可以提供基于日志设置打开或关闭特定类型日志信息的纪录。这些设置应用于每个日志目的地,可以在配置时设置,也可以在运行时修改。The system log unit 520 allows users to obtain trace information already established in the general control kernel system 1000 , and can also additionally include and capture trace messages in the general control kernel system 1000 . When the syslog unit 520 executes, the captured messages are written to a destination (log file or common control kernel system console). The syslog unit 520 can provide a record of enabling or disabling certain types of logging information based on logging settings. These settings apply to each log destination and can be set at configuration time or modified at runtime.

系统日志单元520可以用于特定需求控制应用程序的开发阶段和后开发(使用或生产)阶段。在开发阶段,系统日志是一个有用的应用程序调试工具。在后运行时(应用程序配置过程结束之后)阶段,系统日志消息一般写入到文件,而非控制台,这些日志文件收集的数据将用于诊断、调试,以及问题的定位和解决。需要恰当设置不同主题(针对默认组)的verbosity,以不致于严重影响系统性能,可考虑三个阶段:一般开发阶段、配置出现问题时的开发阶段(因为配置是应用程序的一个重要功能),以及生产阶段。Syslog unit 520 may be used in the development and post-development (use or production) phases of specific requirements control applications. During the development phase, syslog is a useful application debugging tool. During the post-runtime (after the application configuration process ends), system log messages are generally written to files instead of the console. The data collected by these log files will be used for diagnosis, debugging, and problem location and resolution. It is necessary to properly set the verbosity of different themes (for the default group) so as not to seriously affect system performance. Three stages can be considered: the general development stage, the development stage when configuration problems occur (because configuration is an important function of the application), and the production stage.

当内核系统1000启动时,通用控制内核系统配置文件中设置的所有目的地将自动激活用于系统日志记录。同时,两个缺省文件以及一个可选的缺省日志文件被创建和激活,控制台也被设置为一个活跃的目的地。When kernel system 1000 starts up, all destinations set in the common control kernel system configuration file will be automatically activated for system logging. Also, two default files and an optional default log file are created and activated, and the console is set as an active destination.

下面对系统日志单元520中涉及的术语进行说明。The terms involved in the system log unit 520 are described below.

归档协议:日志文件命名规则包括属性appendToExisting、template、sizeLimit和history,以及defaultWildCard。日志文件命名规则规定打开文件的文件名,以及在关闭一个文件后,如何打开下一个文件。Archive protocol: The log file naming rules include attributes appendToExisting, template, sizeLimit, history, and defaultWildCard. The log file naming rules specify the file names of open files and how to open the next file after closing one file.

通配符(wild cards):用于目录名和文件名,‘%s’或‘%S’除外,只能用于模板文件名部分。Wild cards: used for directory names and file names, except '%s' or '%S', which can only be used in the template file name part.

如果当前文件log,已有文件log2、log3,则关闭当前文件打开一个新文件后,新文件为log,其他文件依次更名为log2、log3和log4。如果此时history设置为4,则将删除最旧的日志文件log4。如果系统日志单元520模板是“logging/%y/%m/%d”,并且今天是2005-5-5,则打开的第一个文件为“logging/05/05/05”。If the current file log has existing files log2 and log3, after closing the current file and opening a new file, the new file will be log, and the other files will be renamed log2, log3 and log4 in turn. If history is set to 4 at this time, the oldest log file log4 will be deleted. If the syslog unit 520 template is "logging/%y/%m/%d" and today is 2005-5-5, the first file opened is "logging/05/05/05".

自动写盘属性autoFlush:自动写盘属性autoFlush与归档协议无关,但它表示日志信息是否写入目的地,而非暂时存放在内存缓冲区中。如果这个属性设置为真,则跟踪信息一经产生就会就会写到目标文件中,而不是写到内存缓冲区中。Automatic disk writing attribute autoFlush: The automatic disk writing attribute autoFlush has nothing to do with the archive protocol, but it indicates whether the log information is written to the destination instead of temporarily stored in the memory buffer. If this property is set to true, the trace information will be written to the object file as soon as it is generated, instead of being written to the memory buffer.

消息过滤机制:每一个消息都有一个Topic,Verbosity和关联一个Object。消息过滤机制使用Topic,Verbosity和Group的概念过滤跟踪信息。过滤机制可用一个矩阵表示,行代表Topic,列代表Group,矩阵元素代表Verbosity。当产生一个跟踪消息时,首先定位到列,在定位到行(Topic),最后定位到相应矩阵元素。如果在要求记录的严重性等级之内,则将跟踪消息进行记录,否则舍弃。Message filtering mechanism: Each message has a Topic, Verbosity and an associated Object. The message filtering mechanism uses the concepts of Topic, Verbosity and Group to filter trace information. The filtering mechanism can be represented by a matrix, where rows represent topics, columns represent groups, and matrix elements represent verbosities. When a trace message is generated, the column is first located, then the row (Topic), and finally the corresponding matrix element is located. The trace message is logged if it is within the severity level required to be logged, otherwise it is discarded.

本发明实施例提供的用于集成电路制造设备的通用控制内核系统基于Windows xp操作系统,采用JAVA实现,具有如下优点:The general control kernel system for integrated circuit manufacturing equipment provided by the embodiment of the present invention is based on Windows XP operating system, adopts JAVA to realize, has the following advantages:

1)通过管理系统的并行性和资源互锁,提供统一的接口给应用程序中不同类型的I/O,以及一个进行错误处理和错误恢复的省时框架,解决控制应用程序开发中费时、易错的问题。1) Through the parallelism and resource interlocking of the management system, a unified interface is provided for different types of I/O in the application program, and a time-saving framework for error handling and error recovery, which solves the time-consuming and easy problems in the development of control application programs. wrong question.

2)提供支持软件互锁、数据日志、通信功能的强大应用程序编程接口。具体而言,本发明实施例的通用控制内核系统的互锁API(Application Programming Interface,应用程序编程接口)保证人员和设备的安全。Recipe API能够存储和检索工艺过程参数。数据日志API能够快速获得运行时的工艺过程参数信息。2) Provide a powerful application programming interface that supports software interlocking, data logging, and communication functions. Specifically, the interlock API (Application Programming Interface, Application Programming Interface) of the general control kernel system of the embodiment of the present invention ensures the safety of personnel and equipment. Recipe API can store and retrieve process parameters. The data log API can quickly obtain the process parameter information at runtime.

3)通过灵活的配置策略实现组件开发和软件复用。本发明实施例的通用控制内核系统配置策略可以方便同一应用程序内以及不同应用程序之间的代码重用。并且,通用控制内核系统配置文件允许软件开发人员配置组件的属性,虽然上述属性在不同应用程序中会有所不同,但不需重新编译。3) Realize component development and software reuse through flexible configuration strategies. The common control kernel system configuration policy in the embodiment of the present invention can facilitate code reuse within the same application program and among different application programs. Also, the common control kernel system configuration file allows software developers to configure the properties of the components, although the above properties will be different in different applications, but without recompilation.

4)提供必要的工具支持快速开发和调试应用程序。本发明实施例的通用控制内核系统通用控制内核系统提供了应用程序调试和性能跟踪的两个强大功能,包括系统日志服务和控制台接口,其中系统日志服务包括生成系统操作记录,控制台接口包括查看和修改应用程序运行时的通用控制内核系统环境状态。4) Provide necessary tools to support rapid development and debugging of applications. The general control kernel system of the embodiment of the present invention provides two powerful functions of application program debugging and performance tracking, including system log service and console interface, wherein the system log service includes generating system operation records, and the console interface includes View and modify the state of the common control kernel system environment while the application is running.

本发明实施例的通用控制内核系统可以使开发人员能够快速开发健壮的控制应用程序,通过灵活的配置策略实现组件开发和软件复用,还可以提供必要的工具支持快速开发和调试应用程序。The general control kernel system of the embodiment of the present invention can enable developers to quickly develop robust control application programs, realize component development and software reuse through flexible configuration strategies, and can also provide necessary tools to support rapid development and debugging of application programs.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同限定。Although the embodiments of the present invention have been shown and described, those skilled in the art can understand that various changes, modifications and substitutions can be made to these embodiments without departing from the principle and spirit of the present invention. and modifications, the scope of the invention is defined by the appended claims and their equivalents.

Claims (19)

1. for a general controls kernel system for integrated circuit manufacturing equipment, comprising:
Configuration module, described configuration module is for when described kernel system starts, by object-instantiated and by the object registration after instantiation in name space, create initial name space tree construction, object in described initial name space tree construction is carried out to initialization, wherein, the behavior of described object map hardware device, wherein, described configuration module comprises: configuration file parsing module, registering unit and initialization unit, wherein, described configuration file parsing module analysis configuration file, according to object described in the information instances of described configuration file; Described registering unit for by the object registration of instantiation to name space, create initial name space tree construction, the set that described initial name space tree construction is a plurality of titles; Described initialization unit travels through described initial name space tree construction according to first search algorithm, and according to the information of described configuration file, the object after registering is carried out to initialization;
Control module, described control module controls for the initial name space tree construction creating according to configuration module the service that high-rise control module called and carried out low layer control module, wherein the grade of control object is followed successively by Physical layer from low to high, functional layer and operation layer, and described control object also comprises and described other maintenance level of operation layer ad eundem, wherein, described control module comprises: Physical layer control module, functional layer control module, operation layer control module and maintenance level control module, wherein, described Physical layer control module reads the data item of the underlying device in hardware device, and provide service to described underlying device, the service of described functional layer control module by calling described Physical layer control module is to provide the service of functional layer, the service of described operation layer control module by calling described functional layer control module is to provide the service of operation layer, carry out localization of fault and the repairing to described Physical layer control module and functional layer control module with described maintenance level control module, wherein, described maintenance level control module calls the service of described Physical layer control module and functional layer control module, with
Monitoring module, described monitoring module is for monitoring the condition of described kernel system and carry out independently corresponding action when condition meeting;
Alarm module, abnormal for occurring in described kernel system, send warning;
Log pattern, for record the information of described kernel system operational process with the form of daily record, wherein, described log pattern comprises: data logging unit and system journal unit, wherein, described data logging unit is for recording data and the event of described kernel system with the first predetermined period; With described system journal unit for record recalls information and the trace information of described kernel system with the second predetermined period.
2. general controls kernel system as claimed in claim 1, wherein, described registering unit is also for Making Alias, the corresponding one or more another names of a wherein said object.
3. general controls kernel system as claimed in claim 2, wherein, by one of following two kinds of modes access object:
1) title in name space tree construction is accessed object corresponding to described title by reference;
2) described by reference another name is accessed the object that described another name is corresponding.
4. general controls kernel system as claimed in claim 1, wherein, described Physical layer control module further comprises EPICS protocol communication parts, described EPICS protocol communication parts utilize EPICS agreement and hardware device to communicate with swap data item, comprise the state value that reads the underlying device in described hardware device, and send set-point to described hardware device.
5. general controls kernel system as claimed in claim 4, wherein, described data item is divided into discrete type, continuous type and character string type according to the type of carrying data;
Described data item is divided into read-only and read/write according to read/write operation type.
6. general controls kernel system as claimed in claim 5, wherein, utilize interlocking to check the value of described data item, interlocking comprises: set-point interlocking, only allows to revise imposing a condition while meeting for the data item of the described hardware device controlling the data item of the described hardware device reading or write.
7. general controls kernel system as claimed in claim 6, wherein, the interlocking of described set-point comprises:
The item that reads and writes data, described in the read and write data data item that hardware device reads described in Xiang Weicong or the data item writing from described hardware device; With
Check character, the modification of described check character for reading and writing data described in judging whether to allow;
Report to the police, described warning is used for when the modification of the item that reads and writes data described in rejection, and the block type of dishing out is reported to the police.
8. general controls kernel system as claimed in claim 7, wherein, described warning provides three to recover action: abandon, retry and continuation carry out.
9. general controls kernel system as claimed in claim 7, wherein, set-point interlocking also comprises and trigger is set and qualifier is set,
Described trigger is for arranging the condition reading and writing data described in modification, and described qualifier is for judging whether to verify the condition of described check character.
10. general controls kernel system as claimed in claim 1, wherein, described monitoring module is monitored the safe condition of described kernel system by value interlocking, and corrects when the unsafe condition of described kernel system triggers, and wherein said value interlocking comprises:
Trigger module, described trigger module arranges the unsafe condition of described kernel system;
Behavior list, described behavior list is for triggering the action after described unsafe condition, and wherein, when described behavior list comprises a plurality of action, described a plurality of actions are carried out one by one.
11. general controls kernel systems as claimed in claim 10, wherein, described value interlocking also comprises:
Report to the police, described warning is used for providing unblock formula to report to the police.
12. general controls kernel systems as claimed in claim 4, wherein, the service that described high-rise control module called and carried out low layer control module comprises the steps:
Described high-rise control module is locked or service lock to obtain server to the lock request of described low layer control module transmission server or service lock request, parameter to the service of request is carried out initialization, to described low layer control module, sends the request of operation lock to obtain operation lock;
Described high-rise control module, after obtaining described operation lock, calls and carries out the service that corresponding low layer control module is locked in described operation, and after service completes, discharges described operation lock;
Described high-rise control module discharges described server lock or service lock,
Wherein, the request of described server lock is used for asking to obtain described server lock, and described high-rise control module utilizes described server lock to call service to described low layer control module, and locks described low layer control module;
Described service lock request is used for asking to obtain described service lock, and described high-rise control module utilizes described service lock to call specified services to described low layer control module, and locking calling described specified services;
The request of described operation lock is used for asking to obtain described operation lock, and described high-rise control module utilizes described operation lock to carry out described specified services, and locks the execution of described specified services.
13. general controls kernel systems as claimed in claim 12, wherein, described low layer control module when receiving from the server lock request of described high-rise control module or service lock request,
If when current not active described server lock or service lock or operation lock, described low layer control module is authorized described high-rise control module server lock;
If current not active described server lock or service lock or operation lock, or the service that current service lock is carried out with the service lock of described service lock request is identical, and described low layer control module is authorized described high-rise control module service lock.
14. general controls kernel systems as claimed in claim 12, wherein, the service of described high-rise control module request is current not to be carried out, and while meeting following any condition, described low layer control module is authorized described high-rise control module operation lock,
1) there is no active server lock, service lock or operation lock;
2) only there is the active service lock of a service for current request;
3) the server lock that only has a described high-rise control module to have.
15. general controls kernel systems as claimed in claim 12, wherein, described low layer control module is placed on according to the sequencing arriving the request of server lock, service lock request or the request of operation lock that are not awarded server lock, service lock or operation lock in lock request waiting list.
16. general controls kernel systems as claimed in claim 15, wherein, described low layer control module discharges after described operation lock at described high-rise control module, checks described lock request waiting list,
If current high-rise control module keeps server lock, described low layer control module is carried out the service corresponding to next one operation lock request of current high-rise control module;
If current, keeping service lock, described low layer control module is carried out the service corresponding to next one operation lock request of service corresponding to described service lock;
If current, there is no active server lock, service lock or operation lock, and next request is the request of server lock, to this server lock request grant service device lock, and the operation lock of carrying out the high-rise control module that has this server lock is asked corresponding service;
If current, there is no active server lock, service lock or operation lock, and next request as service lock request, to this service lock request grant service lock, and carry out all high-rise control modules for service corresponding to this operation lock request;
If current, there is no active server lock, service lock or operation lock, and next request is the request of operation lock, described low layer control module is carried out service corresponding to described operation lock request.
17. general controls kernel systems as claimed in claim 1, wherein, described alarm module sends block type warning and unblock formula is reported to the police,
Described alarm module, after the described block type of dishing out is reported to the police, will block and send object place thread until remove described block type warning;
Described alarm module, after the described unblock formula of dishing out is reported to the police, sends object place thread and continues operation.
18. general controls kernel systems as claimed in claim 1, wherein, the log recording form that described data logging unit adopts comprises:
Time-based log recording, described time-based log recording triggers by one or more condition triggers;
Cycle log recording, described cycle log recording triggers by a time interval trigger.
19. general controls kernel systems as claimed in claim 1, wherein, the modification of data item described in described system journal unit record is, the information that the information of interlocking, described warning are sent and the information of removing described warning.
CN201110120570.0A 2011-05-10 2011-05-10 General control kernel system used for integrated circuit manufacturing equipment Expired - Fee Related CN102169436B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201110120570.0A CN102169436B (en) 2011-05-10 2011-05-10 General control kernel system used for integrated circuit manufacturing equipment
PCT/CN2011/081932 WO2012151885A1 (en) 2011-05-10 2011-11-08 Universal control kernel system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110120570.0A CN102169436B (en) 2011-05-10 2011-05-10 General control kernel system used for integrated circuit manufacturing equipment

Publications (2)

Publication Number Publication Date
CN102169436A CN102169436A (en) 2011-08-31
CN102169436B true CN102169436B (en) 2014-04-09

Family

ID=44490603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110120570.0A Expired - Fee Related CN102169436B (en) 2011-05-10 2011-05-10 General control kernel system used for integrated circuit manufacturing equipment

Country Status (2)

Country Link
CN (1) CN102169436B (en)
WO (1) WO2012151885A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169436B (en) * 2011-05-10 2014-04-09 清华大学 General control kernel system used for integrated circuit manufacturing equipment
CN103632331B (en) * 2013-11-26 2016-06-29 福建四创软件有限公司 A kind of data service method of configurable plug-in type
CN104948465A (en) * 2014-03-26 2015-09-30 北京北方微电子基地设备工艺研究中心有限责任公司 Dry pump sharing treatment method and system
CN106919341B (en) * 2015-12-28 2020-04-21 成都华为技术有限公司 Method and device for issuing I/O (input/output)
CN114485874A (en) * 2021-12-22 2022-05-13 航天信息股份有限公司 An automatic weighing method based on license plate recognition of grain depots

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588323A (en) * 2004-09-23 2005-03-02 上海交通大学 Parallel program visuable debugging method
CN101299758A (en) * 2008-05-21 2008-11-05 网御神州科技(北京)有限公司 Well-regulated group system for cosmically processing event as well as processing method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002035312A2 (en) * 2000-10-16 2002-05-02 Goahead Software Inc. Techniques for maintaining high availability of networked systems
CN101311902A (en) * 2007-05-22 2008-11-26 上海宇梦通信科技有限公司 State machine system associating with multi-instance and its realization method
CN101437071B (en) * 2007-11-15 2011-09-28 华为技术有限公司 Method and equipment for management object instantiation of terminal equipment management tree
CN101776996A (en) * 2010-01-26 2010-07-14 上海市共进通信技术有限公司 Construction implementation method of object-based configuration management system in communication system
CN102169436B (en) * 2011-05-10 2014-04-09 清华大学 General control kernel system used for integrated circuit manufacturing equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588323A (en) * 2004-09-23 2005-03-02 上海交通大学 Parallel program visuable debugging method
CN101299758A (en) * 2008-05-21 2008-11-05 网御神州科技(北京)有限公司 Well-regulated group system for cosmically processing event as well as processing method

Also Published As

Publication number Publication date
WO2012151885A1 (en) 2012-11-15
CN102169436A (en) 2011-08-31

Similar Documents

Publication Publication Date Title
US8095823B2 (en) Server computer component
US8788569B2 (en) Server computer system running versions of an application simultaneously
US8984534B2 (en) Interfacing between a receiving component of a server application and a remote application
US6850978B2 (en) Method and system for property notification
US7827438B2 (en) Distributed testing system and techniques
US7627853B2 (en) Generic connector between a middleware layer and a server software object
US20060037000A1 (en) Configuration management data model using blueprints
EP2002335A1 (en) Interactive development tool and debugger for web services
CN102169436B (en) General control kernel system used for integrated circuit manufacturing equipment
US7100167B2 (en) Method and apparatus for creating templates
US20040153832A1 (en) Method and system for tracking software components
Dai et al. Understanding real-world timeout problems in cloud server systems
CN101727629A (en) Self-organization distribution business system
US7680935B2 (en) Entity domains
WO1998019239A1 (en) Distributed virtual software interface or machine
JP2000194631A (en) Communication agent between the information processing system manager and at least one resource
CA2543938C (en) Programming and development infrastructure for an autonomic element
Keller et al. Towards a CIM schema for runtime application management
Salles et al. Can we rely on COTS microkernels for building fault-tolerant systems?
Fossa Interactive configuration management for distributed systems
Milano Programming Safely with Weak (And Strong) Consistency
Chen A pilot study of cross-system failures
Howard Management Support for Dynamic Policy Change in a Distributed Object Computing Environment
Ward et al. Spring Batch-Reference Documentation
Das et al. Oracle Universal Connection Pool for JDBC Developer's Guide, 11g Release 2 (11.2) E12265-02

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140409