可编程控制器的数据库系统--中英文翻译资料.doc_第1页
可编程控制器的数据库系统--中英文翻译资料.doc_第2页
可编程控制器的数据库系统--中英文翻译资料.doc_第3页
可编程控制器的数据库系统--中英文翻译资料.doc_第4页
可编程控制器的数据库系统--中英文翻译资料.doc_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Database Systems for Programmable Logic ControllersIn this paper, we identify the database issues associated with programmable logic controllers (PLC), special-purpose computers used in scientific and industrial applications, e.g. in factories in manufacturing environments. We propose as a PLC database system a single-user,real-time, scalable main-memory-only relational database system with a two-level architecture having historical data modeling and manipulation capabilities, and query processing techniques incorporating time- and/or error-constrained query evaluation. We revise the ladder logic language, the most common PLC language, to incorporate data manipulation language instructions. We add a separate time component into the PLC processor scan time to handle database updates, backup, integrity enforcement and data archival issues. 1. IntroductionA programmable logic controller (PLC) is a special-purpose computer used within real-time scientific computing systems, and industrial control systems, say, the automated control of a factorys machinery - the running example used in this paper. This paper is a position paper that proposes a PLC database system and discusses its features. In doing so, we touch bases with a number of basic database topics, and, thus, frequently refer to other work for details. PLCs are mostly used in manufacturing environments - hence, the choice of our running example. However, PLCs are also used in scientific applications for signal data gathering and preliminary data processing. Thus, we think that for some scientific applications, a PLC database may also serve as a local/transient part of a larger scientific database.With the rapid advances in computer hardware and falling memory prices, in recent years, the capabilities of the new PLCs in the marketplace have been increasing dramatically. This paper is a position paper that argues that a PLC software can now contain a database system to greatly increase its functionality. We propose the architecture in Figure 1 as the architecture of an environment where real-time data gathering (from multiple sensors) and real-time data manipulation takes place.We now list the advantages of having a database system directly inside a PLC.(1)Data Modeling Techniques : The input and output buffers represent a rather unorganized transient model of the real world, and hence, carl be modeled better using the traditional data modeling techniques of databases.(2) Historical Databases : PLCs routinely deal with different versions of data over time. Therefore, historical data modeling techniques as well as historical data manipulation techniques can replace the ad hoc ways of manipulating historical data in PLCs.(3) User-Friendly Interfaces : Presently in the marketplace, the PLC software and industrial terminals allow a limited display of messages and variable-data information in memory. For example, the contact histogram function displays the on/off history of a specific main memory.(4) Handling Large Volumes of Data : With the added capabilities of a database and a query language, the PLC may analyze much larger volumes of data.(5) Data Reduction and Compaction at the PLC Level : Presently, for further analysis or simply due to various regulations, data collected by PLCs get transmitted and stored into a host computer file using an architecture shown.Since the present PLCs cannot satisfactorily analyze most data, they simply transmit data to the host computer. In some scientific experiments and applications, the data gathered is so large that arguments have been raised for processing the data on-the-fly during the execution of an experiment/transaction SSDB 86(a)Real-Time Database : The data in the input buffer must be scanned within reasonably short real-time intervals ranging from microseconds to seconds. Therefore,responses to queries must be guaranteed to be less than a certain realtime time bound, almost always less than 5 to 10 seconds.(b)Main Memory Database : Microseconds/seconds query response restrictions necessitate main-memory-only databases.(c) Scalable Database : Once the environment of a PLC and the requirements of the associated application program are determined, the possible query types to the database stay fixed for a reasonably long period of time. Since the response time of queries is of utmost importance, the DBMS should be scaled so that only the needed routines/functions (e.g., access methods, data structures, etc.) are incorporated.In section 2, we discuss the general characteristics PLCs, and briefly present the ladder logic language. Section 3 discusses the features of the proposed database system for PLCs.In general, the PLC hardware is mostly custom-built with occasional off-the-shelf hardware, and consists of a CPU (or multiple CPUs), main memory, an industrial terminal, and high- and medium-speed data communications hardware. The size of the main memory ranges from 16K bytes (of 5 to 10 years ago) to 8M bytes (of the present time).Although the CPU has an instruction set similar to those found in CPUs of 16-bit and 32-bit machines, it is especially equipped with fast bit manipulation instructions. The industrial terminal comes with a special keyboard to make the programming of the PLC easier and/or to intervene with the application program.The PLC software consists of an operating system (ranging from a very simplistic monitor (of ten years ago) to a sophisticated real-time operating system (of the recent time), high-speed communications software for communicating with I/O processors,medium-speed communications software to the industrial terminal and to other intelligent devices.Both general-purpose computers and PLCs are used for industrial control Star 87.However, they differ in the programming languages that they use, environmental specifications, and their user types. PLCs are rugged, and work in hostile environments with no special climate controls, tolerating extremes of temperature (60 C), humidity (95%) and air contamination. Users of PLCs include the original programmers of the application programs, as well as plant electricians and maintenance personnel, who are accustomed to relay-type controlling environments.A rung is an ordered set of PLC instructions drawn on a single line. Instructions on a rung are classified as input instructions (those that monitor the input buffer) and output instructions (those that set the output buffer), and are executed from left to right, sequentially (Please see figure 4). A PLC application program consists of a main program and a set of subroutines, each of which containing an ordered set of rungs。To summarize, the application programmer deals with actual (realtime) clock times, and needs to have precise estimates for program scan times and I/O scan times. For time estimations, the PLC manufacturers supply information such as 4 mseconds for 1000 ladder logic instructions, and 1 mseconds for copying 256 words into an input buffer during the I/O scan. In most applications, the processor scan time is kept below 10 seconds.Thus, database manipulation instructions also need to have precise time limits available to (or set by) users.2. ArchitectureWe propose a two-level, single-user database system architecture as shown in figure 6. We have omitted from our architecture the external model of the traditional database architecture not because PLCs are not powerful, but because concurrently running application programs using different views create problems in accurately estimating the application program scan times. That is, in a multitasking environment where tasks compete for the resources such as database relations and communication lines, deciding a single top-to bottom execution time of a task in actual time is rather difficult (if at all possible).As far as the hardware computing power is concerned, the present day PLCs are as powerful as personal computers (and, indeed, in some recent products,PLCs are personal computers), and can certainly support multiple industrial terminals and data sharing among the application programs.3. Data Modeling IssuesThe traditional data modeling techniques directly apply to PLC databases. There is no reason why, say, the Entity-Relationship Model Chen 76 of the data in the PLC database cannot be designed. All the well-known advantages of data modeling ToeF 82 directly carry over to the PLC database environment, and will not be elaborated here. As for the conceptual model of our prototype effort, we have chosen the relational model. The PLC environment naturally deals with historical data, e.g., the last reading of a grinding machine sensor, its value yesterday, etc. Again, there are various historical data modeling approaches SnoA 85 in the literature and, theoretically, any one of them is acceptable.Example. Consider a set of furnaces that produce high-precision airplane parts. There are two entity relations, FURNACE and PART, and one time-varying relationship relation PRODUCES as described in figure 7. Please note that PRODUCES relation has tuple timestamping with BEGIN-TIME and END-TIME attributes.4. DBMS IssuesThere are a number of issues that need to be resolved in a time-constrained, single user DBMS environment. These are(a) Data Archival.(b) Database Backup.(c) Database Integrity enforcement.5. Query Processing IssuesThe conventional database management systems (DBMS) do not have the capability of dynamically meeting the time constraints when the amount of data is too large to process within a given time quota. Our approach is, for a given time quota, to take an appropriate amount of sample data such that the set of sampled data is guaranteed to be processible by the DBMS within the given.Some basic PLC instructions have also been extended to increase their functionality.For example, we have extended the examine logic switch instructions, the Examine Input Closed (XIC) and the Examine Input Open (XIO) AB 84, AB 85, to test the logical value of a propositional calculus formula, rather than testing a bit value corresponding to the condition of a physical I/O. An examine F instruction causes the formula F to be evaluated and the role value is then examined as in the basic examine instructions. In general, the formula F may contain a constant, a variable, a component of a tuple being scanned by the pointer, and fiE) where f is an aggregate function and E is a relational algebra expression. The functionality of the PLC Timer and Counter instructions have also been enhanced. Usually conditioned by examine instructions, timers and counters keep track of timed intervals or events; the number of timed intervals or events to be counted is set in the preset value variables AB 85, AB 84. With the introduction of a time dimension into the database, events and intervals can also be counted using database queries.6 .Query Processing IssuesThe conventional database management systems (DBMS) do not have the capability of dynamically meeting the time constraints when the amount of data is too large to process within a given time quota. Our approach is, for a given time quota, to take an appropriate amount of sample data such that the set of sampled data is guaranteed to be processible by the DBMS within the given time quota, and, exact time-cost formulas can be derived.Clearly, the more stages the query processor goes through, the more overhead is involved in the run-time estimation approach. This implies that, at each stage, as large an amount of time as possible should be allocated to reduce the number of stages. On the other hand, allocating large amounts of time has a higher risk of overspending the time quota and may end up wasting a large amount of time, especially in a hard time constrained environment AbGM 88, StZa 88. The hard time constrained environments denote those environments where overspending the time quota is strictly not allowed. Therefore, when overspending happens, the query has to be aborted prematurely and the amount of time used in the last stage is considered wasted.7.Other IssuesThe issue of incomplete information in the PLC database is also being investigated.Quite often, the sensors give incomplete information, usually a range for a reading. On those occasions, the incomplete data is only known to be within some range of values.We represent an incomplete data item as an interval which contains the unknown value.We have finished the implementation of the first version of a PLC database -Liu89 having some of the features summarized in section 3. The system has been developed on SUN workstations using the C language. We are planning to transport it into a PLC, and evaluate its performance.ReferencesAB84 PLC-3 Programmable Controller Programming Manual, Allen-Bradley Co., 1984.AB85 PLC-5/15 Programmable Controller Processor Manual, Allen-Bradley Co., 1985.Chri83 Christodoulakis, S., Estimating Record Selectivities, Information Systems,Vol 8, 1983.HP88 Hewlett-Packard Announcement of the HP RTDBS, Sept. 1988.Klug81 A. Klug, ABE - A Query Language for Constructing Aggregate-by-Example, 1st LBL Workshop on Statistical Database Management, Dec. 1981.Ullm88 J.D Ullman, Principles of Database and Knowledge-Base Systems, Computer Science Press, 1988.SSDB86 Panel on Scientific Databases, Third Int. Workshop on Statistical and SCientific Database Management, 1986.Star87 R.J. Staron, A Toolset to Develop Programmable Controller Systems,unpublished manuscript, Allen-Bradley Co., March 1987.可编程控制器的数据库系统在这篇文章中,我们确定一种在科学和工业上有特别应用目的的计算机可编程控制器( PLC )数据库系统的相关问题。例如:在制造环境的工厂里。 我们建议作为数据库系统的PLC的那些单用户,实时可调整的主记忆体。只有关系数据库系统有一个双级结构,具有历史数据建模和操作能力,查询处理技术。区别于阶梯逻辑语言,最常用的PLC语言,融合数据操作语言指令。 我们放入一个单独组成的PLC处理器的扫描时间,处理数据库更新,备份简单算法和数据档案等问题。1. 简介 可编程控制器( PLC )是一个专用计算机,用来实施科学计算系统和工业控制系统。在本文中举一个自动化控制工厂的机器运行的例子。本文是一份立场文章,提出了PLC的数据库系统,并讨论其特征。 这样,我们接触基地的一批基础数据库,因为经常提及其他工作细节而使内容很丰富。 可编程序控制器大多用于制造的环境,所以我们选择了运行的例子。不过,也有的可编程序控制器用在科学应用的信号数据采集和初步数据处理。 因此,我们认为对一些科学应用,可编程数据库,也可以作为本地较大的科学数据库的瞬态部分。现在我们列出有一个直接内置数据库系统的PLC的优点。( 1 )数据建模技术:输入和输出缓冲器是一个对真实世界的活动比较散乱的暂态模型,因此,卡尔建模法是传统数据库建模技术中比较好的方法。( 2)历史数据库:可编程序控制器一段时间内例行处理不同版本的数据。因此,历史数据建模技术以及历史数据操纵技术可以取代专案方式操纵的历史数据的可编程序控制器。( 3 )用户界面友好:目前在市场上买到的该PLC的软件。能有限的展示信息和可变数据信息存储。例如,接触直方图显示功能作为开机/关机史上的一个特定的主记忆体。(4)处理大量数据:由于一个数据库和查询语言的增加 ,PLC能够分析大容量数据。(5)在PLC水平上的数据压缩和压实:目前,由简单系统或是简单处理的的信息,收集的数据由PLC的传送并储存到主机的内存中。由于目前的可编程序控制器不能分析出令人满意的大部分的数据,而只是将数据传输到主机。在一些科学实验和应用中,需要收集到的数据是如此之大。现在还没有PLC的数据库和实时数据库的书面文献报道。然而,就在最近,惠普宣布了1989年获得惠普实时数据库惠普88 所用的内部结构。显然,结构图3的主机通信线路胜于结构。然而,个人电脑可能超载太多数据。现在我们开始讨论可编程数据库的性能。(1)实时数据库:相当短的“实时”一般从微秒到秒,数据的输入缓冲器必须经过扫描。 因此,对查询必须保证其将低于一定的“实时”。有时限的,几乎总是低于5至10秒 。(2)内存数据库:查询响应限制必需的主内存只有数据库。(3)分级数据库:一旦PLC的环境和要求的相关应用程序被决定,相当长的时期就留在一个固定的可能的查询类型的数据库中。由于响应时间的问题是至关重要的,该数据库应该加码,所需要常规职能(例如,检索方法,数据结构等)都可以纳入当中。接下来,我们讨论可编程序控制器的特点,并简要地介绍了梯形图语言。就第三节讨论的特点,提出了可编程控制器的数据库系统。2 PLC和梯形图语言的一般特征在一般情况下,PLC的硬件大多是量身订做的。偶尔现成的硬件,则由一个CPU (或多个中央处理器 ),内存,“产业终端”而组成高、中速数据通信硬件组成庞大的内存容量,16k字节( 5至10年前) 8兆字节( 当前时间) 。虽然CPU有一个指令集类似CPU的16位和32位机。它特别配备了快速位操作指令。工业终端是一个特殊键盘使编程的PLC容易融合应用程式。该PLC的软件包括操作系统(从一个非常简单的监控

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论