可编程控制器的数据库系统—中英文翻译资料大学论文

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Database Systems for Programmable Logic Con trollers
In this paper, we ide ntify the database issues associated with programmable logic con trollers (PLC), special-purpose computers used in scie ntific and in dustrial 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 databasesystem with a two-level architecture hav ing historical data modeli ng and man ipulatio n capabilities, and query process ing tech niq ues in corporati ng time- an d/or error-constrained query evaluation. We revise the ladder logic Ianguage, the most com mon PLC Ian guage, to in corporate data man ipulati on Ian guage in structi ons. We add a separate time comp onent into the PLC processor sca n time to han dle database updates, backup, in tegrity en forceme nt and data archival issues.
1. In troduct ion
A programmable logic controller (PLC) is a special-purpose computer used within real-time scie ntific comput ing systems, and in dustrial con trol systems, say, the automated con trol of a factory's mach inery - the running example used in this paper. This paper is a positi on paper that proposes a PLC database system and discusses its features. In doing so, we touch bases with a nu mber of basic database topics, and, thus, freque ntly refer to other work for details.
PLCs are mostly used in manu facturi ng en vir onments - hen ce, 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 databasemay also serve as a local/transient part of a larger scie ntific database.
With the rapid advances in computer hardware and falling memory prices, in rece nt years, the capabilities of the new PLCs in the marketplace have bee n in creas ing dramatically. This paper is a positi on paper that argues that a PLC software can now con ta in a database system to greatly in crease its fun ctio nality. We propose the architecture in Figure 1 as the architecture of an environment where real-time data gatheri ng (from multiple sen sors) and real-time data man ipulati on takes place. We now list the adva ntages of hav ing a database system directly in side a PLC.
(1) Data Modeli ng Tech niq ues : The in put and output buffers represe nt a rather unorgani zed tran sie nt model of the real world, and hen ce, carl be modeled better using the traditi onal data modeli ng tech niq ues of databases.
(2) Historical Databases: PLCs rout in ely deal with differe nt versi ons of data over time. Therefore, historical data modeli ng tech niq ues as well as historical data man ipulati on tech niq ues can replace the ad hoc ways of man ipulat ing historical data in PLCs.
(3) User-Frie ndly In terfaces : Prese ntly in the marketplace, the PLC software and in dustrial termi nals allow a limited display of messages and variable-data in formatio n in memory. For example, the con tact histogram fun cti on displays the on/off history of a specific mai n memory.
(4) Han dli ng Large Volumes of Data : With the added capabilities of a database and a query Ian guage, the PLC may an alyze much larger volumes of data.
(5) Data Reducti on and Compacti on at the PLC Level : Prese ntly, for further an alysis or simply due to various regulati ons, data collected by PLCs get tran smitted and stored into a host computer file using an architecture show n..
Since the prese nt PLCs cannot satisfactorily an alyze most data, they simply tran smit data to the host computer. I n some scie ntific experime nts and applicati ons, the data gathered is so large that argume nts have bee n raised for "processi ng the data on-the-fly" duri ng the executi on of an experime nt/tra nsacti on [SSDB 86]
(a) Real-Time Database : The data in the in put buffer must be sca nn edwith in reas on ably short "real-time" in tervals ranging from microsec onds to sec on ds. Therefore,resp on ses to queries must be guara nteed to be less tha n a certa in "realtime" time bound, almost always less tha n 5 to 10 sec on ds.
(b) Mai n Memory Database: Microsec on ds/sec on dsquery resp on serestrictio ns n ecessitate main-memory-only databases.
(c) Scalable Database : Once the en vir onment of a PLC and the requireme nts of the associatedapplicatio n program are determ in ed, the possible query types to the database stay fixed for a reas on ably long period of time. Si nee the resp onse time of queries is of utmost importa nee, the DBMS should be scaled so that only the n eeded
routi nes/fu nctions (e.g., access methods, data structures, etc.) are in corporated.
In secti on 2, we discuss the gen eral characteristics PLCs, and briefly prese nt the ladder logic Ianguage. 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 con sists of a CPU (or multiple CPUs), main memory, an "in dustrial term in al", and high- and medium-speed data com muni cati ons hardware. The size of the main memory ran ges from 16K bytes (of 5 to 10 years ago) to 8M bytes (of the prese nt time).Although the CPU has an in structio n set similar to those found in CPUs of 16-bit and 32-bit mach in es, it is especially equipped with fast bit man ipulati on in struct ions. The in dustrial termi nal comes with a special keyboard to make the program ming of the PLC easier an d/or to in terve ne with the applicati on program.
The PLC software consists of an operating system (ranging from a very simplistic mon itor (of ten years ago) to a sophisticated real-time operati ng system (of the rece nt time)), high-speed com muni cati ons software for com muni cat ing with I/O processors,medium-speed com muni cati ons software to the in dustrial termi nal and to other "i ntellige nt" devices.
Both gen eral-purpose computers and PLCs are used for in dustrial con trol [Star 87].However, they differ in the program ming Ian guages that they use, en vir onmen tal 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 pers onn el, who are accustomed to relay-type con trolli ng en vir onmen ts.
A rung is an ordered set of PLC in structi ons draw n on a si ngle line. In struct ions on a rung are classified as in put in structi ons (those that mon itor the in put buffer) and output in struct ions (those that set the output buffer), and are executed from left to right, seque ntially (Please see figure 4). A PLC applicatio n program con sists of a main program and a set of subrout in es, each of which containing an ordered set of rungs To summarize, the applicati on programmer deals with actual (realtime) clock times, and n
eeds to have precise estimates for program sca n times and I/O sca n times. For time estimati ons, the PLC manu facturers supply in formatio n such as 4 msec onds for 1000 ladder logic in structi ons, and 1 msec onds for copy ing 256 words into an in put buffer duri ng the I/O sca n. In most applicati ons, the processor sca n time is kept below 10 sec on ds.Thus,databasema nipulati on in struct ions also n eed to have precise time limits available to (or set by) users.
2. Architecture
We propose a two-level, sin gle-user databasesystem architecture as show n in figure 6. We have omitted from our architecture the exter nal model of the traditi onal databasearchitecture not becausePLCs are not powerful, but becausec on curre ntly running application programs using different views create problems in accurately estimati ng the applicati on program scan times. That is, i n a multitask ing en vir onment where tasks compete for the resources such as database relati ons and com muni cati on lin es, decid ing a sin gle top-to bottom executi on time of a task in actual time is rather difficult (if at all possible).As far as the hardware comput ing power is concern ed, the prese nt day PLCs are as powerful as pers onal computers (and, in deed, in some rece nt products,PLCs are pers onal computers), and can certa inly support multiple in dustrial termin als and data shari ng among the applicati on programs.
3. Data Modeli ng Issues
The traditi onal data modeli ng tech niq ues directly apply to PLC databases. There is no reas on why, say, the En tity-Relatio nship Model [Che n 76] of the data in the PLC database cannot be desig ned. All the well-k nown adva ntages of data modeli ng [ToeF 82] directly carry over to the PLC database en vir onment, and will not be elaborated here. As for the conceptual model of our prototype effort, we have chosen the relatio nal model. The PLC en vir onment n aturally deals with historical data, e.g., the last readi ng of a grinding mach ine sen sor, its value yesterday, etc.. Aga in, there are various historical data modeling approaches [SnoA 85] in the literature and, theoretically, any one of them is acceptable.
Example. Con sider a set of furn aces that produce high-precisi on airpla ne parts. There are two entity relations, FURNACE and PART, and one time-varying relati on ship
relati on PRODUCES as described in figure 7. Please n ote that PRODUCES relation has tuple timestamping with BEGIN-TIME and END-TIME attributes.
4. DBMS Issues
There are a number of issues that need to be resolved in a time-constrained, sin gle user DBMS en vir onment. These are
(a) Data Archival.
(b) Database Backup.
(c) Database In tegrity en forceme nt.
5. Query Process ing Issues
The conventional database management systems (DBMS) do not have the capability of dyn amically meeti ng the time con stra ints whe n the amount of data is too large to process within a give n time quota. Our approach is, for a give n time quota, to take an appropriate amount of sample data such that the set of sampled data is guara nteed to be processible by the DBMS within the give n.
Some basic PLC in structi ons have also bee n exte nded to in crease their fun cti on ality.For example, we have exte nded the "exam ine logic switch" in structi ons, the Exami ne Input Closed (XIC) and the Exami ne In put Ope n (XIO) [AB 84, AB 85], to test the logical value of a propositi onal calculus formula, rather tha n testi ng a bit value corresponding to the condition of a physical I/O. An "examine F" instruction causesthe formula F to be evaluated and the role value is the n exam ined as in the basic exam ine in structi ons. In gen eral, the formula F may con tai n a con sta nt, a variable, a comp onent of a tuple being sca nned by the poin ter, and fiE) where f is an aggregate fun ctio n and E is a relati onal algebra expressi on. The fun ctio nality of the PLC Timer and Coun ter in structi ons have also bee n enhan ced. Usually con diti oned by "exam ine" in struct ions, timers and coun ters keep track of timed in tervals or eve nts; the number of timed intervals or events to be counted is set in the preset value variables [AB 85, AB 84]. With the in troduct ion of a time dime nsion into the database, eve nts and in tervals can also be "co un ted" using database queries.
6 .Query Process ing Issues
The conventional database management systems (DBMS) do not have the
capability of dyn amically meeti ng the time con stra ints whe n the amount of data is too large to process within a give n time quota. Our approach is, for a give n time quota, to take an appropriate amount of sample data such that the set of sampled data is guaranteedto 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 invo Ived in the run-time estimati on approach. This implies that, at each stage, as large an amount of time as possible should be allocated to reduce the nu mber of stages. On the other hand, allocat ing large amounts of time has a higher risk of overspe nding the time quota and may end up wasti ng 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 Issues
The issue of in complete in formatio n in the PLC database is also being in vestigated.Quite ofte n, the sen sors give in complete in formati on, usually a range for a readi ng. On those occasi ons, the in complete data is only known to be within some range of values.We represe nt an in complete data item as an in terval which contains the unknown value.
We have finished the implementation of the first version of a PLC database [-Liu89] hav ing some of the features summarized in sect ion 3. The system has bee n developed on SUN workstati ons using the C Ian guage. We are pla nning to tran sport it into a PLC, and evaluate its performa nee.
Refere nces
[AB84] 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., "Estimati ng Record Selectivities", In formation
Systems,© 8, 1983.
[HP88] Hewlett-Packard Announ ceme nt of the HP RTDBS, Sept. 1988.
[Klug81] A. Klug, "ABE - A Query Lan guage for Con struct ing Aggregate-by-Example", 1st LBL Workshop on Statistical Database Management, Dec. 1981.
[Ullm88] J.D Ullman, "Principles of Database and Knowledge-Base Systems", Computer Scie nee Press, 1988.
[SSDB86] Panel on Scie ntific Databases, Third Int. Workshop on Statistical a nd SCie ntific Database Man ageme nt, 1986.
[Star87] R.J. Staron, "A Toolset to Develop Programmable Controller Systems",u npublished ma nuscript, Alle n-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的软件包括操作系统(从一个非常简单的监控器(10年以前)到先进的实时操作系统(最近时间)),高速通讯软件与I/O处理器中速通信软件进行沟通
的工业终端和其他智能”装置。

无论是通用计算机还是PLC都用于工业控制。

不过,他们用不同的编程语言,
他们对使用环境规格,用户类型。

PLCS凹凸不平,和工作在敌对的环境下,没有特殊的气候控制,容忍极端温度(60 °)的湿度(95%)和空汽污染。

用户PLCs 包括原有的程式设计的应用程式,以及车间电工及维修人员,都惯于以接力式的控制环境。

一项是有PLC指示的序集,制定了单行。

批示一项,均被列为输入指令(指监察输入缓冲)和输出指令(指集输出缓冲),并被从左至右处理,按顺序。

一个PLC的应用程序由一个主程序和一组子程序,其中每一项包含一个有序集的指令。

该指令在主程序或子程序中是按从上而下的顺序执行。

应用程序员以实际(实时)时钟时间,和需要有精确估计为节目扫描时期和I/O扫瞄时间作为估计
时间。

在多数应用中加工者扫瞄时间被保留在10 us以下,数据库操作指示要求有精确限时可利用的户。

3数据库问题
还有一些问题需要解决,有时间限制,如单用户的DBMS环境等都是。

(1)档案资料。

(2)数据库的备份。

(3)数据库的完整性执法。

(4)数据库恢复。

4查询处理事宜
传统的数据库管理系统,并不具备动态会议时间的限制额时资料实在太多,过程在某一时间配额。

我们的做法是,在某一时间配额采取适当数量的采样数据等,这套采样数据,并保证于过程可行,由于在特定时间配额,而且,确切的时间成本的计算公式,可以得出。

只要询问处理速度,这三种语言是一样的。

考虑到速度。

编写询问处理方法必须使用与解释性询问处理方法相对的处理方法。

因为应用程序很少被校正,所以编写方法不会产生问题。

为增加他们的功能,一些基本的PLC指令也被扩展。

例如,我们已扩展检查逻辑开关”指令,检查输入关闭(XIC )和检查输入打开(XIO ) [ AB 84 , AB
85 ],以测试一个命题的微积分公式的逻辑价值,而非有一点测试对一个检查F”指

使公式F评价的物理的我与O•的条件相应的价值和角色价值然后检查为基本原则检查指令。

简言之,公式F被指针扫描的一元组的一个组成部分,可能包含一个常量,一个变量。

聚合功能是一种有关系的代数表达。

PLC定时器和计数器指
令的功能也被相应的提高。

由检查”指令,定时器和计数器通常有条件追踪时
间间隔;计算间隔或者事件被放置在其中的时间的数字预置价值变量[AB 85,AB 84 ]。

如果一个时间进入数据库,使用数据库查询事件和间隔的尺寸也能是计算”5查询处理问题
当太大的数据量在一个特定的时间定额之内处理时,常规的数据库管理的动态系统(DBMS )没有遇到时间约束的能力。

因为我们的接近,一个特定的时间定额内,这样的一个适当的量的抽样数据装置在特定的时间定额之内得到DBMS的保证过程,而能被引出确切的时间消耗的公式。

基于上述的取样接近,我们更进一步考虑遇到时间约束和为了有效地查询处理如何使用时间定额的问题。

显然,查询处理器经过越多的阶段,越在运行时与有关空中评价接近。

这意味着在每一阶段,尽可能在一定的时间内大量减少应分配阶段的数字。

另一方面,分配时间的大小,尤其在艰难的时光有过度支出时间定额的一种较高的风险并且可能结束浪费大量的时间,约束环境[AbGM 88,StZa 88 ]。

艰难的时间约束环境严格地指示不是被允许的那些环境过度支出时间定额。

因此,当过度支出发生时,就不得不过早地中断查询,从而造成和用于最后的阶段的时间被浪
费。

6其他问题
PLC数据库也调查一些不完全的信息问题。

在一个阅读的范围内,传感器经
常传送不完全的信息。

在那些场合上,仅仅在范围之内才知道一些有价值的数据。

我们把一个区间包含未知的价值作为一个完整的数据项目。

在第三部分我们已经完成了计划的第一版本的可编程数据库-[Iiu89 ]具有的一些特点归纳。

系统在SUN工作站上已发展使用C语言。

我们计划把它搬运到一个PLC系统中来评价其性能。

相关文档
最新文档