WO2012151885A1 - 一种通用控制内核系统 - Google Patents

一种通用控制内核系统 Download PDF

Info

Publication number
WO2012151885A1
WO2012151885A1 PCT/CN2011/081932 CN2011081932W WO2012151885A1 WO 2012151885 A1 WO2012151885 A1 WO 2012151885A1 CN 2011081932 W CN2011081932 W CN 2011081932W WO 2012151885 A1 WO2012151885 A1 WO 2012151885A1
Authority
WO
WIPO (PCT)
Prior art keywords
control unit
lock
service
kernel system
level control
Prior art date
Application number
PCT/CN2011/081932
Other languages
English (en)
French (fr)
Inventor
徐华
Original Assignee
清华大学
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 清华大学 filed Critical 清华大学
Publication of WO2012151885A1 publication Critical patent/WO2012151885A1/zh

Links

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

Definitions

  • the present invention relates to the field of computer application technology and integrated circuit equipment technology, and in particular to a universal control kernel system. Background technique
  • the core system plays a pivotal role in developing real-time device control applications.
  • the core system of the existing integrated circuit has poor versatility, which makes the developer's development device control application less efficient, and the developed application has poor performance. Summary of the invention
  • An object of the present invention is to at least solve one of the above technical drawbacks, and in particular to provide a highly efficient, versatile and flexible configuration of a general control core system for an integrated circuit manufacturing apparatus.
  • an embodiment of the present invention provides a universal control kernel system, where the universal control kernel system is used to control actions of a hardware device, including: a configuration module, where the configuration module is used when the kernel system is started. Instantiating an object and registering the instantiated object to an initial namespace to create a tree structure of the initial namespace, initializing the instantiated object in the initial namespace tree structure, wherein The instantiated object maps the action of the hardware device; the control module is configured to control the high-level control unit to invoke and execute the service of the low-level control unit according to the initial namespace tree structure created by the configuration module, Wherein the control unit comprises a physical layer control unit, a function layer control unit and an operation layer control unit with a low to high level, and the control unit further comprises a maintenance layer control unit of the same level as the operation layer; a monitoring module, The monitoring module is configured to monitor a status of the universal control kernel system
  • the configuration module includes: a configuration file parsing unit, the configuration file parsing unit analyzes the configuration file, and instantiates the object according to the information of the configuration file; the registration unit, the registration The unit is configured to register the instantiated object to an initial namespace to create a tree structure of an initial namespace, the tree structure of the initial namespace being a collection of names of the instantiated objects;
  • the initialization unit traverses the tree structure of the initial namespace according to the priority search algorithm, and initializes the registered instantiated object according to the information of the configuration file.
  • the registration unit is further configured to create an alias of the instantiated object, where each instantiated object corresponds to one or more aliases.
  • the instantiated object is accessed in one of two ways:
  • the physical layer control unit reads a data item in the hardware device and provides a service to the hardware device; the function layer control unit calls the physical layer control unit by calling Serving a service to the operation layer control unit; the operation layer control unit provides a service of the operation layer by calling a service of the function layer control unit; the maintenance layer control unit calls a service of the function layer control unit and utilizes
  • the function layer control unit invokes the service of the physical layer control unit to achieve fault location of the physical layer control unit and the functional layer control unit.
  • the physical layer control unit further includes an EPICS protocol communication component that communicates with the hardware device to exchange data items using an EPICS protocol, including reading the hardware device. a status value in , and send a set point to the hardware device.
  • an EPICS protocol communication component that communicates with the hardware device to exchange data items using an EPICS protocol, including reading the hardware device. a status value in , and send a set point to the hardware device.
  • the data items are classified into a discrete type, a continuous type, and a string type according to a type of bearer data; the data items are classified into a read-only type and a read/type according to a read/write operation type.
  • Write type In an embodiment of the present invention, the data items are classified into a discrete type, a continuous type, and a string type according to a type of bearer data; the data items are classified into a read-only type and a read/type according to a read/write operation type.
  • Write type is
  • the state value and the set point are checked by an interlock, and the state value of the hardware device that controls the read or the setting of writing to the hardware device is allowed to be modified only when the set condition is satisfied. point.
  • setting a point interlock includes: reading and writing a data item, the read/write data item being a data item read from the hardware device or a data item written from the hardware device;
  • the check character is used to determine whether to allow modification of the read/write data item; an alarm, the alarm is used to throw a blocking alarm when the modification of the read/write data item is rejected.
  • the alert provides three recovery actions: abandon, retry, and continue execution.
  • the set point interlock further includes a trigger and a qualifier, wherein the trigger is configured to set a condition for modifying the read and write data item, and the qualifier is used to determine whether the verification is needed The condition of the checksum.
  • the monitoring module monitors a security state of the universal control kernel system by using a value interlock, and corrects when the unsafe condition of the kernel system is triggered, where the values are mutually
  • the lock includes: a trigger, the trigger is configured to set an unsafe condition of the kernel system; a behavior list, the behavior list includes an action performed after the unsafe condition is triggered, where the behavior list includes multiple actions The plurality of actions are performed one by one.
  • the value interlocking further comprises: an alarm, the alarm being used to provide a non-blocking alarm.
  • the high-level control unit invokes and executes the service of the low-level control unit, including the following steps: the high-level control unit sends a server lock to the low-level control unit. Requesting or servicing a lock request to obtain a server lock or a service lock, initializing a parameter of the requested server lock or service lock, and transmitting a run lock request to the lower-level control unit to obtain a run lock; After obtaining the running lock, calling and executing a service of a low-level control unit corresponding to the running lock, and releasing the running lock after the service is completed; the high-level control unit releasing the server lock or a service lock, wherein the server lock request is used to request to obtain the server lock, and the high-level control unit uses the server lock to invoke a service to the low-level control unit, and locks the low-level control
  • the service lock request is used to request to obtain the service lock, and the high-level control unit uses the service lock to invoke a specified service to the low-level control unit, and
  • the low-level control unit receives a server lock request or a service lock request from the high-level control unit, if there is currently no active server lock or service lock or When the lock is operated, the low-level control unit provides a server lock to the high-level control unit; if there is no active server lock or service lock or running lock, or the current service lock and the service lock request The service lock performs the same service, and the low-level control unit provides a service lock to the high-level control unit.
  • the low-level control unit when the service requested by the high-level control unit is not currently executed, and the following conditions are met, the low-level control unit provides a running lock to the high-level control unit. 1) no active server lock, service lock or run lock; 2) only one active service lock for the currently requested service; 3) only one server lock with the high level of control unit.
  • the low-level control unit places a server lock, a service lock, or a server lock request, a service lock request, or a run lock request that are not provided in the order of arrival in a lock request. Waiting in the queue.
  • the low-level control unit checks the lock request waiting queue after the high-level control unit releases the running lock, and if the high-level control unit maintains the server lock, The low-level control unit performs a service corresponding to the next operational lock request of the high-level control unit; if the low-level control unit maintains the service lock, the low-level control unit performs the next operational lock request Service; if there is currently no active server lock, service lock, or run lock, and the next request is a server lock request, provide a server lock on the server lock request and execute the operation of the high-level control unit that owns the server lock
  • an alarm module is further included for use in the universal control kernel system When an abnormality occurs, an alarm is issued.
  • the alarm module issues a blocking alarm or a non-blocking alarm, and the alarm module will block the thread of the object that causes the abnormality of the general control kernel system after the blocking alarm is thrown. Until the reason for triggering the blocking alarm is cleared; after the non-blocking alarm is thrown, the alarm module causes the thread of the object of the abnormality of the general control kernel system to continue running.
  • the method further includes a log module, configured to record information in the running process of the kernel system in a log form, where the log module includes: a data log unit, where the data log unit is used Recording data and events of the kernel system in a first predetermined period; and a system log unit for recording call information and tracking information of the kernel system in a second predetermined period.
  • a log module configured to record information in the running process of the kernel system in a log form
  • the log module includes: a data log unit, where the data log unit is used Recording data and events of the kernel system in a first predetermined period; and a system log unit for recording call information and tracking information of the kernel system in a second predetermined period.
  • the log record form used by the data log unit includes: event-based log record, the event-based log record is triggered by one or more condition triggers; based on periodic log records, The periodic log record is triggered by a time interval based trigger.
  • the system log unit records the modification of the data item, the information of the interlock, the information sent by the alarm, and the information for clearing the alarm.
  • the universal control kernel system for integrated circuit manufacturing equipment provided by the embodiment of the present invention is based on the Windows XP operating system and is implemented by JAVA, and has the following advantages:
  • the Interworking API Application Programming Interface
  • the Recipe API is capable of storing and retrieving process parameters.
  • the Data Log API provides quick access to process parameter information at runtime.
  • the general control kernel system configuration strategy of the embodiments of the present invention can facilitate code reuse within the same application and between different applications.
  • the generic control kernel system configuration file allows software developers to configure the properties of the component, although the above properties will vary from application to application, but do not need to be recompiled.
  • the universal control kernel system of the embodiment of the present invention provides two powerful functions of application debugging and performance tracking, including a system log service and a console interface, wherein the system log service includes generating a system operation record, and the console interface includes View and modify the general control kernel system environment state when the application is running.
  • the universal control kernel system of the embodiments of the present invention enables developers to quickly develop robust control applications, implement component development and software reuse through flexible configuration strategies, and provide the necessary tools to support rapid development and debugging of applications.
  • FIG. 1 is a schematic structural diagram of a general control kernel system according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of a configuration module
  • Figure 3 is a schematic diagram of a namespace
  • Figure 4 is a namespace UML class diagram
  • Figure 5 is a schematic structural view of a control module
  • Figure 6 is a schematic diagram of a data item (Dataltem).
  • Figure 7 is a schematic diagram of a call service of a control module
  • Figure 8 is a schematic diagram of a control module call chain
  • Figure 9 is a schematic diagram of an alarm process of the alarm module
  • Figure 10 is a schematic structural diagram of a log module. detailed description
  • the universal control kernel system 1000 provided by the embodiment of the present invention includes a configuration module 100, a control module 200, and a monitoring module 300.
  • the configuration module 100 is configured to: when the universal control kernel system 1000 is started, instantiate an object and register the instantiated object into an initial namespace, and create a tree structure of the initial namespace, and the initial namespace The instantiated object in the tree structure is initialized, wherein the instantiated object maps the action of the hardware device; the control module 200 is configured to control the high-level control unit according to the initial namespace tree structure created by the configuration module.
  • Module 300 is used to monitor the status of the universal control kernel system 1000.
  • the configuration module 100 includes a profile parsing unit 110, a registration unit 120, and an initialization unit 130.
  • the configuration file parsing unit 110 is configured to analyze the configuration file, and instantiate the object according to the information of the configuration file;
  • the registration unit 120 is configured to register the instantiated object to the initial namespace, and create a tree of the initial namespace. a structure, where the tree structure of the initial namespace is a set of the object names after the instantiation;
  • the initializing unit 130 is configured to traverse the initial namespace tree structure according to the prioritized search algorithm, and according to the information of the configuration file, the registered instance
  • the initialized object is initialized.
  • the configuration process of configuration module 100 occurs during the startup of the application and is responsible for instantiating and initializing objects.
  • the structure of the namespace is determined by the configuration file information and the code in the configurable (implementing the Configurable interface) object build() method.
  • the namespace structure does not necessarily reflect the functional relationship between objects, or the relationship between the physical layer, the functional layer, and the operational layer, and does not necessarily reflect the ownership relationship between the two objects.
  • Configurable interface with the following interface information:
  • 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. The typical operation is to create a link relationship between objects and change the state of the object.
  • the verifylnit() interface method is used to verify Attributes to ensure that everything is set up correctly, so that the object can safely execute the job and avoid runtime errors; the startRunTimeO method is used to start the runtime, including setting the object to the runtime state, for example allowing some threads to start running, or connecting to the outside device.
  • the configuration process of the configuration module 100 includes the following five phases:
  • the first stage the configuration file parsing unit 1 10 analyzes the configuration file, the registration unit 120 instantiates the object according to the configuration file information, and registers the object into the namespace to create an initial namespace tree structure;
  • 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, and initializes the registration object according to the configuration file initialization information parsed in the first stage,
  • the build() method of the configurable object associated with the registration node is created to complete the entire namespace tree structure
  • the third stage the initialization unit 130 traverses the namespace tree structure according to the depth-first search algorithm, and calls the ink ( ) method of the registered object in the name space tree to complete the initialization of the object;
  • the fourth stage the initialization unit 130 traverses the namespace tree structure according to the depth-first search algorithm, and calls the verifylnit( ) method of the registered object in the name space tree to complete the initialization verification of the object;
  • the fifth stage the initialization unit 130 traverses the namespace tree structure according to the depth-first search algorithm, and calls the startRunTime ( ) method of the registered object in the name space tree to execute the preparation work before the object is run or the set object is the running state.
  • the first stage of the configuration process is completed by the configuration file parsing unit 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.
  • the configuration process of the configuration module 100 includes initializing the registration object of the initial namespace tree structure generated by Parse parsing, and sequentially calling the build(), init(), verifylnit(), and startRunTime() of the Configurable interface.
  • the universal control kernel system configuration feature facilitates the development of component-based applications.
  • ReferenceBroker is a single object that is responsible for registering objects into namespaces and maintaining a mapping between object references and names. ReferenceBroker mainly provides three functions:
  • Registration object Establish a mapping relationship between objects and names
  • a namespace is a tree structure made up of nodes, and most of the nodes in the tree are associated with objects.
  • a namespace is a registry of objects in which individual objects are linked by their names, providing a common address space.
  • the object is accessed in one of two ways:
  • Fully qualified name From the root node of the namespace tree to the current object. Each fully qualified name in the namespace is unique. As shown in Figure 3, the fully qualified name of objectG is "/objectA/objectF/objectG" .
  • Relative Name There is always a starting point, which is called a reference object.
  • the reference object is that when registering an object with a relative name or referencing an object, you must explicitly provide a starting point, which is a reference object. From the reference object to the current object. For example, if objectP is a reference object, the relative name of objectG is " ../../objectA/objectF/objectG" .
  • the name of the named object referenced by the node is a partial name, such as the part of objectG named "objectG”. Partial names are not unique.
  • the alias is an alias for the instantiated object, and the alias can be created by the registration unit 120, providing another path to access one of the original objects (and other objects) in the namespace.
  • Each instantiated object can correspond to one or more aliases.
  • an "alias node" is inserted in the namespace.
  • aliasOfObjectF is an alias node that points to the objectF node, so that 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” .
  • a namespace is a tree-like data structure that includes three types of nodes: General node: The general node and the object are not associated;
  • Registration node The registration node and the object establish an association relationship
  • Alias node The alias node points to other nodes in the tree, which is convenient for access by alias.
  • NamedObject is an important class in the general control kernel system library. Most of the system libraries are derived from NamedObject. NamedObject inherits from the OssObject class and implements the Configurable and MsgLogger interfaces. NamedObject is a named object. An important feature of it is that it can be registered in the namespace, and can be referenced by name after the namespace is created, and its derived class easily inherits the system logging function.
  • Namespaces The implementation of a 4-pair structure consists of three types of nodes: UnNamedNode, AliasNode, and ReferenceNode.
  • UnNamedNode can be registered under the ReferenceNode node of the associated (reference) named object NamedObject and associated with a configurable Configurable object.
  • NamedObject can implement Configurable interface.
  • Both the AliasNode node and the ReferenceNode node are NamespaceNode nodes.
  • AliasNode is an alias node and has no child nodes.
  • AliasNode points to a ReferenNode node in the namespace.
  • the ReferenceNode node is the primary node in the namespace, which can be associated with a named object.
  • ReferenceBroker is responsible for managing and maintaining the entire namespace tree structure and returning the objects associated with the corresponding nodes by name at runtime.
  • the control module 200 and the monitoring module 300 are the main functional modules of the universal kernel system 1000, and inherit from the public classes ControlObject and ControlMonitor. These classes have built-in features that make control logic easier to implement and maintain.
  • a typical application of ControlObject is to represent a well-defined area of device control.
  • Each ControlObject provides an associated set of services to complete the control of the corresponding domain. For example, a control object that represents a wide door may have two services open and closed, which is also the two operations that the actual wide door device has.
  • ControlObject has built-in features to solve difficult control problems such as error recovery and multithreading.
  • control module and the monitoring module are respectively described below in conjunction with specific embodiments.
  • the control module 200 uses hierarchical organization, which is a physical layer, a functional layer, an operation layer/maintenance layer from low to high. Accordingly, 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 of the same level as the operation layer control unit 230. Unit 240.
  • the physical layer control unit 210 is configured to read data items of the underlying device in the hardware device 2000 and provide services to the underlying device; the function layer control unit 220 calls the service of the physical layer control unit 210 to the operation layer control unit 230.
  • the operation layer control unit 230 provides a 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 of the physical layer control unit 210 and the function layer control unit 220, wherein The maintenance layer control unit 240 can call the function layer control unit 220 to implement the call of the service of the physical layer control unit 210 by calling the function layer control unit 220, thereby implementing fault location of the physical layer control unit 210 and the function layer control unit 220. .
  • a high-level control unit can call a method and service of a control unit of the same level or a lower level, thereby establishing a call of the control module 200 Chain.
  • the physical layer control unit 210 is located at the lowest level, 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 component 211 for communicating with the hardware device 2000 to exchange data items (Dataltem) using the EPICS protocol, including reading status values of the underlying devices in the hardware device 2000, and to the hardware device 2000. Send the associated setpoint.
  • a wide-gate control object class may refer to a read/write Dataltem that represents a solenoid that opens or closes a wide door, and a read-only Dataltem that represents a touch sensor that opens and closes the wide door. Since the operation of the above Dataltems cannot be simplified, the wide-door object belongs to the lowest layer.
  • the data item (Dataltem) provides between the kernel system 1000 and the external hardware device 2000 and the kernel system.
  • a mechanism for data exchange between modules within 1000 is achieved by providing an abstract interface to the I/O device driver.
  • Data exchange between modules within the kernel system 1000 is accomplished by storing internal data that needs to be globally visible throughout the kernel system 1000.
  • Dataltems for physical devices are associated with physical devices through EPICS I/O.
  • the data item can be classified into a discrete type (int), a continuous type (double), a string type (string), and a general type (any java object according to different types of bearer data). ).
  • the data items (Dataltem) can be divided into read-only types and read/write types.
  • the read-only Dataltem is associated with a data source. Only this data source can update its value. This data source can be an I/O object or a non-I/O object.
  • the read-only data item ( Dataltem ) is readable and can be applied.
  • Read and write Dataltem is associated with a target.
  • the settings for reading and writing Dataltem are passed to the corresponding physical device I/O point.
  • the read and write Dataltem can also be used for non-I/O purposes, representing only one readable and writable variable.
  • Read and write Dataltem is readable, writable, applyable, and veto.
  • Dataltem with a data source includes three important characteristics: access mode, polling, and validity.
  • Remote Reads a remote physical device through its data source and returns a value. Since remote access takes longer than local access, you need to wait while waiting for the device to return a value;
  • Not_init The data is not read, and the data source is online;
  • the data may not be fresh, but the data source is offline;
  • Datalinks related interfaces include: Subscriber interface, Vetoer interface TimeListener interface.
  • Subscriber interface void updateFromItem(DataItem, NewValue, Valid).
  • the Subscriber interface method is called to register Dataltem.subscribe(Subscriber) to Dataltem.
  • the interface method of updater is automatically called updateFromltem to perform the corresponding action.
  • Vetoer interface void checkVeto (Dataltem, ProposedValue).
  • the method of the Vetoer interface is to register Dataltem.subscribeVetoer (Vetoer) to Dataltem.
  • Vetoer Dataltem.subscribeVetoer
  • call Vetoer's interface method checkVeto to verify that the proposed value is received or rejected.
  • TimeListener interface updateFromTimer() method. The method of the TimeListener interface is called
  • the Timer. subscribeTimerListener (TimeListener) is registered to the Timer, and after the timing is reached, the TimeListener interface method subscribeTimerListener is called to perform the corresponding action.
  • the data item (Dataltem) includes mandatory attributes and optional attributes. Where the required attributes constitute the state of the object
  • Optional attributes data source , target, typelnfo , peer, simulator.
  • setpoint interlocking is implemented at kernel system 1000.
  • the setpoint interlock is based on Dataltem, applied to Dataltems, and the corresponding action is performed when the Dataltems value changes.
  • Setting point interlocks is preventative.
  • Setpoint interlocks only check the value of Dataltem, not the state of an object. Specifically, the data item of the hardware device 2000 read by the set point interlock control or the data item of the written hardware device 2000 is allowed to be modified only when the set condition is satisfied.
  • Setpoint interlocking includes reading and writing data items (Dataltem), setting one or more checksums, and setting an alarm.
  • setting the point interlock may further include setting a trigger and setting a qualifier. Among them, setting triggers and setting qualifiers are optional.
  • Set point interlocks can be expressed as follows:
  • Setpointlnterlock R-W DataItem+Trigger+Qualifier+ ⁇ Checkers ⁇ +Blocking Alarm.
  • Read and write Dataltem A read/write data item (Dataltem) is a data item read from the hardware device 2000 or a data item written from the hardware device 2000.
  • Setpoint interlocks are associated with a particular Dataltem that is specified in the trigger condition or specified directly in the setpoint interlock;
  • Trigger A trigger is used to set conditions for modifying read and write data items.
  • the trigger is the first condition of the check. This condition is a complex condition and is generally a condition involving a modification to the Dataltem proposal. If no read and write Dataltem is specified, the Dataltem associated with the set point interlock is the first read and write Dataltem from the left in the trigger complex condition. (post-root traversal)
  • Qualifier The qualifier is used to determine if the condition of the checksum is to be verified.
  • the condition for verifying the checksum is a complex condition. Only when this particular condition is met will the subsequent conditions be checked.
  • the qualifier works based on the current value of Dataltem, even if the qualifier contains the same Dataltem as in the trigger.
  • the trigger checks the proposed value of Dataltem (the current value has not changed), and the qualifier checks the current value of the same Dataltem.
  • the purpose of the qualifier is to simplify a complex trigger condition.
  • Checksum The checksum is used to determine whether changes to read and write data items are allowed. The checksum determines whether the proposed setting value is allowed or not.
  • the checksum interface currently has only one implementation requirement. Requirements are based on conditions and 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 do not meet the requirements, you can customize the special inspection requirements by implementing the checksum interface.
  • the checksum can also work based on the current value of Dataltem.
  • a setpoint interlock must include at least one checksum.
  • the alarm is used to throw a blocking alarm when the modification of the read/write data item is rejected. If the proposed setting value is rejected, a blocking alarm will be thrown.
  • a setpoint interlock must contain a blocking alarm. If the specified alarm is not displayed using the Set Alarm method, the Set Point Interlock will establish its own alarm. The alarm can provide three recovery actions (Abort), Retry, and Continue. If a null parameter is passed using the Set Alarm method, it means that no alarms will be associated with the setpoint interlock, so an exception will be thrown when the offer value is rejected.
  • a condition is an object that involves a comparison of Dataltems and constants.
  • the value of a condition can be divided into true, false, or unknown. Where unknown is the value when the condition is associated with one or more Dataltem offline.
  • Conditions can be simple or complex. Simple conditions are, for example, comparing two Dataltems, or comparing a Dataltem with a constant. The two compared elements must be type compatible and can be compared. Complex conditions are, for example, the association of two conditions by binary logical operators (AND, OR), so as to form a conditional tree, each node in the conditional tree can be judged.
  • Simple conditions are, for example, comparing two Dataltems, or comparing a Dataltem with a constant. The two compared elements must be type compatible and can be compared.
  • Complex conditions are, for example, the association of two conditions by binary logical operators (AND, OR), so as to form a conditional tree, each node in the conditional tree can be judged.
  • Each condition includes a left and/or right item, an operator, that is, each condition includes two or three elements.
  • Table 1 shows the structure of the conditions. Table 1
  • conditional operators include:
  • the conditions are mainly used in the following three cases:
  • an event an event is created by a condition, and a condition for creating an event is called an event source;
  • Events are created from conditions (event sources) that exist once they are created, but are inactive until the first condition in the condition tree fires true. The event occurs when the last (outermost) condition triggers true, that is, when the complete condition tree is evaluated. After the event occurs, notify itself as a parameter to its registrant.
  • Table 2 shows the condition and event correspondence table of the universal control kernel system 1000 of the embodiment of the present invention.
  • condition list provides information on the status of each condition at the time the event occurs.
  • a condition list is a vector that contains references to different conditions at the time the event occurred and its values.
  • condition tree Complex conditions joined by binary logical operators form a conditional tree.
  • the condition tree includes leaf nodes and branch nodes. Each node in the condition tree represents a condition that can be used for judgment.
  • a conditional tree consists of conditional nodes represented by various concrete subclasses derived from the underlying conditional abstraction class. Among them, the leaf node represents a simple condition, which can be a change condition (representing the Dataltem "CHANGES" condition) and a derived class of the abstract class leaf condition ( Equal, NotEqualCondition, Greater, GreaterEquaK Less, LessEqual ).
  • Branch nodes represent compound conditions, including Not, conditional change conditions, and derived classes of abstract class branch conditions joined by binary logical operators.
  • Not represents the compound condition of the unary logical operator NOT connection
  • condition change condition represents the condition "CHANGES" condition.
  • Derived classes for abstract class branching conditions joined by binary logical operators include And and Or.
  • Events are created from (event source) conditions, corresponding to a conditional tree, which also creates an event tree.
  • the corresponding event tree also has leaf nodes and branch nodes.
  • the event tree consists of event nodes represented by various concrete subclasses derived from the control event abstraction class.
  • the leaf node may be a change event (corresponding to a change condition) and a leaf event (corresponding to a leaf condition);
  • the branch node may be a condition change event (corresponding to a condition change condition), no event (corresponding to an unconditional condition) , a time event (representing a condition "FOR" period condition, corresponding to a time condition) and a logical event (corresponding to a branch condition).
  • condition containerCondition represents the corresponding condition tree
  • BaseCondition topOfConditionTree represents the node of the condition tree
  • EventSubscriber eventSubscriber represents the event requester registered with it.
  • each non-root node in the condition tree has one and only one parent node;
  • the root node registered object implements the EventSubscriber interface so that it can be notified when the entire condition value is triggered to true.
  • the dynamics of the event tree is implemented in the Subscriber mode:
  • the branch nodes in the event tree are registered with their child nodes by implementing the EventSubscriber interface (condition change event, no event, logical event) or TimerListener interface (time event).
  • EventSubscriber interface condition change event, no event, logical event
  • TimerListener interface time event
  • the point condition value changes it is notified and the corresponding action is executed.
  • the leaf nodes in the event tree are associated with Dataltem.
  • UntypedSubscriber interface change event
  • the DiscreteSubscriber, ContinuousSubscriber, and TextSubscriber leaf event
  • the event tree is a bottom-up notification mechanism: Dataltem leaf node The branch node (parent node) root node, thus completing the timely judgment of the condition value of the entire event tree.
  • the condition value of the outermost root node of the event tree is triggered to be true, the event occurs, and the corresponding action is performed by calling the updateFromEvent interface method of the EventSubscriber interface implemented by its registrant.
  • Event locks are used in the creation of event trees, the determination of event values, and the notification of registrants.
  • the entire event tree is recursively created from the root node. 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 controllable without There is an inconsistency.
  • the function layer control unit 220 is called by the operation layer control unit 230 by calling the service of the physical layer.
  • the functional layer control unit 220 provides a complete service.
  • a functional layer vacuum evaporation object may call a physical layer valve object and a physical layer pump object to provide an operation to evacuate the chamber.
  • the functional layer control unit 220 is typically an administrator.
  • a functional layer isolating a wide object can control multiple isolated actions in the physical layer.
  • the operation layer control unit 230 is located at the highest level.
  • an operator can use any client of the general control kernel system 1000.
  • the operator of a universal control kernel system 1000 can be an operator, can also be a cluster equipped with supervisory software (such as CTC), and can also be any software entity that interacts with the operational layers of the generic control kernel system application.
  • the operation layer control unit 230 can call the service of the function layer through the function layer control unit 220, and cannot directly call the service of the physical layer control unit 210 beyond the function layer control unit 220.
  • the maintenance layer control unit 240 is located at the highest level.
  • the maintenance layer interacts with the outside world through a user interface in addition to the operating layer.
  • the maintenance layer control unit 240 provides a view to the maintenance engineer (non-operator) for performing underlying fault location and repair.
  • the maintenance layer control unit 240 can directly call the physical layer control unit
  • a control unit Can be both a server and a client.
  • the operation layer control unit 230 is both a server and a client. Specifically, the operation layer control unit 230 can call the service of the control unit of a low level, and also call its service by an operator (for example, a CTC).
  • the functional layer control unit 220 is typically both a server and a client. The function layer control unit 220 can call the service of the low-level control unit, and is also called by the high-level control unit.
  • the physical layer control unit 210 is usually only a server, and a high-level control unit invokes its service, but the physical layer control unit 210 does not call the service itself, but simply calls the setValueO method associated with the Dataltems to set the I/O of the physical device. point.
  • client requests service from another control unit (server)
  • server the request will be queued until another control object is idle.
  • the client will block until the requested service starts executing, and the server will lock until the requested service completes execution.
  • a lock on a control object can include the following:
  • the server lock request is used to request to obtain a server lock
  • the high-level control unit uses the server lock to call the service to the low-level control unit, and locks the control unit with a low level.
  • the service lock request is for requesting to obtain a service lock
  • the high-level control unit uses the service lock to call the specified service to the lower-level control unit and locks the call to the specified service.
  • the run lock request is for requesting to obtain a run lock, and the high level control unit executes the specified service using the run lock and locks execution of the specified service.
  • the public inner class that is the control object needs to implement the abstraction methods defined in the control service: public void execute() throws BaseException to customize the specific service logic.
  • public void execute() throws BaseException to customize the specific service logic.
  • a service's execute() method cannot call other services of the same control object, so a deadlock will occur because a control object allows only one service to execute at a time.
  • the service of the high-level control unit calling and executing the low-level control unit includes the following steps:
  • Handling lock requests When a high-level control unit requests execution of a service, it usually first requests a server lock or service lock.
  • the control unit When the low-level control unit receives a server lock request or a service lock request from a high-level control unit, if there is no active server lock or service lock or operation lock, the control unit with a low level controls to a high level. The unit provides a server lock. If there is currently no active server lock or service lock or run lock, or if the current service lock is the same as the service lock requested by the service lock, the lower level control unit provides a service lock to the higher level control unit.
  • a low-level control unit places server lock requests, service lock requests, or run lock requests that are not provided with server locks, service locks, or run locks in the lock request wait 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 provided, while other lock requests will be queued for delivery. Use the unlock method to remove all locks. If a server or client aborts, all locks are automatically released. The request and provision of the lock requires the use of a certain data structure, and considers the consistency of the data structure, that is, the synchronization of accesses of the same data structure by multiple threads.
  • run lock request is not immediately provided, it is placed at the end of the lock request wait queue.
  • control units of high rank in the call chain are generally blocked because they wait for a lower-level control unit in the call chain to complete their service.
  • the call chain is only valid when one object remains locked to another. Once the service call is completed and all locks are released, the server is not in the call chain.
  • Alarm and abort During execution, the service may encounter a condition that causes it to throw an alarm. Alarm recovery may require service re-execution. This service is thrown in the form of a RetryException, which is intercepted by the control object system. The system then continues to call the execute() method of the control service to re-execute the code that caused the alarm to be thrown. The recovery option may also require the service to be suspended midway. This mechanism is related to retry. Similarly, an AbortException will be intercepted by the control object system and cause the object to abort the service.
  • a high-level control unit will release the server lock or service lock.
  • the call of the control object to other control objects in call mode or start mode forms a control service service call chain.
  • the control object CO_A calls the CO_B control service in call mode
  • the CO_B control service calls the CO_C and CO_D control services in the start mode
  • the CO_C control service calls the CO_F control service.
  • the control object CO_E also requests the control service of CO_B in the call mode (can be the same as or different from the request object CO_A). Since there is at most one active running lock provided, the control object can only execute one service request at a time. Thus CO_E's run lock request for CO_B is placed in the lockManager data member's lockRequestRequest queue of CO_B waiting to be provided.
  • the suspension process includes:
  • CO_D removes all lock requests it provides, completes the abort, and passes the abort request along the call chain to its client CO_B;
  • CO_B then passes the abort request down to a call chain branch to the server CO_C, and the CO_C server CO_F;
  • Control returns to CO_B , CO_B completes abort, and passes the abort request along its two call chain branches to its clients, namely CO_A and CO_E, and accordingly CO_A and CO_E also complete the abort;
  • the low-level control unit Whenever a service execution is completed, the low-level control unit releases the operation lock after the high-level control unit releases the low-level control unit (server) to check the lock request waiting queue to determine which service to execute next.
  • Checking the lock request wait queue includes traversing each lock request in the lock request wait queue.
  • 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 lowest level physical layer control unit 210 sets or reads the value of Dataltems to perform device I/O.
  • the control module 200 has the following important features:
  • control units 1) allowing the control units to execute services concurrently without interference, without having to establish a separate thread to execute, which is achieved by setting a lock on the control unit;
  • the control service is an important built-in feature of the control unit. It is suitable for the interaction between two control units (client request service and server execution service) and provides a built-in security layer, including:
  • Thread synchronization The service implements multithreading, but does not use the Java thread synchronization mechanism.
  • the synchronization mechanism applies the idea of "critical section", in which the "critical section” can only be executed by one thread at a time in the critical section, the same concept of service application and synchronization mechanism.
  • Exception handling The service automatically handles exceptions such as abort and retry.
  • the Control Module (ControlMonitor) 300 is used to monitor the conditions of the kernel system 1000 and perform the corresponding actions independently 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 a task of maintaining a chamber pressure when a particular process is executed. This control object only runs when this particular process is executed.
  • One use of ControlMonitor is as a background emulator that monitors continuous data items to a certain value within a specific range and then lets the sensor data items simulate the desired response.
  • the monitoring module 300 includes a run flag that is automatically created when the monitoring module 300 object is instantiated.
  • the run flag is a Dataltem, which is used to indicate the status of the monitoring module 300, that is, whether it is currently running.
  • a monitoring module 300 is started by calling the startRunningO method.
  • the kernel system 1000 sets the run flag to On and calls the executeO method.
  • the monitoring function must be performed by overloading the execute() method.
  • executeO includes a waitFor() method to wait for a specific condition to occur. When a condition occurs, executeO performs the specified action and then generally returns to the waitFor() method, forming a loop. Therefore, the running monitoring module 300 can execute waitFor() or a specific action.
  • a monitoring module 300 is stopped by calling the stopRunningO method, and the kernel system 1000 sets the running flag to off. If the monitoring module 300 is waiting, the waitFor() method exits and starts executing execute(). Monitoring mode Block 300 is performing an action and the action will continue. Setting the running flag to off does not automatically stop the monitoring module 300, and the judgment of the running flag is added to the loop condition.
  • the monitoring module 300 can be a client of a control unit in the control module 200, indicating that its execute() method can invoke the service of a control unit. However, the monitoring module 300 does not provide services itself and does not become a server. Therefore, the monitoring module 300 is always at the top of the call chain.
  • Monitoring module 300 can be aborted by calling the startAbortO or haltMonitor() methods. When the monitoring module 300 is requested to abort, it ensures that all control objects in the calling chain under which the service is being executed are aborted, and then control passes to the application-defined abort code. Monitoring module 300 then stops executing unless it is customized to continue execution after an abort. The haltMonitor() aborts the monitoring module 300 execution, blocking the caller until the successful completion of the abort.
  • the monitoring module 300 is more flexible than Interlock, Interlock can only set one Dataltem, and the monitoring module 300 can implement multiple actions by overloading the execute() method.
  • control unit's services are available remotely when the following conditions are met:
  • the remote interface of the Universal Control Kernel System 1000 allows the Control Object Service to be called remotely by a separate 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 Universal Control Core System 1000 or on different computers in the same network. At this point, the predetermined rules need to be followed to make the service of a control object remotely accessible.
  • the monitoring module 300 can monitor the security status of the kernel system 1000 by value interlocking and correct it when the unsafe condition of the kernel system 1000 is triggered. Interval interlocking is corrective.
  • the value interlock checks whether Dataltem reaches a specific value and automatically performs a series of related operations. For example, an value interlock can be used to detect an unsafe condition in a device and perform a series of actions to restore the device to a safe state when an unsafe condition occurs.
  • the value interlock includes setting the trigger and setting the behavior list.
  • the value interlock can also include setting a non-blocking alarm. Among them, non-blocking alarm is optional.
  • Trigger The trigger sets the unsafe condition of kernel system 1000 to describe the unsafe state. When the trigger condition of the value interlock is trapped, it indicates that the kernel system 1000 is in an unsafe state.
  • the trigger condition can be a simple condition or a complex condition.
  • Behavior List is an action after triggering an unsafe condition, wherein when the behavior list includes multiple actions, multiple actions may be performed one by one.
  • the behavior list is an object with an execute method.
  • the current behavior interface has three implementation classes, Assignmen Addition and Ensure, which modify a read-write Dataltem. If the above three behavioral implementation classes fail to meet the requirements, you can customize the behavioral requirements by implementing behavioral interfaces.
  • the Dataltem modified in the behavior can be a Dataltem in the trigger condition or a completely different Dataltem. If the value interlock has multiple behaviors, all behaviors will be performed one after the other.
  • the alarm is a non-blocking alarm. If the non-blocking alarm is present, it is thrown in the Ensure action.
  • the universal control kernel system 1000 further includes an alarm module 400 for issuing an alarm when an abnormality occurs in the kernel system 1000.
  • the alarm module 400 can notify the operator or other entity (such as a remote host) of an abnormality while providing an alternative recovery action for clearing the alarm.
  • the types of alarms issued by the alarm module 400 include blocked alarms or non-blocking alarms. Among them, the alarm module 400 will block the thread of the sending object that causes the abnormality of the general control kernel system after the blocking alarm is thrown until the cause of the blocking alarm is cleared. Clear the blocking alarm as part of the alarm recovery action. After the non-blocking alarm is thrown, the alarm module 400 causes the thread of the object that the general control kernel system to be abnormal does not have to block but continues to run. Non-blocking alarms are used to alert the operator to a possible error or to alert the operator that an action is being performed.
  • the alarm module 400 includes the following attributes: an integer alarm flag, a message, a description, a severity level, and an optional autorecovery option. And one or more recovery options ( recovery ).
  • the message is a brief description of the alarm module 400, and a detailed description of the alarm module 400 during the description.
  • Each auto-recovery option or recovery option includes four attributes: a recovery message, an access group, a recovery type, and an optional gray-recovery action (recovery) Action ).
  • Alarm ID Indicates the alarm ID, which maps the alarm to a digital ID, possibly required by the remote interface.
  • Message Used for logging or display to the operator. There are two types: static and dynamic. 1) Static: The alarm message will not change;
  • the alarm message contains information that depends on the runtime environment and is implemented by inserting a marker (Marker: " ⁇ MarkerName>”) in the alarm message string.
  • a marker Marker: " ⁇ MarkerName>”
  • the " ⁇ MarkerName>” in the alarm message will be replaced with the current tag value.
  • mapping There are two ways to implement mapping: ⁇ MarkerName, ObjectName, MarkerValue>.
  • Severity level Each alarm is assigned an integer severity level, which can be used to alert the alarm client to the alarm, or to display different colors in different colors on the GUI (Graphical User Interface) alarm page.
  • Critical level alarm Each alarm is assigned an integer severity level, which can be used to alert the alarm client to the alarm, or to display different colors in different colors on the GUI (Graphical User Interface) alarm page.
  • Autorecovery is an optional attribute for automatic recovery. If the auto-return attribute is not empty, the recovery action will be automatically performed to clear the alarm when the alarm module 400 throws an alarm. When an alarm is cleared, the operator selected action will no longer be performed.
  • Automatic recovery The check option has the following two advantages: First, no user intervention is required after the alarm is thrown: for example, if the alarm has only one system recovery option, or only one user-defined recovery option; second, when further actions are performed, the system needs to be placed in one Security Status: Usually the automatic recovery option is when the user-defined recovery option is available.
  • Recovery The group alarm recovery option, which is a list of one or more recovery objects.
  • a recovery object contains four properties: recovery message, access group, recovery type, and recovery action.
  • Recovery message A recovery option message that is displayed to the operator;
  • Access group may be used on the CTC side: Different operators are assigned different access groups and can only operate alarm recovery options with this access group attribute;
  • the type of alarm recovery includes system type and user-defined type.
  • the system types include abandon ABORT, retry RETRY, continue CONTINUE, and clear CLEAR.
  • the user-defined type is SER_ONLY.
  • the recovery function of the system built-in function to perform the corresponding recovery type is included;
  • Recovery action Accepts an object that implements the interface Recovery Action interface as a recovery action.
  • recovery actions are optional.
  • the combination of recovery actions and system recovery types allows kernel system 1000 to be in a safe state before performing kernel system 1000 built-in recovery actions.
  • the alarm module 400 has the following advantages:
  • the alarm module 400 is used to notify the operator and let the operator decide what to do;
  • the alarm module 400 includes a transmitting unit that transmits an alarm using a transmitting unit when a specific situation occurs.
  • the alarm module 400 further includes a monitoring unit that notifies the monitoring unit when the state of the alarm or the state of one of its recovery actions changes. For example: When the alarm module 400 sends or clears an alarm and starts or ends a recovery action, it notifies the monitoring unit.
  • the sending object When the alarm module 400 sends an alarm, the sending object will be blocked (if this alarm is a blocking alarm), and the system calls the update AlarmS tate() callback function of the client registered to this alarm.
  • a typical customer of the alarm module 400 is the monitoring module 300.
  • the alarm module 400 sends a certain number of alarms or sends some type of alarm, the monitoring module 300 will perform a specific action.
  • the executor of the alarm recovery action that is, the alarm module can be either a remote client or a local client.
  • the universal control kernel system 1000 provided by the embodiment of the present invention further includes a log module for recording information in the running process of the universal control kernel system 1000 in the form of a log.
  • the log module defines the log file package Contains information used to filter system log information.
  • the log module can be modified at runtime to change the amount and level of log information to be logged.
  • the log module 500 includes a data log unit 510 and a system log unit 520.
  • the data log unit 510 is configured to record data and events of the kernel system 1000 in a first predetermined period.
  • Data Logging is a mechanism for the Universal Control Kernel System 1000 that allows data and events to be logged and documented into files, 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 an event occurs. The recorded data includes time and/or events that occurred, as well as the value of a particular data item at this time. Some data log sessions can be executed concurrently, collecting different data according to different specifications.
  • Data Log Unit 510 collects data and writes it to a log file. Information such as the collected data content and the time of collection is contained in a single session. Each session includes a collection description, where the collection description includes a data description and the data description includes a reference to Dataltems. You can open multiple sessions at the same time for logging.
  • DataSpec A list of Dataltems, representing the data recorded together, specifying what to log.
  • a DataSpec can specify the values of the following Dataltems: pressure, wafer sensor, temperature, open sensor, and wide door 1.
  • CollectionSpec DataSpecs' ⁇ ' J table, which means that the list of DataSpecs is logged to the file based on the same trigger, specifying when to log. These definitions trigger the data record triggers to be time intervals (recording data at a specific time, called time triggering) and conditions (recording data when conditions are met, called event triggering). For example, a CollectionSpec specifies that the Dataltems specified in DataSpecA are logged at 10s intervals.
  • Session A set of CollectionSpec, which means that a set of CollectionSpecs are simultaneously recorded and recorded to the same destination, for example, a file).
  • multiple Sessions can be opened at the same time, and the data is recorded to a different file.
  • Session allows the application to log data for different purposes. For example, a session is used for application development for debugging purposes. Another session is used to log data during the application deployment process to track the data. These two sessions can use partially identical CollectionSpecs, while other CollectionSpecs are unique to different purposes.
  • the application can create a session to collect plot data, another session to collect archive data, and a third session to collect debug data.
  • DataLogDestination Indicates destination information, which is managed by the StorageManager.
  • StorageManager Indicates destination information, which is managed by the StorageManager.
  • DataLogDestination and StorageManager classes are the DataLogFile and TextS torageManager classes.
  • DataLogFile A subclass of the abstract class DataLogDestination.
  • a DataLogFile object receives the data and writes the data to a permanent text file.
  • TextStorageManager A subclass of the abstract class StorageManager.
  • the abstract class StorageManager is used for text-based storage management and defines the directory structure for all log files.
  • the data log unit 510 In order to record the data log, the data log unit 510 must define a Session and link it to a destination. Ground. For example, a data log file (text file), and call the Session.open method to open (activate) the Session. When the Session is opened, no content 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 Dataltems associated with this CollectionSpec is logged to the destination.
  • the data logging rules for data log unit 510 are:
  • a Dataltem can be used in multiple DataSpecs, regardless of whether the DataSpec is locked.
  • a DataSpec can be used in multiple CollectionSpecs, regardless of whether the CollectionSpec is activated. In other words, a DataSpec can be locked by multiple Sessions at the same time.
  • 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 One DataLogFile is a unique property of a Session. DataLogFiles are not used to share between multiple Sessions. A DataLogFile cannot be connected to multiple open Sessions.
  • Data Logging Unit 510 can take the following two forms of logging: Event-based logging and periodic logging. Among them, event-based logging is triggered by specifying one or more conditional triggers. Periodic logging requires a trigger for a time interval to be triggered.
  • One or more DataSpec objects Use the CollectionSpec. addToDataSpecs() method to add a DataSpec object.
  • the condition of the trigger is added using the addToTriggers() method.
  • the time interval trigger uses the setlntervalO method.
  • Synchronous mode The CollectionSpec attaches it to the Dataltem it contains to ensure that the data it collects is good. The reading of the Dataltem value is always placed in the thread where the trigger is located. Synchronous mode recommendation Used to use a time interval trigger with a shorter time interval, or a conditional trigger that occurs frequently.
  • Asynchronous mode CollectionSpec uses smart mode to collect data to ensure that the collected data is always good. The reading of the Dataltem value is always placed in a separate thread to avoid blocking the thread where the trigger is located. The asynchronous mode is recommended for an interval trigger that occurs infrequently.
  • Default mode The kernel system 1000 determines which mode to use. Use synchronous mode when the time interval is less than or equal to 10 seconds, and use asynchronous mode when the time interval is greater than 10 seconds or there is no time interval trigger. In kernel system 1000, data log unit 510 recommends using the default mode.
  • Root This is determined by TextStorageManager.setRootDlogDirectory()4.
  • Mmmdd indicates the month and day, provided by the system, and the month is indicated by the English name.
  • Extension Optional, if an extension is specified when using the setNameTemplate() method.
  • Custom templates need to create a LogFile in the core package and set the appropriate properties, which are passed as constructor arguments when instantiating a DataLogFile object.
  • Session When a Session is opened, the Session is considered to be open ("open” ), the CollectionSpecs contained in the Session is considered active ( “active” ), and the DataSpecs contained in the CollectionSpecs are considered locked ( “locked” )
  • conditional trigger When a conditional trigger occurs, the following data is written to the data log file: the record of the triggered condition and the time of the conditional trigger; the value of all Dataltems in all DataSpecs contained in the corresponding CollectionSpec, the Dataltems involved in the trigger condition are not Record unless it is included in a DataSpec.
  • the system log unit 520 is configured to record the call information and tracking information of the kernel system 1000 in a second predetermined period.
  • the system log is a mechanism for the Universal Control Kernel System 1000 that allows for the automatic generation of useful log information for debugging and performance tracking within a specific range. This information mainly includes information about the ControlObject service call and completion status, as well as information about when the value of the data item changes, when the interlock is trapped, when the alarm is issued, or when the alarm is cleared. Developers can also insert custom log information into syslog unit 520 to log into the log file at runtime.
  • the system log unit 520 allows the user to obtain trace information that has been established in the universal control kernel system 1000, and may additionally include and capture trace messages in the general control kernel system 1000.
  • syslog unit 520 executes, the captured message is written to a destination (log file or general control kernel system console).
  • System log unit 520 can provide a record of opening or closing certain types of log information based on log settings. These settings apply to each log destination, either at configuration time or at runtime.
  • the System Log Unit 520 can be used for the development phase and post development (use or production) phases of a specific demand control application.
  • System logging is a useful application debugging tool during the development phase.
  • syslog messages are typically written to files instead of the console, and the data collected by these log files is used for diagnostics, debugging, and problem location and resolution.
  • kernel system 1000 When kernel system 1000 starts, all destinations set in the generic control kernel system configuration file are automatically activated for system logging. At the same time, two default files and an optional default log file are created and activated, and the console is also set to an active destination.
  • Log file naming rules include the attributes appendToExisting, template, sizeLimit and history, and defaultWildCard.
  • the log file naming convention specifies the file name of the open file and how to open the next file after closing a file.
  • Wildcards Used for directory names and file names, except '%s' or '%S', which can only be used in the template file name section.
  • Auto Write Attribute autoFlush The auto write attribute autoFlush is independent of the archive protocol, but it indicates whether log information is written to the destination, not temporarily stored in the memory buffer. If this property is set to true, the trace information will be written to the target file as soon as it is generated, rather than being written to the memory buffer.
  • Each message has a Topic, Verbosity and associated Object.
  • the message filtering mechanism uses Topic, Verbosity and Group concepts to filter tracking information.
  • the filtering mechanism can be represented by a matrix, with rows representing Topic, columns representing Group, and matrix elements representing Verbosity. When a trace message is generated, it first locates the column, locates the row (Topic), and finally locates the corresponding matrix element. If the severity level of the record is required, the trace message is logged, otherwise it is discarded.
  • the universal control kernel system provided by the embodiment of the present invention is based on the Windows XP operating system and is implemented by JAVA, and has the following advantages:
  • the Interworking API Application Programming Interface
  • the Recipe API is capable of storing and retrieving process parameters.
  • the Data Log API provides quick access to process parameter information at runtime.
  • the general control kernel system configuration strategy of the embodiments of the present invention can facilitate code reuse within the same application and between different applications.
  • the generic control kernel system configuration file allows software developers to configure the properties of the component, although the above properties will vary from application to application, but do not need to be recompiled.
  • the universal control kernel system of the embodiment of the present invention provides two powerful functions of application debugging and performance tracking, including a system log service and a console interface, wherein the system log service includes generating a system operation record, and the console interface includes View and modify the general control kernel system environment state when the application is running.
  • the universal control kernel system of the embodiments of the present invention enables developers to quickly develop robust control applications, implement component development and software reuse through flexible configuration strategies, and provide the necessary tools to support rapid development and debugging of applications.

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)

Description

一种通用控制内核系统 技术领域
本发明涉及计算机应用技术和集成电路装备技术领域, 特别涉及一种通用控制内 核系统。 背景技术
随着微电子技术、 信息技术、 网络技术等的飞速发展, 全球信息产业迅猛成长、 网络经济快速兴起、 知识经济初见端倪, 现代国防和未来战争中的尖端技术不断崛起, 人类进入了信息和网络时代。 由于^:电子技术的核心地位, ^:电子比以往任何时候都 更显示出其重要的战略地位, 微电子产业已经成为全球经济的重要支柱和经济、 社会 发展的强大推动力。
内核系统作为 IC ( Integrated Circuit, 集成电路) 产业的一部分, 用于开发实时设 备控制应用程序, 具有举足轻重的作用。 但是现有的集成电路的内核系统通用性差, 从而使得开发人员的开发设备控制应用程序的效率较低, 且开发后的应用程序性能鲁 棒性差。 发明内容
本发明的目的旨在至少解决上述技术缺陷之一, 特别提出一种高效通用且配置灵 活的用于集成电路制造设备的通用控制内核系统。
为达到上述目的, 本发明的实施例提出一种通用控制内核系统, 所述通用控制内 核系统用于控制硬件设备的动作, 包括: 配置模块, 所述配置模块用于在所述内核系 统启动时, 将对象实例化并将实例化后的对象注册到初始名称空间以创建所述初始名 称空间的树结构, 对所述初始名称空间树结构中的实例化后的对象进行初始化, 其中, 所述实例化后的对象映射所述硬件设备的动作; 控制模块, 所述控制模块用于根据配 置模块创建的初始名称空间树结构来控制等级高的控制单元调用并执行等级低的控制 单元的服务, 其中所述控制单元包括等级由低到高的物理层控制单元、 功能层控制单 元和操作层控制单元, 且所述控制单元还包括与所述操作层同等级别的维护层控制单 元; 监控模块, 所述监控模块用于监控所述通用控制内核系统的状态。
在本发明的一个实施例中, 所述配置模块包括: 配置文件解析单元, 所述配置文 件解析单元分析配置文件, 根据所述配置文件的信息将所述对象实例化; 注册单元, 所述注册单元用于将实例化后的对象注册至初始名称空间以创建初始名称空间的树结 构, 所述初始名称空间的树结构为实例化后的对象的名称的集合;
初始化单元, 所述初始化单元按照优先搜索算法遍历所述初始名称空间的树结构, 并根据所述配置文件的信息对注册后的实例化后的对象进行初始化。 在本发明的一个实施例中, 所述注册单元还用于创建实例化后的对象的别名, 其 中每个实例化后的对象对应一个或多个别名。
在本发明的一个实施例中, 通过以下两种方式之一访问实例化后的对象:
1 ) 通过引用名称空间的树结构中的名称访问与所述名称对应的实例化后的对象; 2 ) 通过引用所述别名访问与所述别名对应的实例化后的对象。
在本发明的一个实施例中, 所述物理层控制单元读取所述硬件设备中的数据项, 并向所述硬件设备提供服务; 所述功能层控制单元通过调用所述物理层控制单元的服 务以向所述操作层控制单元提供服务; 所述操作层控制单元通过调用所述功能层控制 单元的服务以提供操作层的服务; 所述维护层控制单元调用功能层控制单元的服务并 利用功能层控制单元来调用物理层控制单元的服务, 从而实现对所述物理层控制单元 和功能层控制单元的故障定位。
在本发明的一个实施例中,所述物理层控制单元进一步包括 EPICS协议通信部件, 所述 EPICS协议通信部件利用 EPICS协议与所述硬件设备进行通信以交换数据项, 包 括读取所述硬件设备中的状态值, 并向所述硬件设备发送设置点。
在本发明的一个实施例中, 根据承载数据的类型将所述数据项分为离散型、 连续 型和字符串型; 根据读 /写操作类型将所述数据项分为只读型和读 /写型。
在本发明的一个实施例中, 利用互锁检查所述状态值和设置点, 仅在设定条件满 足时允许修改控制读取的所述硬件设备的状态值或写入所述硬件设备的设置点。
在本发明的一个实施例中, 设置点互锁包括: 读写数据项, 所述读写数据项为从 所述硬件设备读取的数据项或从所述硬件设备写入的数据项; 校验符, 所述校验符用 于判断是否允许所述读写数据项的修改; 报警, 所述报警用于在否决所述读写数据项 的修改时, 抛出阻塞式报警。
在本发明的一个实施例中, 所述报警提供三个恢复动作: 放弃、 重试和继续执行。 在本发明的一个实施例中, 设置点互锁还包括触发器和限定符, 其中, 所述触发 器用于设置修改所述读写数据项的条件, 所述限定符用于判断是否需要验证所述校验 符的条件。
在本发明的一个实施例中, 所述监控模块通过取值互锁监控所述通用控制内核系 统的安全状态, 并在所述内核系统的不安全条件触发时进行矫正, 其中所述取值互锁 包括: 触发器, 所述触发器用于设置所述内核系统的不安全条件; 行为列表, 所述行 为列表包括触发所述不安全条件后执行的动作, 其中当所述行为列表包括多个动作时, 逐个执行所述多个动作。
在本发明的一个实施例中, 所述取值互锁还包括: 报警, 所述报警用于提供非阻 塞式报警。
在本发明的一个实施例中, 所述等级高的控制单元调用并执行等级低的控制单元 的服务包括如下步骤: 所述等级高的控制单元向所述等级低的控制单元发送服务器锁 请求或服务锁请求以获得服务器锁或服务锁, 对请求的服务器锁或服务锁的参数进行 初始化, 向所述等级低的控制单元发送运行锁请求以获得运行锁; 所述等级高的控制 单元在获得所述运行锁后, 调用并执行所述运行锁对应的等级低的控制单元的服务, 并在服务完成后, 释放所述运行锁; 所述等级高的控制单元释放所述服务器锁或服务 锁, 其中, 所述服务器锁请求用于请求获得所述服务器锁, 所述等级高的控制单元利 用所述服务器锁向所述等级低的控制单元调用服务, 并锁定所述等级低的控制单元; 所述服务锁请求用于请求获得所述服务锁, 所述等级高的控制单元利用所述服务锁向 所述等级低的控制单元调用指定服务, 并锁定对所述指定服务的调用; 所述运行锁请 求用于请求获得所述运行锁, 所述等级高的控制单元利用所述运行锁执行所述指定服 务, 并锁定所述指定服务的执行。
在本发明的一个实施例中, 所述等级低的控制单元在收到来自所述等级高的控制 单元的服务器锁请求或服务锁请求时, 如果当前没有活跃的所述服务器锁或服务锁或 运行锁时, 则所述等级低的控制单元向所述等级高的控制单元提供服务器锁; 如果当 前没有活跃的所述服务器锁或服务锁或运行锁, 或者当前服务锁与所述服务锁请求的 服务锁执行的服务相同, 则所述等级低的控制单元向所述等级高的控制单元提供服务 锁。
在本发明的一个实施例中, 所述等级高的控制单元请求的服务当前未执行, 且符 合以下任一种条件时,所述等级低的控制单元向所述等级高的控制单元提供运行锁, 1 ) 没有活跃的服务器锁、 服务锁或运行锁; 2 )仅有一个针对当前请求的服务的活跃的服 务锁; 3 )仅有一个所述等级高的控制单元具有的服务器锁。
在本发明的一个实施例中, 所述等级低的控制单元将未被提供的服务器锁、 服务 锁或运行锁的服务器锁请求、 服务锁请求或运行锁请求按照到达的先后顺序放置在锁 请求等待队列中。
在本发明的一个实施例中, 所述等级低的控制单元在所述等级高的控制单元释放 所述运行锁后, 检查所述锁请求等待队列, 如果等级高的控制单元保持服务器锁, 则 所述等级低的控制单元执行等级高的控制单元的下一个运行锁请求对应的服务; 如果 等级低的控制单元保持着服务锁, 则所述等级低的控制单元执行与下一个运行锁请求 对应的服务; 如果当前没有活跃的服务器锁、 服务锁或运行锁, 且下一个请求为服务 器锁请求, 则对该服务器锁请求提供服务器锁, 并执行拥有该服务器锁的等级高的控 制单元的运行锁请求对应的服务; 如果当前没有活跃的服务器锁、 服务锁或运行锁, 且下一个请求为服务锁请求, 则对该服务锁请求提供服务锁, 并执行所有等级高的控 制单元与所述服务锁请求对应的服务; 如果当前没有活跃的服务器锁、 服务锁或运行 锁, 且下一个请求为运行锁请求, 则所述等级低的控制单元执行所述运行锁请求对应 的服务。
在本发明的一个实施例中, 进一步包括报警模块, 用于在所述通用控制内核系统 发生异常时, 发出报警。
在本发明的一个实施例中, 所述报警模块发出阻塞式报警或非阻塞式报警, 所报 警模块在抛出所述阻塞式报警后将会阻塞导致通用控制内核系统的异常的对象所在的 线程直至清除触发所述阻塞式报警的原因; 所述报警模块在抛出所述非阻塞式报警后, 导致通用控制内核系统的异常的对象所在线程继续运行。
在本发明的一个实施例中, 进一步包括日志模块, 用于以日志的形式记录所述内 核系统运行过程中的信息, 其中, 所述日志模块包括: 数据日志单元, 所述数据日志 单元用于以第一预定周期记录所述内核系统的数据和事件; 和系统日志单元, 所述系 统日志单元用于以第二预定周期记录所述内核系统的调用信息和跟踪信息。
在本发明的一个实施例中, 所述数据日志单元釆用的日志记录形式包括: 基于事 件的日志记录, 所述基于事件的日志记录由一个或多个条件触发器触发; 基于周期日 志记录, 所述周期日志记录由基于时间间隔的触发器触发。
在本发明的一个实施例中, 所述系统日志单元记录所述数据项的修改、 所述互锁 的信息、 所述报警发出的信息以及清除所述报警的信息。
本发明实施例提供的用于集成电路制造设备的通用控制内核系统基于 Windows xp 操作系统, 釆用 JAVA实现, 具有如下优点:
1 )通过管理系统的并行性和资源互锁, 提供统一的接口给应用程序中不同类型的 I/O , 以及一个进行错误处理和错误恢复的省时框架, 解决控制应用程序开发中费时、 易错的问题。
2 )提供支持软件互锁、 数据日志、 通信功能的强大应用程序编程接口。 具体而言, 本发明实施例的通用控制内核系统的互锁 API ( Application Programming Interface,应用 程序编程接口) 保证人员和设备的安全。 Recipe API 能够存储和检索工艺过程参数。 数据日志 API能够快速获得运行时的工艺过程参数信息。
3 )通过灵活的配置策略实现组件开发和软件复用。 本发明实施例的通用控制内核 系统配置策略可以方便同一应用程序内以及不同应用程序之间的代码重用。 并且, 通 用控制内核系统配置文件允许软件开发人员配置组件的属性, 虽然上述属性在不同应 用程序中会有所不同, 但不需重新编译。
4 )提供必要的工具支持快速开发和调试应用程序。 本发明实施例的通用控制内核 系统通用控制内核系统提供了应用程序调试和性能跟踪的两个强大功能, 包括系统日 志服务和控制台接口, 其中系统日志服务包括生成系统操作记录, 控制台接口包括查 看和修改应用程序运行时的通用控制内核系统环境状态。
本发明实施例的通用控制内核系统可以使开发人员能够快速开发健壮的控制应用 程序, 通过灵活的配置策略实现组件开发和软件复用, 还可以提供必要的工具支持快 速开发和调试应用程序。
本发明附加的方面和优点将在下面的描述中部分给出, 部分将从下面的描述中变 得明显, 或通过本发明的实践了解到。 附围说明
本发明上述的和 /或附加的方面和优点从下面结合附图对实施例的描述中将变得明 显和容易理解, 其中:
图 1为根据本发明实施例的通用控制内核系统的结构示意图;
图 2为配置模块的结构示意图;
图 3为名称空间的示意图;
图 4为名称空间 UML类图;
图 5为控制模块的结构示意图;
图 6为数据项 ( Dataltem ) 的示意图;
图 7为控制模块的调用服务的示意图;
图 8为控制模块调用链的示意图;
图 9为报警模块的报警过程示意图; 和
图 10为日志模块的结构示意图。 具体实施方式
下面详细描述本发明的实施例, 所述实施例的示例在附图中示出, 其中自始至终 相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。 下面通过参 考附图描述的实施例是示例性的, 仅用于解释本发明, 而不能解释为对本发明的限制。
如图 1所示, 本发明实施例提供的通用控制内核系统 1000, 包括配置模块 100、 控制模块 200和监控模块 300。其中,配置模块 100用于在所述通用控制内核系统 1000 启动时, 将对象实例化并将实例化后的对象注册到初始名称空间中, 创建初始名称空 间的树结构, 对所述初始名称空间树结构中的实例化后的对象进行初始化, 其中, 所 述实例化后的对象映射所述硬件设备的动作; 控制模块 200用于根据配置模块创建的 初始名称空间树结构控制等级高的控制单元调用并执行等级低的控制单元的服务, 其 中控制单元包括等级由低到高依次为物理层、 功能层和操作层, 且所述控制单元还包 括与所述操作层同等级别的维护层; 监控模块 300 用于监控所述通用控制内核系统 1000的状态。
如图 2所示, 配置模块 100包括配置文件解析单元 110、 注册单元 120和初始化单 元 130。 其中, 配置文件解析单元 110用于分析配置文件, 根据所述配置文件的信息将 所述对象实例化; 注册单元 120用于将实例化后的对象注册至初始名称空间, 创建初 始名称空间的树结构, 其中初始名称空间的树结构为实例化后的对象名称的集合; 初 始化单元 130用于按照优先搜索算法遍历所述初始名称空间树结构, 并根据所述配置 文件的信息对注册后的实例化后的对象进行初始化。 配置模块 100 的配置过程发生在应用程序的启动过程中, 负责实例化和初始化对 象。 应用程序中的大部分对象都应该在应用程序启动时期实例化, 而不是在应用程序 运行时期。 名称空间的结构由配置文件信息和可配置 (实现 Configurable接口) 对象 build()方法中的代码决定。 名称空间结构不一定要反映对象间的功能关系, 或物理层、 功能层和操作层间的关系, 也不一定反映两个对象的拥有关系。
可以通过配置模块 100实例化和初始化的对象必须实现 Configurable接口,其接口 信息如下:
public abstract void build()
public abstract void init()
public abstract void verifylnit()
public abstract void startRunTime()
其中, build()接口方法用于实例化其他需要创建的对象; init()接口方法用于初始化 对象, 典型操作是创建对象之间的链接关系和改变对象状态; verifylnit()接口方法用于 验证属性以确保一切都设置正确, 从而保证对象可以安全地执行作业, 避免运行时错 误; startRunTimeO方法用于启动运行时, 包括将对象设置为运行时状态, 例如允许一 些线程开始运行, 或连接到外部设备。
配置模块 100的配置过程包括如下五个阶段:
第一阶段: 配置文件解析单元 1 10分析配置文件, 注册单元 120根据配置文件信 息实例化对象, 并将对象注册到名称空间中, 创建初始名称空间树结构;
第二阶段: 初始化单元 130按照深度优先搜索算法从上至下、 从左至右遍历第一 阶段创建的初始名称空间树结构, 根据第一阶段解析的配置文件初始化信息对注册对 象进行初始化, 通过调用注册结点关联的可配置对象的 build()方法创建完成整个名称 空间树结构;
第三阶段: 初始化单元 130按照深度优先搜索算法遍历名称空间树结构, 调用名 称空间树中注册对象的 ink ( ) 方法完成对象的初始化工作;
第四阶段: 初始化单元 130按照深度优先搜索算法遍历名称空间树结构, 调用名 称空间树中注册对象的 verifylnit ( ) 方法完成对象的初始化验证工作;
第五阶段: 初始化单元 130按照深度优先搜索算法遍历名称空间树结构, 调用名 称空间树中注册对象的 startRunTime ( )方法执行对象运行前的准备工作或设置对象为 运行状态。
其中, 配置过程的第一阶段由配置文件解析单元 110 完成, 第二至第四阶段由 ReferenceBroker完成, 即注册单元 120和初始化单元 130釆用 ReferenceBroker完成。 换言之,配置模块 100的配置过程包括初始化 Parse解析生成的初始名称空间树结构的 注册对象, 依次调用 Configurable接口的 build()、 init()、 verifylnit()和 startRunTime() 完成。 通用控制内核系统配置功能方便了基于组件的应用程序的开发。 ReferenceBroker是一个单体对象, 负责将对象注册到名称空间中, 并维护对象引 用与名称之间的映射。 ReferenceBroker主要提供三种功能:
1 ) 注册对象: 建立对象与名称之间的映射关系;
2 ) 创建别名: 建立别名与名称空间树节点的映射关系;
3 ) 引用注册对象。
名称空间是由节点构成的树结构, 树中的大部分节点都与对象相关联。 名称空间 是对象的一个注册机构, 在其中各个对象通过它们的名称相互联系, 从而提供一个公 共地址空间。 通过使用 ReferenceBroker注册对象来创建名称空间, 在名称空间注册命 名对象, 内核系统 1000中任何一个对象都可以通过名称来引用名称空间中的任何一个 命名对象。 注册时需指定对象的名称, 以及注册对象相对于树中其他对象的位置。 内 核系统 1000 中的所有对象都可以查询 ReferenceBroker来获得注册在名称空间中的任 何一个对象的引用。
在本发明的一个实施例中, 通过以下两种方式之一访问对象:
1 ) 通过引用名称空间的树结构中的名称访问与名称对应的实例化后的对象; 2 ) 通过引用别名访问别名与所述别名对应的实例化后的对象。
关于通过引用名称空间树结构中的名称访问名称对应的对象, 初始名称空间树中 的绝大部分节点都和命名对象相关联, 这些对象可以通过两种方式标识:
完全限定名: 从名称空间树的根节点到当前对象。 名称空间中的每个完全限定名 都是唯一的。 如图 3所示, objectG的完全限定名为 "/objectA/objectF/objectG" 。
相对名: 总是有一个起点, 该起点称为参考对象。 换言之, 参考对象是当使用相 对名注册一个对象或引用一个对象时, 必须明确地提供一个起点, 这个起点即为一个 参考对象。 从参考对象到当前对象。 例如, 如果 objectP为参考对象, 则 objectG的相 对名是 " ../../objectA/objectF/objectG" 。
节点所引用的命名对象的名称为部分名, 如 objectG 的部分名为 "objectG" 。 部 分名不是唯一的。
关于通过引用别名访问别名对应的对象, 首先对别名的概念进行说明。 别名为实 例化后的对象的别名, 别名可以通过注册单元 120创建, 提供了访问名称空间中一个 原始对象 (以及其他对象) 的另一条路径。 每个实例化后的对象可以对应一个或多个 别名。 当建立一个别名时, 在名称空间中插入了一个 "别名节点 (alias node ) " 。 如 图 3所示, aliasOfObjectF为一个别名节点, 它指向 objectF节点, 从而 objectF对象有 两条路径可以访问: 第一条路径: "/objectA/objectF"; 第二条路径: "/aliasOfObjectF" 。 objectJ 也有两条路径可以访问: 第一条路径: "/objectA/objectF/objectJ" ; 第二条路 径: "/aliasOfObjectF/objectJ" 。
下面参考图 4对名称空间树的各类型节点进行说明。
名称空间是一种树状数据结构, 包括三种类型的节点: 一般节点: 一般节点和对象没有建立关联关系;
注册节点: 注册节点和对象建立关联关系;
别名节点: 别名节点指向树中其他节点, 方便通过别名访问。
如图 4所示, NamedObject是通用控制内核系统库中一个重要的类, 系统库中大部 分类都是从 NamedObject 派生出来的。 NamedObject 继承自 OssObject 类, 实现了 Configurable和 MsgLogger接口。 NamedObject为命名对象, 它的一个重要特性是可以 注册到名称空间中, 并且在名称空间建立完成后可通过名称来引用, 而且其派生类方 便地继承了系统日志记录功能。
名称空间 4对结构的实现是由 UnNamedNode、 AliasNode和 ReferenceNode三大类型 节点组成。 其中, UnNamedNode 可以注册在关联 (引用) 命名对象 NamedObject 的 ReferenceNode节点之下, 并关联一个可配置 Configurable对象。 其中, NamedObject 可以实现 Configurable接口。
AliasNode节点和 ReferenceNode节点均为 NamespaceNode节点。其中, AliasNode 作为别名节点, 没有子节点。 AliasNode指向名称空间中的一个 ReferenNode节点。
ReferenceNode 节点是名称空间中主要节点, 它可以关联一个命名对象
NamedObject, 也可以不关联任何对象(此时相当于一般节点) 。 ReferenceBroker负责 管理和维护整个名称空间树结构, 并在运行时根据名称返回相应节点所关联的对象。
控制模块 200和监控模块 300是通用内核系统 1000的主要功能模块, 继承自公有 类 ControlObject和 ControlMonitor。 这些类具有内建的功能, 使得控制逻辑更加容易 实现和维护。 ControlObject 的典型应用是表示一个定义良好的设备控制领域。 每个 ControlObject 都提供了一个相关联的服务集以完成相应领域的控制操作。 例如, 一个 表示阔门的控制对象可能拥有打开和关闭两个服务, 这也为实际阔门设备具有的两个 操作。 ControlObject具有内建特性以解决较困难的控制问题, 例如错误恢复和多线程。
下面结合具体实施例分别对控制模块和监控模块进行说明。
控制模块 200釆用分层组织, 由低到高依次为物理层、 功能层、 操作层 /维护层。 相应地, 如图 5所示, 控制模块 200包括等级由低到高的物理层控制单元 210、 功能层 控制单元 220、 操作层控制单元 230 , 以及与操作层控制单元 230同等级的维护层控制 单元 240。 其中, 物理层控制单元 210用于读取硬件设备 2000中的底层设备的数据项, 并向底层设备提供服务; 功能层控制单元 220通过调用物理层控制单元 210的服务以 向操作层控制单元 230提供服务; 操作层控制单元 230通过调用功能层控制单元 220 的服务以提供操作层的服务; 维护层控制单元 240执行对物理层控制单元 210和功能 层控制单元 220的故障定位和修理, 其中, 维护层控制单元 240可以调用功能层控制 单元 220 ,通过调用功能层控制单元 220进而实现对物理层控制单元 210的服务的调用, 从而实现对物理层控制单元 210和功能层控制单元 220的故障定位。 等级高的控制单 元可以调用同层或等级低的控制单元的方法和服务, 从而建立起控制模块 200 的调用 链。
下面结合具体实施例对控制模块 200中的服务调用过程进行描述。
如图 5所示,物理层控制单元 210位于最底层,映射硬件设备 2000中的低层设备, 例如硬件设备 2000中简单的设备。物理层控制单元 210包括 EPICS协议通信部件 211 , 用于利用 EPICS协议与硬件设备 2000进行通信以交换数据项 ( Dataltem ) , 包括读取 硬件设备 2000中的底层设备的状态值, 并向硬件设备 2000发送相关联的设置点。 例 如一个阔门控制对象类, 其可能引用一个表示打开或关闭阔门的螺线管的读 /写 Dataltem , 以及一个表示阔门开闭状态的接触传感器的只读 Dataltem。 由于上述 Dataltems的操作不能进行简化, 因此该阔门对象属于最底层。
数据项( Dataltem )提供了内核系统 1000与外部硬件设备 2000之间以及内核系统
1000 内的各个模块之间进行数据交换的一种机制。 其中, 通过提供到 I/O设备驱动器 一个抽象接口以实现与外部硬件设备 2000之间的数据交换。 通过存储需要在整个内核 系统 1000中全局可见的内部数据以实现内核系统 1000内的各个模块之间的数据交换。 物理设备的 Dataltems通过 EPICS I/O和物理设备相关联。
在本发明的一个实施例中, 根据承载数据类型的不同, 数据项 (Dataltem )可分为 离散型 (int ) 、 连续型 (double ) 、 字符串型 (string ) , 以及一般类型 (任何 java对 象) 。
根据读 /写 (I/O )操作类型的不同, 数据项 (Dataltem )可分为只读类型和读 /写类 型。 如图 6所示, 只读 Dataltem与一个数据源相关联, 只有此数据源可以更新其值, 此数据源可以为一个 I/O对象, 也可以为一个非 I/O对象。 只读数据项 ( Dataltem ) 可读且可申请。
读写 Dataltem与一个目标相关联, 对读写 Dataltem的设置将会传递到相应的物理 设备 I/O点上, 读写 Dataltem也可用于非 I/O 目的, 仅表示一个可读写的变量。 读写 Dataltem可读、 可写、 可申请、 可 veto。
在本发明的一个实施例中, 具有数据源的 Dataltem包括三个重要特性: 访问模式、 轮循 ( Polling ) 和有效性。
1 ) 访问模式: 从 Dataltem或其数据源读
本地: 从本地 Dataltem取值;
远程: 通过其数据源读远程物理设备, 然后返回值。 由于远程访问比本地访问 的时间长, 当等待设备返回值时需要等待;
智能: 若轮循 (polling ) 则使用本地访问, 否则使用远程访问。
2 )轮循 ( Polling ) : Dataltem是否被其数据源持续更新。 以下情况下将自动实现 polling: 具有 subscribers 具有 attachers或者在一个 DataSpec中被使用,这个 DataSpec 正被一个使用同步模式的 CollectionSpec使用。
3 ) 有效性: Dataltem和其数据源之间是否匹配 invalid: 数据从未读过, 且数据源 offline;
not_init: 数据没有被读, 且数据源 online;
stale: 数据也许不 fresh , 但数据源 online;
offline: 数据也许不 fresh, 但数据源 offline;
good: 数据 fresh , 其中一个具有内部数据源或没有数据源的 Dataltem的数据 值总是 good„
数据项 ( Dataltem )相关的接口包括: Subscriber接口、 Vetoer接口 TimeListener 接口。
Subscriber接口: void updateFromItem(DataItem,NewValue,Valid)。 Subscriber接口 的方法为调用 Dataltem.subscribe(Subscriber)注册到 Dataltem上, 当 Dataltem值发生变 化时将自动调用 Subscriber的接口方法 updateFromltem执行相应的动作。
Vetoer接口: void checkVeto (Dataltem, ProposedValue)。 Vetoer接口的方法为调用 Dataltem.subscribeVetoer (Vetoer)注册到 Dataltem上, 当 Dataltem的值被设置后 ^)夺调用 Vetoer的接口方法 checkVeto来验证提议的值是被接收或者被否决。
TimeListener 接口: updateFromTimer()方法。 TimeListener 接口的方法为调用
Timer. subscribeTimerListener (TimeListener)注册到 Timer 上, 并在定时到后, 调用 TimeListener的接口方法 subscribeTimerListener执行相应的动作。
数据项 (Dataltem ) 包括必须属性和可选属性。 其中, 必需属性构成对象的状态
St&t6。
必需属性: value , time stam , validity;
可选属性: data source , target, typelnfo , peer, simulator。
为了提供覆盖 Dataltem值改变的安全层, 在内核系统 1000时实行设置点互锁。设 置点互锁基于 Dataltem, 申请到 Dataltems上, 并在 Dataltems值发生变化时执行相应 的动作。 设置点互锁是预防性的。 设置点互锁仅仅能检查 Dataltem的值, 而不能检查 一个对象的状态。 具体而言, 仅在设定条件满足时允许修改设置点互锁控制读取的硬 件设备 2000的数据项或写入的硬件设备 2000的数据项。
设置点互锁包括读写数据项( Dataltem )、设置一个或多个校验符和设置一个报警。 此外, 设置点互锁还可以进一步包括设置触发器和设置限定符。 其中, 设置触发器和 设置限定符均为可选条件。 设置点互锁可用如下公式表示:
Setpointlnterlock = R-W DataItem+Trigger+Qualifier+{ Checkers }+Blocking Alarm。 当触发器条件触发为 true, 限定符条件为 true, 至少一个校验符为 false时, 设置 点互锁将会否决对一个 Dataltem提议的修改, 否则提议的修改将被允许。
读写 Dataltem: 读写数据项 (Dataltem ) 为从硬件设备 2000读取的数据项或从硬 件设备 2000写入的数据项。 设置点互锁关联一个特定的 Dataltem, 所述特定的数据项 在触发器条件中指定或者直接在设置点互锁中指定; 触发器: 触发器用于设置修改读写数据项的条件。 触发器为检查的第一个条件, 这个条件为一个复杂条件, 一般为涉及对 Dataltem提议修改的一个条件。 如果没有显 示指定一个读写 Dataltem, 则设置点互锁关联的 Dataltem是触发器复杂条件中左边起 的第一个读写 Dataltem。 (后根遍历)
限定符: 限定符用于判断是否需要验证校验符的条件。 验证校验符的条件为一个 复杂条件。 只有这个特定条件满足时, 才需要检查后续的条件。 限定符基于 Dataltem 的当前值工作, 即便限定符中包含与触发器中相同的 Dataltem。 触发器检查 Dataltem 的提议值 (当前值并未发生修改) , 而限定符检查相同 Dataltem的当前值。 限定符的 用途在于简化一个复杂的触发器条件。
校验符: 校验符用于判断是否允许读写数据项的修改。 校验符决定提议的设置值 是否被允许的描述。 校验符接口当前只有一个实现需求。 需求基于条件, 可以为一个 简单条件或者一个复杂条件。 只有当相应条件为 true时, 提议的设置值才被允许。 如 果需求不能满足要求, 可以通过实现校验符接口来自定义特殊检查需求。 校验符也可 以基于 Dataltem的当前值工作。 一个设置点互锁必须至少包括一个校验符。
报警: 报警用于在否决读写数据项的修改时, 抛出阻塞式报警。 如果提议的设置 值被否决, 将会抛出一个阻塞式报警。 一个设置点互锁必须包含一个阻塞报警。 如果 没有使用设置报警方法显示指定报警, 则设置点互锁将会建立它自己的报警。 报警可 以提供三个恢复动作放弃 (Abort ) 、 重试 (Retry ) 和继续执行 ( Continue ) 。 如果使 用设置报警方法传递了一个 null参数, 表示没有任何报警会和设置点互锁相关联, 这 样在提议值被否决时, 将会抛出异常。
下面对本发明中涉及的条件和事件的概念进行说明。
一个条件为一个对象,涉及 Dataltems和常量的比较。条件的值可以分为 true、 false 或 unknown。 其中, unknown为当条件关联一个或多个 Dataltem offline时的取值。 在 通用控制内核系统 1000中创建一个条件对象, 就可以在内核系统 1000中任意位置通 过条件名称来访问这个条件。 换言之, 不需要每次需要时都重写逻辑判断语句, 可以 通过引用一个条件对象来 reuse同一个逻辑判断。
条件可以为简单条件或复杂条件。 简单条件例如为比较两个 Dataltem, 或比较一 个 Dataltem和一个常量。 两个比较的元素必须类型兼容, 即可比较。 复杂条件例如为 通过二元逻辑运算符 ( AND、 OR )将两个条件关联起来, 如此关联从而形成一棵条件 树, 条件树中的每个结点都可以判断。
每个条件包括左项和 /或右项、 运算符, 即每个条件包括两个或三个元素。 表 1示 出了条件的结构。 表 1
Figure imgf000014_0001
从表 1中可以看出, 条件运算符包括:
1 ) 比较运算符: ">" 、 ">=" 、 "<" 、 "<=" 、 "==" 、 " !=" ;
2 ) 逻辑运算符: "AND" 、 "OR" 、 "NOT" ;
3 ) 其他运算符: "CHANGES" 、 "TIMER" 、 "FOR" 。
条件主要用于以下三种情况:
1 ) waitFor方法, 其中 waitFor方法为基础控制类中的一个方法;
2 ) 事件, 通过条件来创建事件, 用来创建事件的条件称为事件源;
3 ) 使用条件来提供决策信息, 根据其值来决定的执行代码类型。
事件从条件 (事件源) 创建, 事件一旦创建就已存在, 但却是不活跃的, 直到条 件树中的第一个条件触发为 true。 当最后一个 (最外层) 条件触发为 true时, 也就是 当判断完整个条件树时, 事件发生。 事件发生后, 将自己作为参数, 通知其注册者。
表 2示出了本发明实施例的通用控制内核系统 1000的条件和事件对应表。 表 2
Figure imgf000015_0001
如表 2所示, 如果一个事件基于多个条件的 OR连接, 那么在事件发生时需要知 道是哪个条件触发了整个条件为真。 条件列表提供的信息是在事件发生时每个条件的 取值状态。 条件列表是一个向量, 包含了事件发生时不同条件的引用及其取值。
由二元逻辑运算符连接起来的复杂条件构成一棵条件树。 其中条件树包括叶子节 点和分支节点。 条件树中的每个结点都表示一个条件, 所述条件可以用于判断。 条件 树由基础条件抽象类派生的各种具体子类表示的条件结点所组成。 其中, 叶子节点表 示简单条件, 可以为改变条件 (表示 Dataltem "CHANGES" 条件) 和抽象类叶条件 的派生类 ( Equal、 NotEqualCondition、 Greater、 GreaterEquaK Less、 LessEqual ) 。
分支节点表示复合条件, 包括 Not、条件改变条件和由二元逻辑运算符连接的抽象 类分支条件的派生类。 其中, Not表示一元逻辑运算符 NOT连接的复合条件, 条件改 变条件表示条件 "CHANGES" 条件。 由二元逻辑运算符连接的抽象类分支条件的派 生类包括 And和 Or。
事件从 (事件源) 条件创建, 对应一棵条件树, 从而也创建了一棵事件树。 相应 的事件树也有叶子节点和分支节点。 事件树由控制事件抽象类派生的各种具体子类表 示的事件结点所组成。 其中, 叶子节点可以为改变事件 (与改变条件相对应) 和叶事 件 (与叶条件相对应) ; 分支节点可以为条件改变事件 (与条件改变条件相对应) 、 无事件 (与无条件相对应) , 时间事件 (表示条件 "FOR" 周期条件, 与一种时间 条件相对应) 以及逻辑事件 (与分支条件相对应) 。
条件树为静态的概念, 而事件树为动态的概念。 在抽象类控制事件的定义中包含 了 3个成员变量: Condition containerCondition、 BaseCondition topOfConditionTree和 EventSubscriber eventSubscriber。 其中, Condition containerCondition表示与对应条件树 中的基本条件结点的条件封装。 BaseCondition topOfConditionTree 表示条件树的才艮结 点。 EventSubscriber eventSubscriber表示向其注册的事件申请者, 在实现时实际上是该 事件结点在事件树中的父结点: 条件树中每个非根结点有且只有一个父结点; 向条件 树的根结点注册的对象实现了 EventSubscriber接口, 以便在整个条件值触发为 true时 能够得到及时通知。
事件树的动态性通过 Subscriber 模式实现: 事件树中分支结点通过实现 EventSubscriber接口 (条件改变事件、 无事件、 逻辑事件) 或 TimerListener接口 (时 间事件) , 向其子结点注册, 在其子结点条件值发生变化时得到通知, 执行相应的动 作。 事件树中叶子结点与 Dataltem相关联, 通过实现 UntypedSubscriber接口 (改变事 件)或 DiscreteSubscriber、 ContinuousSubscriber和 TextSubscriber (叶事件 )接口, 并 向关联 Dataltem注册, 在关联 Dataltem值发生变化时得到通知, 并执行相应动作。
因而, 事件树是一种由下至上的通知机制: Dataltem 叶子节点 分支节点(父结 点) 根结点, 从而完成整个事件树的条件值的及时判断。 当事件树最外层根结点的 条件值触发为 true时, 事件发生, 通过调用其注册者所实现的 EventSubscriber接口的 updateFromEvent接口方法, 执行相应动作。
在事件树的创建、 事件值的判断和注册者的通知时, 使用事件锁。 在事件树创建 过程中, 整个事件树从根结点开始递归创建, 事件树中所有结点共享同一个事件锁, 以保证不同结点事件值的更新得到有效同步, 可控进行, 而不会出现不一致的情况。
功能层控制单元 220通过调用物理层的服务, 而被操作层控制单元 230所调用。 功能层控制单元 220提供一个完整的服务。 例如, 一个功能层真空蒸发对象可能调用 一个物理层阀门对象和一个物理层泵对象, 提供将腔室抽为真空的操作。 功能层控制 单元 220通常为管理者。 例如, 一个功能层隔离阔对象可以控制物理层中多个隔离阔 的动作。
操作层控制单元 230位于最高层。 在本发明实施例的通用控制内核系统 1000中, 操作员可以使用通用控制内核系统 1000 的任何客户端。 因此一个通用控制内核系统 1000的操作员可以为一个操作人员, 也可以为一个集群装备监管软件 (例如 CTC ) , 还可以为任何与通用控制内核系统应用程序的操作层进行交互的软件实体。 操作层控 制单元 230可以通过功能层控制单元 220调用功能层的服务, 而不能越过功能层控制 单元 220直接调用物理层控制单元 210的服务。
维护层控制单元 240位于最高层。 维护层通过一个用户接口与外界交互的除了操 作层之外的另一层。 维护层控制单元 240提供给维护工程师 (非操作员) 一个视图, 用于执行底层的故障定位和修理。 维护层控制单元 240可以直接调用物理层控制单元
210和功能层控制单元 220。
各层控制单元之间的交互釆用客户端 /服务器的方式, 其中提供服务的控制单元为 服务器, 调用服务的控制单元称为客户端。 在本发明的一个实施例中, 一个控制单元 可以同时为服务器和客户端。 例如: 操作层控制单元 230既为服务器, 又为客户端。 具体而言, 操作层控制单元 230可以调用等级低的控制单元的服务, 同时也会被 操作员 (例如一个 CTC )调用其服务。 功能层控制单元 220通常既为服务器, 又为客 户端。 功能层控制单元 220可以调用等级低的控制单元的服务, 同时也会被等级高的 控制单元调用其服务。 物理层控制单元 210通常仅为服务器, 等级高的控制单元会调 用其服务, 但物理层控制单元 210不会自己调用服务, 而是简单地调用关联 Dataltems 的 setValueO方法来设置物理设备的 I/O点。 当一个控制单元 (客户端)请求另一个控 制单元 (服务器) 的服务时, 请求将会排队, 直到另一个控制对象空闲。 客户端将会 阻塞直到请求的服务开始执行, 而服务器将会上锁直到请求的服务完成执行。
所有的上锁 (包括 unlock ) 方法都是控制对象类的一部分, 由客户端在服务器上 调用。 一个控制对象的锁可以包括以下几种情况:
1 ) 没有锁;
2 ) 一个运行锁;
3 )一个服务器锁;
4 ) 一个服务锁;
5 )一个服务器锁和一个运行锁;
5 ) 多个服务锁 (针对相同的服务) 和一个运行锁。
其中, 服务器锁请求用于请求获得服务器锁, 等级高的控制单元利用所述服务器 锁向等级低的控制单元调用服务, 并锁定等级低的控制单元。 服务锁请求用于请求获 得服务锁, 等级高的控制单元利用所述服务锁向等级低的控制单元调用指定服务, 并 锁定对所述指定服务的调用。 运行锁请求用于请求获得运行锁, 等级高的控制单元利 用所述运行锁执行所述指定服务, 并锁定所述指定服务的执行。
创建一个控制对象, 需派生自控制对象或已有控制对象的派生类。 创建控制对象 的一个服务, 需作为控制对象的公有 (public ) 内部类, 并派生自控制服务。
如图 7所示, 作为控制对象的公有 (public ) 内部类需要实现控制服务中定义的抽 象方法: public void execute() throws BaseException来定制特定的服务逻辑。 但是一个 服务的 execute()方法不能调用相同控制对象的其他服务, 这样将会发生死锁, 因为一 个控制对象一次只允许一个服务执行。
等级高的控制单元调用并执行等级低的控制单元的服务包括如下步骤:
1 ) 准备阶段:
1.1 ) 处理锁请求: 在等级高的控制单元请求执行一个服务时, 通常首先申请一个 服务器锁或服务锁。
等级低的控制单元在收到来自等级高的控制单元的服务器锁请求或服务锁请求 时, 如果当前没有活跃的服务器锁或服务锁或运行锁时, 则等级低的控制单元向等级 高的控制单元提供服务器锁。 如果当前没有活跃的服务器锁或服务锁或运行锁, 或者当前服务锁与所述服务锁 请求的服务锁执行的服务相同, 则等级低的控制单元向等级高的控制单元提供服务锁。
如果锁请求没有被立即提供, 则将其放置在锁请求等待队列的队尾。 等级低的控 制单元将未被提供服务器锁、 服务锁或运行锁的服务器锁请求、 服务锁请求或运行锁 请求按照到达的先后顺序放置在锁请求等待队列中。 所有的锁请求在等待队列中具有 相同的优先级。 如果多个客户端尝试同时获得一个锁, 只有一个锁请求将被提供, 而 其他的锁请求则将会排队等待被提供。 使用 unlock方法移除所有的锁。 如果一个服务 器或客户端中止, 所有的锁将自动释放。 锁的请求和提供需要使用一定的数据结构, 并考虑数据结构的一致性, 即实现多个线程对同一数据结构访问的同步。
1.2 ) 实例化和调用: 客户端实例化和调用服务。 一个新的控制服务内部类实例被 创建, 并对请求的服务所需的参数进行初始化。
1.3 )检查可用性: 请求的服务立即被许可 (即申请到运行锁) , 如果请求的服务 当前没有执行 (即没有任何服务在当前执行) , 且符合以下任一种条件时, 所述等级 低的控制单元向所述等级高的控制单元提供运行锁。
A ) 没有活跃的服务器锁、 服务锁或运行锁;
B )仅有一个针对当前请求的服务的活跃的服务锁;
C )仅有一个所述等级高的控制单元具有的服务器锁, 换言之, 仅仅有一个活跃的 服务器锁, 并且被当前这个客户端所拥有。
如果运行锁请求没有被立即被提供, 将其放置在锁请求等待队列的队尾。
2 ) 执行服务
2.1 )调用: 当控制单元准备运行服务时, 客户端自动获得了服务器的运行锁。 要 执行服务, 服务器调用所请求服务的 execute()方法。 execute()方法也许会调用其他的方 法或其他的服务, 从而建立起一个调用链。 当另一个服务被调用时, 当前服务被认为 是运行在 "父模式" 中, 因此父服务的 (运行) 锁仍然保持, 直到所有的从属方法和 服务完成。 调用服务并不将控制传递给它所调用的服务, 而是自己保持这种控制, 从 而运行锁将会一直保持, 直到服务完成。
当一个控制服务在一个控制单元调用了一个服务, 这两个实体被认为是同一个调 用链的一部分。 在一条调用链中可以链接多个控制单元。 调用链中的等级高的控制单 元一般要阻塞, 因为它们等待调用链中的等级低的控制单元完成其服务。 调用链仅仅 在一个对象保持对另一个对象的锁时才有效, 一旦服务调用完成、 所有锁都被释放, 服务器就不在调用链中了。
2.2 )报警和中止: 在执行过程中, 服务可能会遇到一个条件, 这使它抛出一个报 警。 报警恢复可能需要服务重新执行。 这个服务以 RetryException异常的形式抛出来, 这个异常被控制对象系统截获, 系统接着继续调用这个控制服务的 execute()方法, 重 新执行导致报警抛出的代码。 恢复选项也可能需要服务中途中止, 这个机制同 retry相 似, 一个 AbortException将被控制对象系统截获, 并导致对象中止这个服务。
2.3 ) 完成: 服务执行完成, 释放运行锁。
2.4 ) 释放服务器锁或服务锁: 等级高的控制单元将会释放服务器锁或服务锁。 如图 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队列中等待被提供。
如果调用链中的一个对象在执行服务时被请求中止或捕捉到异常, 这个对象将通 过服务器和客户端的形式中止其关联的所有控制对象。 例如,对图 8中的任何对象(例 如 CO_D ) 启动中止, 将最终中止图中所有的控制对象。 中止过程包括:
SI : CO_D 移除其所提供的所有锁请求, 完成中止, 并将中止请求沿着调用链向 上传递到其客户端 CO_B;
S2: CO_B 再将中止请求沿着一条调用链分支向下依次传递给服务器 CO_C、 及 CO—C的服务器 CO_F;
S3: CO_F先完成中止, CO_C接着完成中止;
控制回到 CO_B , CO_B完成中止, 并沿着两条调用链分支将中止请求传递到其客 户端, 即 CO_A和 CO_E , 相应地 CO_A和 CO_E也相继完成中止;
S4: 中止过程结束, 但控制对象并未被销毁。
每当一个服务执行完成, 等级低的控制单元在所述等级高的控制单元释放所述运 行锁后, 等级低的控制单元 (服务器) 将检查锁请求等待队列, 来决定接下来执行哪 个服务。 检查锁请求等待队列包括遍历锁请求等待队列中的每一个锁请求。
1 ) 当前这个客户端 (等级高的控制单元)仍然保持着服务器锁, 服务器 (等级低 的控制单元)将执行拥有服务器锁的客户端的下一个服务请求(运行锁对应的请求) 。
2 ) 当前保持着一个服务锁, 服务器 (等级低的控制单元)将执行对这个服务的下 一个服务请求 (运行锁对应的请求) 。
3 ) 当前没有活跃的锁, 即没有活跃的服务器锁或服务锁, 运行锁在服务执行前后 自动申请和释放, 并且下一个请求是一个服务器锁, 那么对该服务器锁请求提供服务 器锁。 服务器 (等级低的控制单元)接着执行拥有这个服务器锁的客户端 (等级高的 控制单元) 的下一个服务请求 (运行锁) 。
4 ) 当前没有活跃的锁, 并且下一个请求是一个服务锁, 则对该服务锁请求提供服 务锁。 服务器 (等级低的控制单元)接着执行任何客户端 (等级高的控制单元) 针对 这个服务的执行请求 (运行锁) 。 5 ) 当前没有活跃的服务器锁、 服务锁或运行锁, 并且下一个是服务请求为运行锁 请求, 服务器 (等级低的控制单元)执行所述运行锁请求对应的服务。
控制模块 200所提供的服务通过内部类控制服务的形式实现。 等级高的控制单元 接收命令, 然后调用等级低的控制单元执行命令。 在最底层的物理层控制单元 210设 置或读取 Dataltems的值来执行设备 I/O。 控制模块 200具有如下的重要特性:
1 )允许控制单元之间互不干扰地并发地执行服务,而不需建立独立的线程来执行, 这通过在控制单元上设置锁来实现;
2 ) 包括一个功能强大的方法一 waitFor, waitFor 用于暂停服务的执行直到某个条 件得到满足;
3 )健壮地处理异常和中止, 因为当前控制单元可以获得其自身与其他控制单元之 间的关系, 所述其他控制单元为当前控制单元的客户端或服务器。
控制服务是控制单元的一个重要内建特性, 适合于两个控制单元 (客户端请求服 务, 而服务器执行服务) 之间的交互, 提供了一个内建安全层, 包括:
1 ) 竟争条件: 在服务器上一次只能执行一个服务。 在一个服务运行时, 服务所在 的服务器上锁。 控制对象排队所有的服务请求, 决定何时、 以何种顺序执行排队的请 求。
2 )线程同步: 服务实现了多线程, 但并没有使用 Java线程同步机制。 同步机制应 用了 "临界区" 的思想, 在 "临界区" 一次只能由一个线程在临界区中执行, 服务应 用和同步机制相同的概念。
3 ) 异常处理: 服务自动处理异常, 如中止和重试。
监控模块( ControlMonitor ) 300用于监控内核系统 1000的条件并在条件满足时独 立地执行相应的动作。 ControlMonitor对象和内核系统 1000的其他模块并发执行操作。 监控模块 300检测一组条件, 并在特定条件满足时执行相应的动作。 例如, 监控模块 300在一个特定过程执行的时候执行维护一个腔式压力的任务,这个控制对象仅在这个 特定过程执行时才运行。 ControlMonitor的一个用途是作为后台仿真器, 监视连续型数 据项被设置为特定范围内的某个值, 然后让传感器数据项来仿真期望的响应。
监控模块 300 包含一个运行标志, 所述标志在实例化监控模块 300对象时自动创 建。 运行标志为一个 Dataltem, 用于表示监控模块 300的状态, 即当前是否正在运行。
通过调用 startRunningO方法启动一个监控模块 300。 当调用了这个 startRunning() 方法,内核系统 1000设置运行标志为开,并调用 executeO方法。必须通过重载 execute() 方法来执行监控功能。 executeO包括一个 waitFor()方法等待一个特定条件发生。 当条件 发生时, executeO执行指定的动作, 然后一般再返回到 waitFor()方法, 从而形成一个循 环。 因此, 运行的监控模块 300可以执行 waitFor()或者特定的动作。
通过调用 stopRunningO方法停止一个监控模块 300 , 内核系统 1000设置运行标志 为关。 如果监控模块 300在等待, waitFor()方法退出, 开始执行 execute()。 如果监控模 块 300正在执行动作, 动作将会继续。 设置运行标志为关不会自动停止监控模块 300 , 需要循环条件中加入对运行标志的判断。
监控模块 300可以为控制模块 200中的一个控制单元的客户端, 表示其 execute() 方法可以调用一个控制单元的服务。 但是, 监控模块 300 自身并不提供服务, 不会成 为服务器。 因此, 监控模块 300总是在调用链的顶端。
监控模块 300可以通过调用 startAbortO或 haltMonitor()方法被中止。 当监控模块 300 被要求中止时, 它确保调用链中所有在其之下正在执行服务的控制对象都完成中 止, 然后控制转到应用程序定义的 abort代码。 接着监控模块 300停止执行, 除非它被 定制为在一个 abort后继续执行。 haltMonitor()中止监控模块 300执行, 阻塞调用者直 到中止成功完成。
监控模块 300比 Interlock灵活, Interlock只能设置一个 Dataltem, 而监控模块 300 可以通过重载 execute()方法实现多种动作。
当满足以下条件时, 控制单元的服务远程可用:
1 ) 将通用控制内核系统 1000和 ClusterLink CTC或 GFX集成起来;
2 ) 编写自己的 Java或 C++客户端和通用控制内核系统 1000进行通信, 所述客户 端可以为维护或操作接口、 工厂内 CTC、 数据收集系统等等。
通用控制内核系统 1000 的远程接口允许控制对象服务被一个独立的程序远程调 用。 当一个服务被以这种方式调用时, 被称为远程调用。 远程程序可以和通用控制内 核系统 1000运行在同一台计算机上, 也可以运行在同一网络中的不同计算机上。 此时 需要遵循预定的规则以使一个控制对象的服务远程可访问。
在本发明的一个实施例中, 监控模块 300可以通过取值互锁监控内核系统 1000的 安全状态, 并在内核系统 1000的不安全条件触发时进行矫正。 取值互锁是矫正性的。 取值互锁检测 Dataltem是否达到一个特定值, 并自动执行一系列相关的操作。 例如, 一个取值互锁可以用于检测设备中的一个不安全条件, 并在不安全条件发生时执行一 系列动作, 将设备恢复到一个安全状态。
取值互锁包括设置触发器和设置行为列表, 此外, 取值互锁还可以包括设置非阻 塞式报警。 其中, 非阻塞式报警为可选条件。 取值互锁可用公式表示为: ValueInterlock=Trigger+ { Action } +Unblocking Alarm。
触发器: 触发器设置内核系统 1000的不安全条件, 用于描述不安全状态。 当取值 互锁陷入的触发器条件时, 表示内核系统 1000处于不安全状态。 触发器条件可以为一 个简单条件, 或则一个复杂条件。
行为列表: 行为列表为触发不安全条件后的动作, 其中当所述行为列表包括多个 动作时, 多个动作可以逐个执行。具体而言,行为列表为具有 execute方法的一个对象。 当触发器条件触发为真时, 取值互锁将自动调用行为的 execute接口方法。 当前行为接 口有三个实现类, 即 Assignmen Addition和 Ensure , 对一个读写 Dataltem进行修改。 如果上述三个行为实现类无法满足需求, 可以通过实现行为接口来自定义特殊动作需 求。 行为中修改的 Dataltem可以为触发器条件中的一个 Dataltem, 也可以为一个完全 不同的 Dataltem。 如果取值互锁有多个行为, 则所有行为将一个接一个地执行。
报警: 报警为非阻塞报警。 如果存在所述非阻塞报警, 则将其在 Ensure动作中抛 出。
通用控制内核系统 1000进一步包括报警模块 400 ,用于在内核系统 1000发生异常 时发出报警。 报警模块 400可以通知操作员或其他实体 (如远程主机) 异常的发生, 同时提供可供选择的恢复动作, 用于清除报警。
报警模块 400发出的报警类型包括阻塞式报警或非阻塞式报警。 其中, 报警模块 400 在抛出阻塞式报警后将会阻塞导致通用控制内核系统的异常的发送对象所在的线 程直至清除触发阻塞式报警的原因。 清除阻塞式报警作为报警恢复动作的一部分。 报 警模块 400在抛出非阻塞式报警后, 导致通用控制内核系统的异常的对象所在线程不 必阻塞而是继续运行。 非阻塞式报警用于警告操作员一个可能的错误, 或提醒操作员 一个动作正在执行。
如图 9所示,报警模块 400包括下述属性:一个整型报警标识、一个消息(message ), 一个描述 ( description ) 、 一个严重等级 ( severity ) 、 一个可选的自动恢复选项 ( autorecovery ) , 以及一个或多个恢复选项 ( recovery ) 。 其中, 消息 ( message ) 是 对报警模块 400的简要描述, 描述(description ) 时对报警模块 400的详细描述。 每个 自动恢复选项或恢复选项包括四个属性: 一个恢复消息 ( recovery message ) 、 一个访 问组( access group )、一个†灰复类型 ( recovery type ) ,以及一个可选的†灰复动作( recovery action )。
报警标识: 表示报警 ID , 将报警映射到一个数字标识, 可能为远程接口所需。 消息 (message ) : 用于日志记录或显示给操作员, 分为两种类型: 静态和动态。 1 ) 静态: 报警消息不会发生变化;
2 )动态: 报警消息包含依赖于运行时环境的信息, 通过在报警消息字串中插入标 记(Marker: "<MarkerName>" )来实现。在发送报警时,报警消息中 "<MarkerName>" 将会替换为当时的标记值。 可以通过两种方式实现映射: <MarkerName, ObjectName,
Figure imgf000022_0001
MarkerValue>。
严重等级 ( severity ) : 每个报警被赋予一个整型的严重性等级, 可用于报警客户 端对报警的过滤, 或是在 GUI ( Graphical User Interface, 图形用户界面)报警页面上 用不同颜色显示不同严重等级的报警。
自动恢复 ( autorecovery ) : 自动恢复是一个可选属性, 用于自动恢复。 若自动回 复属性非空, 在报警模块 400抛出报警时将自动执行恢复动作来清除报警。 当一个报 警被清除后, 将不再执行操作员选择的动作。 在使用自动恢复选项来建立系统恢复时, 需要特别注意包括自动恢复选项和一系列可供操作员选择的恢复选项的情况。 自动恢 复选项具有以下两个优点: 首先, 报警抛出后不需要用户干预: 例如报警只有一个系 统恢复选项, 或只有一个用户定义恢复选项时; 其次, 在进一步执行其他动作时, 需 要使系统处于一个安全状态: 通常自动恢复选项是用户定义恢复选项时。
恢复( recovery ) : —组报警恢复选项, 是一个或多个恢复对象的列表。 一个恢复 对象包含四个属性: 恢复消息 ( recovery message ) 、 访问组 ( access group ) 、 恢复类 型 ( recovery type ) 和恢复动作 ( recovery action ) 。
恢复消息 ( recovery message ) : 显示给操作员的恢复选项消息;
访问组( access group ) : 访问组可能用于 CTC端: 不同的操作员被分配不同的访 问组, 只能操作具有此访问组属性的报警恢复选项;
恢复类型 ( recovery type ) : 艮警恢复类型包括系统类型和用户自定义类型。 其中 系统类型包括放弃 ABORT、 重试 RETRY、 继续 CONTINUE和清除 CLEAR。 用户自 定义类型为 SER_ONLY。 于每个系统恢复类型, 均包括系统内建功能执行对应恢复类 型的恢复动作;
恢复动作 ( recovery action ) : 接受一个实现接口 Recovery Action接口的对象作为 恢复动作。
对于系统恢复类型, 恢复动作是可选的。 恢复动作和系统恢复类型组合使用可以 在执行内核系统 1000内建的恢复动作之前使内核系统 1000处于一个安全状态.
对于用户恢复类型, 恢复动作是必需的。 需要定义完整的报警恢复功能, 通过系 统恢复选项 (仅限于 ABORT、 RETRY, CONTINUE ) 来清除报警。
报警模块 400具有以下优点:
1 )每当内核系统 1000不能解决一个错误情况时, 报警模块 400用于通知操作员, 并让操作员决定如何处理;
2 ) 当某个状态发生, 不需要停止当前服务的执行, 但需要操作员对此状态有所了 解。
报警模块 400 包括发送单元, 当特定情况出现时利用发送单元发送报警。 报警模 块 400进一步包括监视单元, 当报警的状态或其某个恢复动作的状态发生变化时, 通 知监视单元。 例如: 当报警模块 400发送或清除一个报警, 开始或结束执行一个恢复 动作时, 通知监视单元。
当报警模块 400发送了一个报警, 发送对象将会被阻塞 (如果此报警为一个阻塞 报警) , 系统调用注册到此报警的客户的 update AlarmS tate()回调函数。 报警模块 400 的一个典型客户为监控模块 300 ,当报警模块 400发送一定数目的报警或发送某种类型 的报警时, 监控模块 300将执行特定的动作。 报警恢复动作的执行者, 即报警模块既 可以为远程客户端也可以为本地客户端。
本发明实施例提供的通用控制内核系统 1000进一步包括日志模块, 用于以日志的 形式记录所述通用控制内核系统 1000运行过程中的信息。 日志模块定义了日志文件包 含的信息, 用于过滤系统日志信息。 可以在运行时修改日志模块, 从而改变将要记录 的日志信息的数量和等级。
如图 10所示, 日志模块 500包括数据日志单元 510和系统日志单元 520。
数据日志单元 510 , 用于以第一预定周期记录内核系统 1000的数据和事件。 数据 日志是通用控制内核系统 1000的一种机制, 允许数据和事件形成日志并记录进文件, 从而提供有用的调试和性能跟踪信息给应用程序开发人员。 数据日志单元 510每隔预 定时间或当某个事件发生时, 将数据记录进日志文件。 记录的数据包括时间和 /或发生 的事件, 以及此时特定数据项的值。 部分数据日志会话可以并发执行, 根据不同的规 范收集不同的数据。
数据日志单元 510 收集数据并将其写入日志文件。 收集的数据内容和收集的时间 等信息包含在一个会话中。 每个会话包括收集描述, 其中收集描述包括数据描述, 数 据描述包括对 Dataltems的引用。 可以同时打开多个会话进行日志记录。
下面对数据日志单元 510中涉及的术语进行解释。
DataSpec: Dataltems的列表, 表示一起记录的数据, 指定 what to log。 例如, 一 个 DataSpec可以指定记录以下 Dataltems的值: 压力、 晶片传感器、 温度、 打开传感 器和阔门 1。
CollectionSpec: DataSpecs的歹' J表, 表示将 DataSpecs的列表基于相同的触发器一 起记录到文件中, 指定 when to log。 这些定义触发数据记录的触发器是时间间隔 (在 特定时间记录数据,称为时间触发)和条件(在条件满足时记录数据,称为事件触发)。 例如, 一个 CollectionSpec指定以 10s的时间间隔记录 DataSpecA中指定的 Dataltems。
Session: 一组 CollectionSpec, 表示将一组 CollectionSpec同时记录并记录到相同 目的地, 例如为一个文件) 。 在正常操作中, 多个 Sessions 可以同时打开, 将数据记 录到不同的文件中。 Session允许应用人员根据不同目的记录数据。 例如, 一个会话用 于应用程序开发, 达到调试目的。 另一个会话用于在应用程序部署过程中记录数据, 达到跟踪数据目 的。 这两个会话可以使用部分相同的 CollectionSpecs , 而其他 CollectionSpecs 则是针对不同目的所特有的。 应用人员可以创建一个会话收集绘图数 据, 另一个会话收集存档数据, 第三个会话收集调试数据。
DataLogDestination: 表示目的地信息, 这个目的地信息被 StorageManager管理。 当 前 仅 有 的 DataLogDestination 和 StorageManager 类 是 DataLogFile 和 TextS torageManager类。
DataLogFile: 抽象类 DataLogDestination的子类。 一个 DataLogFile对象接收数据, 并将数据写入一个永久的文本文件。
TextStorageManager: 抽象类 StorageManager的子类。 抽象类 StorageManager用于 基于文本的存储管理, 定义了所有日志文件的目录结构。
数据日志单元 510为了记录数据日志, 必须定义 Session, 并将其链接到一个目的 地。例如一个数据日志文件(文本文件),并调用 Session.open方法打开(激活)Session。 当 Session打开时, 没有内容记录进目的地, 直到一个 CollectionSpec中的一个触发器 发生。 一个触发器可以为一个条件, 或者一个时间间隔。 当一个触发器发生时, 关于 触发器以及这个 CollectionSpec关联的所有 Dataltems的信息都被记录到目的地。
数据日志单元 510的数据日志记录规则为:
Dataltems: 一个 Dataltem可以用在多个 DataSpec, 而不管 DataSpec是否锁定。
DataSpecs: 一个 DataSpec可以用在多个 CollectionSpec中, 而不管 CollectionSpec 是否被激活。 换言之, 一个 DataSpec可以同时被多个 Session上锁。
CollectionSpecs: 一个 CollectionSpec不能在多个 Session 中使用。 换言之, 一个 CollectionSpec不能同时在多个 Session中处于激活状态。
DataLogFiles: 一殳一个 DataLogFile是一个 Session的唯一属性。 DataLogFiles不 用于在多个 Sessions间共享。 一个 DataLogFile不能连接到多个打开的 Session。
数据日志单元 510可以釆用以下两种日志记录形式: 基于事件的日志记录和周期 日志记录。 其中, 基于事件的日志记录 (Event-based logging ) 是通过指定一个或多个 条件触发器触发。 周期日志记录( Periodic logging )需要指定一个时间间隔的触发器触 发。
( 1 )创建 DataSpec: 使用 DataSpec.addToData()方法来添加 Dataltems。
( 2 )创建 CollectionSpec: 具有如下属性:
( 2.1 ) 1个或多个 DataSpec对象: 使用 CollectionSpec. addToDataSpecs()方法来添 力口 DataSpec对象。
( 2.2 ) 1 个或多个触发器: 触发器的条件为使用 addToTriggers()方法添加。 时间 间隔触发器使用 setlntervalO方法。
( 2.3 )数据釆集方式:
同步模式: CollectionSpec将其 attach到其所包含的 Dataltem上, 以保证其所釆集 的数据均为 good。 对 Dataltem数值的读取总是放在触发器所在线程中。 同步模式推荐 用于使用一个具有较短时间间隔的时间间隔触发器, 或者是频繁发生的条件触发器。
异步模式: CollectionSpec使用智能模式釆集数据,以保证所收集的数据总为 good。 对 Dataltem数值的读取总是放在一个单独的线程中, 以避免阻塞触发器所在线程。 异 步模式推荐用于一个不频繁发生的时间间隔触发器。
缺省模式: 由内核系统 1000决定使用哪种模式。 当时间间隔小于或等于 10秒时 使用同步模式, 当时间间隔大于 10秒或没有时间间隔触发器时使用异步模式。 在内核 系统 1000中, 数据日志单元 510推荐釆用缺省模式。
( 3 ) 建立 DataLogFile: 数据文件的名称自动由 DataLogFile对象创建, 需要使用 DataLogFile对象的命名模板。 有两种形式的命名模板:
( 3.1 ) 系统内建模板: root/<mmmdd>/<namexnumber>.<extension> , 如 dlog/May21/dlog2.txt0 每当打开一个 Session时, 一个使用当前日期和下一个序 号的新数据文件被创建。 如果是当天的第一个数据文件, number为 1。
root: 由 TextStorageManager.setRootDlogDirectory()4旨定。
mmmdd: 表示月和日, 由系统提供, 月用英文名称表示。
name: 由 DataLogFile.setNameTemplate()指定。
number: 由系统提供的序列号。
extension: 可选的, 如果使用 setNameTemplate()方法时指定了一个扩展名。
( 3.2 )用户自定义模板:如果内核系统 1000提供的模版不适合,可以自定义模版。 自定义模版需要创建 core包中的 LogFile并设置相应属性,并在实例化一个 DataLogFile 对象时作为构造函数参数传递。
( 4 )创建一个会话:
( 4.1 ) 一个或多个 CollectionSpecs: 使用 addToSpecs()方法添加。
( 4.2 ) 一个 DataLogDestination对象, 以及对 StorageManager对象的引用, 以确 定数据日志文件的文件名和路径。 如果没有设置 StorageManager的数据日志目录, 则 缺省目录是 "当前目录 /dlog/"
( 5 )打开数据日志记录功能: 内核系统 1000中同时可以有多个 Session处于打开 状态。
使用 Session.open方法打开一个会话, 必须满足以下条件:
( 5.1 ) Session所包含的 CollectionSpecs不能处于活跃状态, 即不能已经使用; ( 5.2 ) 关联的 DataLogDestination不能已经使用, 即不能有其他已打开的 Session 连接到这个目的地;
当一个 Session 打开时, Session 被认为是打开的 ( "open" ) 、 Session 包含的 CollectionSpecs被认为是活跃的 ( "active" ) 、 CollectionSpecs包含的 DataSpecs被认为 是上锁的 ( "locked" )
当一个条件触发器发生时, 以下数据被写入数据日志文件中: 触发的条件的记录 以及条件触发的时间; 相应 CollectionSpec 包含的所有 DataSpecs 中的所有 Dataltems 的数值, 触发条件中涉及的 Dataltems不被记录, 除非其包含在一个 DataSpec中。
当时间间隔到时 (时间间隔触发器触发时) , 以下数据被写入数据日志文件中: 数据被收集的时间和相应 CollectionSpec包含的所有 DataSpecs中的所有 Dataltems的 数值。
( 6 ) 关闭数据日志记录功能: 使用 Session.close方法关闭一个会话。
( 7 )修改数据日志设置:
( 7.1 ) 如果一个 DataSpec上锁了, 不能向这个 DataSpec添加或从这个 DataSpec 中移除 Dataltems。
( 7.2 )如果一个 CollectionSpec是活跃的, 不能向这个 CollectionSpec添加或从这 个 CollectionSpec中移除 DataSpecs。 但是, 可以修改时间间隔和数据釆集模式, 以及 添加或删除触发器。
( 7.3 )如果一个 Session已经打开, 不能添加或删除 CollectionSpecs , 或改变目的 地。
系统日志单元 520 用于以第二预定周期记录内核系统 1000 的调用信息和跟踪信 息。 系统日志是通用控制内核系统 1000的一种机制, 允许某个特定范围内的调试和性 能跟踪的有用日志信息自动产生。 这些信息主要包括 ControlObject服务调用和完成情 况的信息, 以及数据项的值发生变化时、 互锁陷入时、 报警发出或清除报警时的相关 信息。 开发人员也可以在系统日志单元 520 中插入自定义的日志信息, 从而在运行时 记录进日志文件。
系统日志单元 520 允许用户获取已经建立在通用控制内核系统 1000 中的跟踪信 息, 也可以额外包括和捕获在通用控制内核系统 1000中的跟踪消息。 当系统日志单元 520 执行时, 捕捉到的消息被写入到一个目的地 ( 日志文件或通用控制内核系统控制 台) 。 系统日志单元 520可以提供基于日志设置打开或关闭特定类型日志信息的纪录。 这些设置应用于每个日志目的地, 可以在配置时设置, 也可以在运行时修改。
系统日志单元 520 可以用于特定需求控制应用程序的开发阶段和后开发 (使用或 生产)阶段。 在开发阶段, 系统日志是一个有用的应用程序调试工具。 在后运行时(应 用程序配置过程结束之后) 阶段, 系统日志消息一般写入到文件, 而非控制台, 这些 日志文件收集的数据将用于诊断、 调试, 以及问题的定位和解决。 需要恰当设置不同 主题(针对默认组) 的 verbosity, 以不致于严重影响系统性能, 可考虑三个阶段: 一 般开发阶段、 配置出现问题时的开发阶段 (因为配置是应用程序的一个重要功能) , 以及生产阶段。
当内核系统 1000 启动时, 通用控制内核系统配置文件中设置的所有目的地将自 动激活用于系统日志记录。 同时, 两个缺省文件以及一个可选的缺省日志文件被创建 和激活, 控制台也被设置为一个活跃的目的地。
下面对系统日志单元 520中涉及的术语进行说明。
归档协议: 日志文件命名规则包括属性 appendToExisting、 template、 sizeLimit和 history, 以及 defaultWildCard。 日志文件命名规则规定打开文件的文件名, 以及在关闭 一个文件后, 如何打开下一个文件。
通配符(wild cards ) : 用于目录名和文件名, '%s' 或 '%S' 除外, 只能用于模 板文件名部分。
如果当前文件 log , 已有文件 log2、 log3 , 则关闭当前文件打开一个新文件后, 新 文件为 log , 其他文件依次更名为 log2、 log3和 log4。 如果此时 history设置为 4, 则将 删除最旧的日志文件 log4。 如果系统日志单元 520模板是 "logging/ y/ m/ d" , 并 且今天是 2005-5-5 , 则打开的第一个文件为 "logging/05/05/05" 。 自动写盘属性 autoFlush: 自动写盘属性 autoFlush与归档协议无关, 但它表示日志 信息是否写入目的地, 而非暂时存放在内存緩冲区中。 如果这个属性设置为真, 则跟 踪信息一经产生就会就会写到目标文件中, 而不是写到内存緩冲区中。
消息过滤机制: 每一个消息都有一个 Topic, Verbosity和关联一个 Object。 消息过 滤机制使用 Topic, Verbosity和 Group的概念过滤跟踪信息。 过滤机制可用一个矩阵 表示, 行代表 Topic, 列代表 Group , 矩阵元素代表 Verbosity。 当产生一个跟踪消息时, 首先定位到列, 在定位到行(Topic ) , 最后定位到相应矩阵元素。 如果在要求记录的 严重性等级之内, 则将跟踪消息进行记录, 否则舍弃。
本发明实施例提供的通用控制内核系统基于 Windows xp操作系统,釆用 JAVA实 现, 具有如下优点:
1 )通过管理系统的并行性和资源互锁, 提供统一的接口给应用程序中不同类型的 I/O , 以及一个进行错误处理和错误恢复的省时框架, 解决控制应用程序开发中费时、 易错的问题。
2 )提供支持软件互锁、 数据日志、通信功能的强大应用程序编程接口。 具体而言, 本发明实施例的通用控制内核系统的互锁 API ( Application Programming Interface,应用 程序编程接口) 保证人员和设备的安全。 Recipe API 能够存储和检索工艺过程参数。 数据日志 API能够快速获得运行时的工艺过程参数信息。
3 )通过灵活的配置策略实现组件开发和软件复用。 本发明实施例的通用控制内核 系统配置策略可以方便同一应用程序内以及不同应用程序之间的代码重用。 并且, 通 用控制内核系统配置文件允许软件开发人员配置组件的属性, 虽然上述属性在不同应 用程序中会有所不同, 但不需重新编译。
4 )提供必要的工具支持快速开发和调试应用程序。 本发明实施例的通用控制内核 系统通用控制内核系统提供了应用程序调试和性能跟踪的两个强大功能, 包括系统日 志服务和控制台接口, 其中系统日志服务包括生成系统操作记录, 控制台接口包括查 看和修改应用程序运行时的通用控制内核系统环境状态。
本发明实施例的通用控制内核系统可以使开发人员能够快速开发健壮的控制应用 程序, 通过灵活的配置策略实现组件开发和软件复用, 还可以提供必要的工具支持快 速开发和调试应用程序。
在本说明书的描述中, 参考术语 "一个实施例" 、 "一些实施例" 、 "示例" 、 "具体示例" 、 或 "一些示例" 等的描述意指结合该实施例或示例描述的具体特征、 结构、 材料或者特点包含于本发明的至少一个实施例或示例中。 在本说明书中, 对上 述术语的示意性表述不一定指的是相同的实施例或示例。 而且, 描述的具体特征、 结 构、 材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
尽管已经示出和描述了本发明的实施例, 对于本领域的普通技术人员而言, 可以 理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、 修改、 替换和变型, 本发明的范围由所附权利要求及其等同限定。

Claims

权利要求书
1、 一种通用控制内核系统, 所述通用控制内核系统用于控制硬件设备的动作, 包 括:
配置模块, 所述配置模块用于在所述内核系统启动时, 将对象实例化并将实例化 后的对象注册到初始名称空间以创建所述初始名称空间的树结构, 对所述初始名称空 间树结构中的实例化后的对象进行初始化, 其中, 所述实例化后的对象映射所述硬件 设备的动作;
控制模块, 所述控制模块用于根据配置模块创建的初始名称空间树结构来控制等 级高的控制单元调用并执行等级低的控制单元的服务, 其中所述控制单元包括等级由 低到高的物理层控制单元、 功能层控制单元和操作层控制单元, 且所述控制单元还包 括与所述操作层同等级别的维护层控制单元; 和
监控模块, 所述监控模块用于监控所述通用控制内核系统的状态。
2、 如权利要求 1所述的通用控制内核系统, 其中, 所述配置模块包括: 配置文件解析单元, 所述配置文件解析单元分析配置文件, 根据所述配置文件的 信息将所述对象实例化;
注册单元, 所述注册单元用于将实例化后的对象注册至初始名称空间以创建初始 名称空间的树结构, 所述初始名称空间的树结构为实例化后的对象的名称的集合; 初始化单元, 所述初始化单元按照优先搜索算法遍历所述初始名称空间的树结构, 并根据所述配置文件的信息对注册后的实例化后的对象进行初始化。
3、 如权利要求 2所述的通用控制内核系统, 其中, 所述注册单元还用于创建实例 化后的对象的别名, 其中每个实例化后的对象对应一个或多个别名。
4、 如权利要求 3所述的通用控制内核系统, 其中, 通过以下两种方式之一访问实 例化后的对象:
1 ) 通过引用名称空间的树结构中的名称访问与所述名称对应的实例化后的对象;
2 ) 通过引用所述别名访问与所述别名对应的实例化后的对象。
5、 如权利要求 1所述的通用控制内核系统, 其中所述物理层控制单元读取所述硬 件设备中的数据项, 并向所述硬件设备提供服务;
所述功能层控制单元通过调用所述物理层控制单元的服务以向所述操作层控制单 元提供服务;
所述操作层控制单元通过调用所述功能层控制单元的服务以提供操作层的服务; 和
所述维护层控制单元调用功能层控制单元的服务并利用功能层控制单元来调用物 理层控制单元的服务, 从而实现对所述物理层控制单元和功能层控制单元的故障定位。
6、 如权利要求 5所述的通用控制内核系统, 其中, 所述物理层控制单元进一步包 括 EPICS协议通信部件,所述 EPICS协议通信部件利用 EPICS协议与所述硬件设备进 行通信以交换数据项, 包括读取所述硬件设备中的状态值, 并向所述硬件设备发送设 置点。
7、 如权利要求 6所述的通用控制内核系统, 其中,
根据承载数据的类型将所述数据项分为离散型、 连续型和字符串型; 和
根据读 /写操作类型将所述数据项分为只读型和读 /写型。
8、 如权利要求 7所述的通用控制内核系统, 其中, 利用互锁检查所述状态值和设 置点, 仅在设定条件满足时允许修改控制读取的所述硬件设备的状态值或写入所述硬 件设备的设置点。
9、 如权利要求 8所述的通用控制内核系统, 其中, 设置点互锁包括:
读写数据项, 所述读写数据项为从所述硬件设备读取的数据项或从所述硬件设备 写入的数据项;
校验符, 所述校验符用于判断是否允许所述读写数据项的修改; 和
报警, 所述报警用于在否决所述读写数据项的修改时, 抛出阻塞式报警。
10、 如权利要求 9所述的通用控制内核系统, 其中, 所述报警提供三个恢复动作: 放弃、 重试和继续执行。
11、 如权利要求 9所述的通用控制内核系统, 其中, 设置点互锁还包括触发器和 限定符,
所述触发器用于设置修改所述读写数据项的条件, 所述限定符用于判断是否需要 验证所述校验符的条件。
12、 如权利要求 1 所述的通用控制内核系统, 其中, 所述监控模块通过取值互锁 监控所述通用控制内核系统的安全状态, 并在所述内核系统的不安全条件触发时进行 矫正, 其中所述取值互锁包括:
触发器, 所述触发器用于设置所述内核系统的不安全条件;
行为列表, 所述行为列表包括触发所述不安全条件后执行的动作, 其中当所述行 为列表包括多个动作时, 逐个执行所述多个动作。
13、 如权利要求 12所述的通用控制内核系统, 其中, 所述取值互锁还包括: 报警, 所述报警用于提供非阻塞式报警。
14、 如权利要求 6所述的通用控制内核系统, 其中, 等级高的控制单元调用并执 行等级低的控制单元的服务包括如下步骤:
所述等级高的控制单元向所述等级低的控制单元发送服务器锁请求或服务锁请求 以获得服务器锁或服务锁, 对请求的服务器锁或服务锁的参数进行初始化, 向所述等 级低的控制单元发送运行锁请求以获得运行锁;
所述等级高的控制单元在获得所述运行锁后, 调用并执行与所述运行锁对应的等 级低的控制单元的服务, 并在服务完成后, 释放所述运行锁; 所述等级高的控制单元释放所述服务器锁或服务锁,
其中, 所述服务器锁请求用于请求获得所述服务器锁, 所述等级高的控制单元利 用所述服务器锁向所述等级低的控制单元调用服务, 并锁定所述等级低的控制单元; 所述服务锁请求用于请求获得所述服务锁, 所述等级高的控制单元利用所述服务 锁向所述等级低的控制单元调用指定服务, 并锁定对所述指定服务的调用;
所述运行锁请求用于请求获得所述运行锁, 所述等级高的控制单元利用所述运行 锁执行所述指定服务, 并锁定所述指定服务的执行。
15、 如权利要求 14所述的通用控制内核系统, 其中, 所述等级低的控制单元在收 到来自所述等级高的控制单元的服务器锁请求或服务锁请求时,
如果当前没有活跃的所述服务器锁或服务锁或运行锁时, 则所述等级低的控制单 元向所述等级高的控制单元提供服务器锁;
如果当前没有活跃的所述服务器锁或服务锁或运行锁, 或者当前服务锁与所述服 务锁请求的服务锁执行的服务相同, 则所述等级低的控制单元向所述等级高的控制单 元提供服务锁。
16、 如权利要求 14所述的通用控制内核系统, 其中, 所述等级高的控制单元请求 的服务当前未执行, 且符合以下任一种条件时, 所述等级低的控制单元向所述等级高 的控制单元提供运行锁,
1 ) 没有活跃的服务器锁、 服务锁或运行锁;
2 ) 仅有一个针对当前请求的服务的活跃的服务锁; 和
3 ) 仅有一个所述等级高的控制单元具有的服务器锁。
17、 如权利要求 14所述的通用控制内核系统, 其中, 所述等级低的控制单元将未 被提供的服务器锁、 服务锁或运行锁的服务器锁请求、 服务锁请求或运行锁请求按照 到达的先后顺序放置在锁请求等待队列中。
18、 如权利要求 17所述的通用控制内核系统, 其中, 所述等级低的控制单元在所 述等级高的控制单元释放所述运行锁后, 检查所述锁请求等待队列,
如果等级高的控制单元保持服务器锁, 则所述等级低的控制单元执行与等级高的 控制单元的下一个运行锁请求对应的服务;
如果等级低的控制单元保持着服务锁, 则所述等级低的控制单元执行与下一个运 行锁请求对应的服务;
如果当前没有活跃的服务器锁、 服务锁或运行锁, 且下一个请求为服务器锁请求, 则对该服务器锁请求提供服务器锁, 并执行拥有该服务器锁的等级高的控制单元的运 行锁请求对应的服务;
如果当前没有活跃的服务器锁、 服务锁或运行锁, 且下一个请求为服务锁请求, 则对该服务锁请求提供服务锁, 并执行所有等级高的控制单元与所述服务锁请求对应 的服务; 如果当前没有活跃的服务器锁、 服务锁或运行锁, 且下一个请求为运行锁请求, 则所述等级低的控制单元执行与所述运行锁请求对应的服务。
19、 如权利要求 1 所述的通用控制内核系统, 其中, 进一步包括报警模块, 用于 在所述通用控制内核系统发生异常时, 发出报警。
20、 如权利要求 19所述的通用控制内核系统, 其中, 所述报警模块发出阻塞式报 警或非阻塞式报警,
所报警模块在抛出所述阻塞式报警后将会阻塞导致通用控制内核系统的异常的对 象所在的线程直至清除触发所述阻塞式报警的原因;
所述报警模块在抛出所述非阻塞式报警后, 导致通用控制内核系统的异常的对象 所在线程继续运行。
21、 如权利要求 1 所述的通用控制内核系统, 其中, 进一步包括日志模块, 用于 以日志的形式记录所述内核系统运行过程中的信息, 其中, 所述日志模块包括:
数据日志单元, 所述数据日志单元用于以第一预定周期记录所述内核系统的数据 和事件; 和
系统日志单元, 所述系统日志单元用于以第二预定周期记录所述内核系统的调用 信息和跟踪信息。
22、 如权利要求 21所述的通用控制内核系统, 其中, 所述数据日志单元釆用的日 志记录形式包括:
基于事件的日志记录, 所述基于事件的日志记录由一个或多个条件触发器触发; 和
基于周期日志记录, 所述周期日志记录由基于时间间隔的触发器触发。
23、 如权利要求 21所述的通用控制内核系统, 其中, 所述系统日志单元记录所述 数据项的修改、 所述互锁的信息、 所述报警发出的信息以及清除所述报警的信息。
PCT/CN2011/081932 2011-05-10 2011-11-08 一种通用控制内核系统 WO2012151885A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110120570.0 2011-05-10
CN201110120570.0A CN102169436B (zh) 2011-05-10 2011-05-10 用于集成电路制造设备的通用控制内核系统

Publications (1)

Publication Number Publication Date
WO2012151885A1 true WO2012151885A1 (zh) 2012-11-15

Family

ID=44490603

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/081932 WO2012151885A1 (zh) 2011-05-10 2011-11-08 一种通用控制内核系统

Country Status (2)

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

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169436B (zh) * 2011-05-10 2014-04-09 清华大学 用于集成电路制造设备的通用控制内核系统
CN103632331B (zh) * 2013-11-26 2016-06-29 福建四创软件有限公司 一种可配置插件式的数据服务方法
CN104948465A (zh) * 2014-03-26 2015-09-30 北京北方微电子基地设备工艺研究中心有限责任公司 共享干泵的处理方法及系统
CN106919341B (zh) * 2015-12-28 2020-04-21 成都华为技术有限公司 一种下发i/o的方法及装置
CN114485874A (zh) * 2021-12-22 2022-05-13 航天信息股份有限公司 一种基于粮库车牌识别的自动称重方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101311902A (zh) * 2007-05-22 2008-11-26 上海宇梦通信科技有限公司 关联多实例状态机系统及其实现方法
CN101776996A (zh) * 2010-01-26 2010-07-14 上海市共进通信技术有限公司 通信系统中基于对象的配置管理系统的构建实现方法
CN102017687A (zh) * 2007-11-15 2011-04-13 华为技术有限公司 终端设备管理树管理对象实例化的方法及设备
CN102169436A (zh) * 2011-05-10 2011-08-31 清华大学 用于集成电路制造设备的通用控制内核系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004512610A (ja) * 2000-10-16 2004-04-22 ゴー アヘッド ソフトウェア インコーポレイテッド ネットワーク化されたシステムの高アベイラビリティを維持する技法
CN1300699C (zh) * 2004-09-23 2007-02-14 上海交通大学 并行程序可视化调试方法
CN101299758B (zh) * 2008-05-21 2011-05-11 网御神州科技(北京)有限公司 一种大规模事件处理的规则群组系统及处理方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101311902A (zh) * 2007-05-22 2008-11-26 上海宇梦通信科技有限公司 关联多实例状态机系统及其实现方法
CN102017687A (zh) * 2007-11-15 2011-04-13 华为技术有限公司 终端设备管理树管理对象实例化的方法及设备
CN101776996A (zh) * 2010-01-26 2010-07-14 上海市共进通信技术有限公司 通信系统中基于对象的配置管理系统的构建实现方法
CN102169436A (zh) * 2011-05-10 2011-08-31 清华大学 用于集成电路制造设备的通用控制内核系统

Also Published As

Publication number Publication date
CN102169436B (zh) 2014-04-09
CN102169436A (zh) 2011-08-31

Similar Documents

Publication Publication Date Title
US8555238B2 (en) Programming and development infrastructure for an autonomic element
US8788569B2 (en) Server computer system running versions of an application simultaneously
US8095823B2 (en) Server computer component
US7779419B2 (en) Method and apparatus for creating templates
US6742141B1 (en) System for automated problem detection, diagnosis, and resolution in a software driven system
US6314434B1 (en) Structured data management system and computer-readable method for storing structured data management program
Niese An integrated approach to testing complex systems.
CN100520721C (zh) 虚拟化窗口信息的方法和设备
US8984534B2 (en) Interfacing between a receiving component of a server application and a remote application
US8464279B2 (en) Domain event correlation
US20090172636A1 (en) Interactive development tool and debugger for web services
US9336020B1 (en) Workflows with API idiosyncrasy translation layers
WO2012151885A1 (zh) 一种通用控制内核系统
US7386762B1 (en) Persistent context-based behavior injection or testing of a computing system
Cuadrado et al. An autonomous engine for services configuration and deployment
Kinny The Agentis Agent InteractionModel
Keller et al. Towards a CIM schema for runtime application management
Konstantinou Towards autonomic networks
CA2543938C (en) Programming and development infrastructure for an autonomic element
US7743008B2 (en) Adaptive management method with workflow control
Akşit et al. Guideliness for Identifying Obstacles When Composing Distributed Systems from Components
Jorelid J2EE frontend technologies: A programmer's guide to Servlets, JavaServer Pages, and enterprise JavaBeans
Fossa Interactive configuration management for distributed systems
Mosby et al. Mastering system center configuration manager 2007 R2
Stuckenholz et al. Compatible component upgrades through smart component swapping

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11865288

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 10/04/2014)

122 Ep: pct application non-entry in european phase

Ref document number: 11865288

Country of ref document: EP

Kind code of ref document: A1