Model-Based Design of PLC Programs
- 格式:pdf
- 大小:295.62 KB
- 文档页数:6
外文文献资料1、Software EngineeringSoftware is the sequences of instructions in one or more programming languages that comprise a computer application to automate some business function. Engineering is the use of tools and techniques in problem solving. Putting the two words together, software engineering is the systemtic application of tools and techniques in the development of computer-based applications.The software engineering process describes the steps it takes to deelop the system. We begin a development project with the notion that there is a problem to be solved via automation. The process is how you get from problem recognition to a working solution. A quality process is desirable because it is more likely to lead to a quality product. The process followed by a project team during the development life cycle of an application should be orderly, goal-oriented, enjoyable, and a learning experience.Object-oriented methodology is an approach to system lifecycle development that takes a top-down view of data objects, their allowable actions, and the underlying communication requirement to define a system architecture. The data and action components are encapsulated, that is , they are combined together, to form abstract data types Encapsulation means that if I know what data I want ,I also know the allowable processes against that data. Data are designed as lattice hierarchies of relationships to ensure that top-down, hierarchic inheritance and side ways relationships are accommodated. Encapsulated objects are constrained only to communicate via messages. At a minimum, messages indicate the receiver and action requested. Messages may be more elaborate, including the sender and data to be acted upon.That we try to apply engineering discipline to software development does not mean that we have all the answers about how to build applications. On the contrary, we still build systems that are not useful and thus are not used. Part of the reason for continuing problems in application development, is that we are constantly trying to hita moving target. Both the technology and the type of applications needed by businesses are constantly changing and becoming more complex. Our ability to develop and disseminate knowledge about how to successfully build systems for new technologies and new application types seriously lags behind technological and business changes.Another reason for continuing problems in application development is that we aren’t always free to do what we like and it is hard to change habits and cultures from the old way of doing things, as well as get users to agree with a new sequence of events or an unfamiliar format for documentation.You might ask then, if many organizations don’t use good software engineering practices, why should I bother learning them? There are two good answers to this question. First, if you never know the right thing to do, you have no chance of ever using it. Second, organizations will frequently accept evolutionary, small steps of change instead of revolutionary, massive change. You can learn individual techniques that can be applied without complete devotion to one way of developing systems. In this way, software engineering can speed changee in their organizations by demonstrating how the tools and techniques enhance th quality of both the product and the process of building a system.2、Data Base System1、IntroductionThe development of corporate databases will be one of the most important data-processing activities for the rest of the 1970s. Date will be increasingly regarded as a vital corporate resource, which must be organized so as to maximize their value. In addition to the databases within an organization, a vast new demand is growing for database services, which will collect, organize, and sell data.The files of data which computers can use are growing at a staggering rate. The growth rate in the size of computer storage is greater than the growth in the size or power of any other component in the exploding data processing industry. The more data the computers have access to, the greater is their potential power. In all walks of life and in all areas of industry, data banks will change the areas of what it is possiblefor man to do. In the end of this century, historians will look back to the coming of computer data banks and their associated facilities as a step which changed the nature of the evolution of society, perhaps eventually having a greater effect on the human condition than even the invention of the printing press.Some most impressive corporate growth stories of the generation are largely attributable to the explosive growth in the need of information.The vast majority of this information is not yet computerized. However, the cost of data storage hardware is dropping more rapidly than other costs in data processing. It will become cheaper to store data on computer files than to store them on paper. Not only printed information will be stored. The computer industry is improving its capability to store line drawing, data in facsimile form, photo-graphs, human speech, etc. In fact, any form of information other than the most intimate communications between humans can be transmitted and stored digitally.There are two main technology developments likely to become available in the near future. First, there are electromagnetic devices that will hold much more data than disks but have much longer access time. Second, there are solid-state technologies that will give microsecond access time but capacities are smaller than disks.Disks themselves may be increased in capacity somewhat. For the longer term future there are a number of new technologies which are currently working in research labs which may replace disks and may provide very large microsecond-access-time devices. A steady stream of new storage devices is thus likely to reach the marketplace over the next 5 years, rapidly lowering the cost of storing data.Given the available technologies, it is likely that on-line data bases will use two or three levels of storage. One solid-state with microsecond access time, one electromagnetic with access time of a fraction of a second. If two ,three ,or four levels of storage are used, physical storage organization will become more complex ,probably with paging mechanisms to move data between the levels; solid-state storage offers the possibility of parallel search operation and associativememory.Both the quantity of data stored and the complexity of their organization are going up by leaps and bounds. The first trillion bit on-line stores are now in use . in a few year’s time ,stores of this size may be common.A particularly important consideration in data base design is to store the data so that the can be used for a wide variety of applications and so that the way they can be changed quickly and easily. On computer installation prior to the data base era it has been remarkably difficult to change the way data are used. Different programmers view the data in different ways and constantly want to modify them as new needs arise modification , however ,can set off a chain reaction of changes to existing programs and hence can be exceedingly expensive to accomplish .Consequently , data processing has tended to become frozen into its old data structures .To achieve flexibility of data usage that is essential in most commercial situations . Two aspects of data base design are important. First, it should be possible to interrogate and search the data base without the lengthy operation of writing programs in conventional programming languages. Second ,the data should be independent of the programs which use them so that they can be added to or restructured without the programs being changed .The work of designing a data base is becoming increasing difficult , especially if it is to perform in an optimal fashion . There are many different ways in which data can be structured ,and they have different types of data need to be organized in different ways. Different data have different characteristics , which ought to effect the data organization ,and different users have fundamentally different requirements. So we need a kind of data base management system(DBMS)to manage data.Data base design using the entity-relationship model begins with a list of the entity types involved and the relationships among them. The philosophy of assuming that the designer knows what the entity types are at the outset is significantly different from the philosophy behind the normalization-based approach.The entity-relationship(E-R)approach uses entity-relationship diagrams. The E-Rapproach requires several steps to produre a structure that is acceptable by the particular DBMS. These steps are:(1) Data analysis(2) Producing and optimizing the entity model.(3) Logical schema development(4) Physical data base design process.Developing a data base structure from user requirements is called data bases design. Most practitioners agree that there are two separate phases to the data base design process. The design of a logical database structure that is processable by the data base management system(DBMS)d escribes the user’s view of data, and is the selection of a physical structure such as the indexed sequential or direct access method of the intended DBMS.Current data base design technology shows many residual effects of its outgrowth from single-record file design methods. File design is primarily application program dependent since the data has been defined and structured in terms of individual applications to use them. The advent of DBMS revised the emphasis in data and program design approaches.There are many interlocking questions in the design of data-base systems and many types of technique that one can use is answer to the question so many; in fact, that one often sees valuable approaches being overlooked in the design and vital questions not being asked.There will soon be new storage devices, new software techniques, and new types of data bases. The details will change, but most of the principles will remain. Therefore, the reader should concentrate on the principles.2、Data base systemThe conception used for describing files and data bases has varied substantially in the same organization.A data base may be defined as a collection of interrelated data stored together with as little redundancy as possible to serve on or more applications in an optimal fashion; the data are stored so that they are independent of programs which use thedata; a common and controlled approach is used in adding new data and in modifying and retrieving existing data within the data base. One system is said to contain a collection of data bases if they are entirely separate in structure.A data base may be designed for batch processing, real-time processing, or in-line processing. A data base system involve application program, DBMS, and data base.One of the most important characteristics of most data bases is that they will constantly need to change and grow. Easy restructuring of the data base must be possible as new data types and new applications are added. The restructuring should be possible without having to rewrite the application program and in general should cause as little upheaval as possible. The ease with which a data base can be changed will have a major effect on the rate at which data-processing application can be developed in a corporation.The term data independence is often quoted as being one of the main attributes of a data base. It implies that the data and the application programs which use them are independent so that either may be changed without changing the other. When a single set of data items serves a variety of applications, different application programs perceive different relationships between the data items. To a large extent, data-base organization is concerned with the representation of relationship between data items and records as well as how and where the data are stored. A data base used for many applications can have multiple interconnections between the data item about which we may wish to record. It can describes the real world. The data item represents an attribute, and the attribute must be associated with the relevant entity. We design values to the attributes, one attribute has a special significance in that it identifies the entity.An attribute or set of attribute which the computer uses to identify a record or tuple is referred to as a key. The primary key is defined as that key used to uniquely identify one record or tuple. The primary key is of great importance because it is used by the computer in locating the record or tuple by means of an index or addressing algorithm.If the function of a data base were merely to store data, its organization would be simple. Most of the complexities arise from the fact that is must also show the relationships between the various items of data that are stored. It is different to describe the data in logical or physical.The logical data base description is referred to as a schema .A schema is a chart of the types of data that one used. It gives the names of the entities and attributes, and specifics the relations between them. It is a framework into which the values of the data-items can be fitted.We must distinguish between a record type and a instance of the record. When we talk about a “personnel record”,this is really a record type.There are no data values associated with it.The term schema is used to mean an overall chart of all of the dataitem types and record types stored in a data he uses. Many different subschema can be derived from one schema.The schema and the subschema are both used by the data-base management system, the primary function of which is to serve the application programs by executing their data operations.A DBMS will usually be handing multiple data calls concurrently. It must organize its system buffers so that different data operations can be in process together. It provides a data definition language to specify the conceptual schema and most likely, some of the details regarding the implementation of the conceptual schema by the physical schema. The data definition language is a high-level language, enabling one to describe the conceptual schema in terms of a “data model” .The choice of a data model is a difficult one, since it must be rich enough in structure to describe significant aspects of the real world, yet it must be possible to determine fairly automatically an efficient implementation of the conceptual schema by a physical schema. It should be emphasized that while a DBMS might be used to build small data bases, many data bases involve millions of bytes, and an inefficient implementation can be disastrous.We will discuss the data model in the following.3、Three Data ModelsLogical schemas are defined as data models with the underlying structure of particular database management systems superimposed on them. At the present time, there are three main underlying structures for database management systems. These are :RelationalHierarchicalNetworkThe hierarchical and network structures have been used for DBMS since the 1960s. The relational structure was introduced in the early 1970s.In the relational model, the entities and their relationships are represented by two-dimensional tables. Every table represents an entity and is made up of rows and columns. Relationships between entities are represented by common columns containing identical values from a domain or range of possible values.The last user is presented with a simple data model. His and her request are formulated in terms of the information content and do not reflect any complexities due to system-oriented aspects. A relational data model is what the user sees, but it is not necessarily what will be implemented physically.The relational data model removes the details of storage structure and access strategy from the user interface. The model provides a relatively higher degree of data. To be able to make use of this property of the relational data model however, the design of the relations must be complete and accurate.Although some DBMS based on the relational data model are commercially available today, it is difficult to provide a complete set of operational capabilities with required efficiency on a large scale. It appears today that technological improvements in providing faster and more reliable hardware may answer the question positively.The hierarchical data model is based on a tree-like structure made up of nodes and branches. A node is a collection of data attributes describing the entity at that point.The highest node of the hierarchical tree structure is called a root. The nodes at succeeding lower levels are called children .A hierarchical data model always starts with a root node. Every node consists of one or more attributes describing the entity at that node. Dependent nodes can follow the succeeding levels. The node in the preceding level becomes the parent node of the new dependent nodes. A parent node can have one child node as a dependent or many children nodes. The major advantage of the hierarchical data model is the existence of proven database management systems that use the hierarchical data model as the basic structure. There is a reduction of data dependency but any child node is accessible only through its parent node, the many-to –many relationship can be implemented only in a clumsy way. This often results in a redundancy in stored data.The network data model interconnects the entities of an enterprise into a network. In the network data model a data base consists of a number of areas. An area contains records. In turn, a record may consist of fields. A set which is a grouping of records, may reside in an area or span a number of areas. A set type is based on the owner record type and the member record type. The many-to many relation-ship, which occurs quite frequently in real life can be implemented easily. The network data model is very complex, the application programmer must be familiar with the logical structure of the data base.4、Logical Design and Physical DesignLogical design of databases is mainly concerned with superimposing the constructs of the data base management system on the logical data model. There are three mainly models: hierarchical, relational, network we have mentioned above.The physical model is a framework of the database to be stored on physical devices. The model must be constructed with every regard given to the performance of the resulting database. One should carry out an analysis of the physical model with average frequencies of occurrences of the grou pings of the data elements, with expected space estimates, and with respect to time estimates for retrieving and maintaining the data.The database designer may find it necessary to have multiple entry points into a database, or to access a particular segment type with more than one key. To provide this type of access; it may be necessary to invert the segment on the keys. Thephysical designer must have expertise in knowledge of the DBMS functions and understanding of the characteristics of direct access devices and knowledge of the applications.Many data bases have links between one record and another, called pointers. A pointer is a field in one record which indicates where a second record is located on the storage devices.Records that exist on storage devices is a given physical sequence. This sequencing may be employed for some purpose. The most common pupose is that records are needed in a given sequence by certain data-processing operations and so they are stored in that sequences.Different applications may need records in different sequences.The most common method of ordering records is to have them in sequence by a key —that key which is most commonly used for addressing them. An index is required to find any record without a lengthy search of the file.If the data records are laid out sequentially by key, the index for that key can be much smaller than they are nonsequential.Hashing has been used for addressing random-access storages since they first came into existence in the mid-1950s. But nobody had the temerity to use the word hashing until 1968.Many systems analysis has avoided the use of hashing in the suspicion that it is complicated. In fact, it is simple to use and has two important advantages over indexing. First, it finds most records with only one seek and second, insertion and deletions can be handled without added complexity. Indexing, however, can be used with a file which is sequential by prime key and this is an overriding advantage, for some batch-pro-cessing applications.Many data-base systems use chains to interconnect records also. A chain refers to a group of records scatters within the files and interconnected by a sequence of pointers. The software that is used to retrive the chained records will make them appear to the application programmer as a contiguous logical file.The primary disadvantage of chained records is that many read operations areneeded in order to follow lengthy chains. Sometimes this does not matter because the records have to be read anyway. In most search operations, however, the chains have to be followed through records which would not otherwise to read. In some file organizations the chains can be contained within blocked physical records so that excessive reads do not occur.Rings have been used in many file organizations. They are used to eliminate redundancy. When a ring or a chain is entered at a point some distance from its head, it may be desirable to obtain the information at the head quickly without stepping through all the intervening links.5、Data Description LanguagesIt is necessary for both the programmers and the data administrator to be able to describe their data precisely; they do so by means of data description languages. A data description language is the means of declaring to data-base management system what data structures will be used.A data description languages giving a logical data description should perform the folloeing functions:It should give a unique name to each data-item type, file type, data base and other data subdivision.It should identify the types of data subdivision such as data item segment , record and base file.It may define the type of encoding the program uses in the data items (binary , character ,bit string , etc.)It may define the length of the data items and the range of the values that a data item can assume .It may specify the sequence of records in a file or the sequence of groups of record in the data base .It may specify means of checking for errors in the data .It may specify privacy locks for preventing unauthorized reading or modification of the data .These may operate at the data-item ,segment ,record, file or data-base level and if necessary may be extended to the contents(value) of individual data items .The authorization may , on the other hand, be separate defined .It is more subject to change than the data structures, and changes in authorization proceduresshould not force changes in application programs.A logical data description should not specify addressing ,indexing ,or searching techniques or specify the placement of data on the storage units ,because these topics are in the domain of physical ,not logical organization .It may give an indication of how the data will be used or of searching requirement .So that the physical technique can be selected optimally but such indications should not be logically limiting.Most DBMS have their own languages for defining the schemas that are used . In most cases these data description languages are different to other programmer language, because other programmer do not have the capability to define to variety of relationship that may exit in the schemas.附录 B 外文译文1、软件工程软件是指令的序列,该指令序列由一种或者多种程序语言编写,它能使计算机应用于某些事物的运用自动化。
Visualization of PLC Programs using XML Abstract - Due to the growing complexity of PLC programs there is an increasing interest in the application of formal methods in this area. Formal methods allow rigid proving of system properties in verification and validation. One way to apply formal methods is to utilize a formal design approach in PLC programming. However, for existing software that has to be optimized, changed, or ported to new systems .There is the need for an approach that can start from a given PLC program. Therefore, formalization of PLC programs is a topic of current research. The paper outlines a re-engineering approach based on the formalization of PLC programs. The transformation into a vendor independent format and the visualization of the structure of PLC programs is identified as an important intermediate step in this process. It is shown how XML and corresponding technologies can be used for the formalization and visualization of an existing PLC program.I. INTRODUCTIONProgrammable Logic Controllers (PLCs) are a special type of computers that are used in industrial and safety critical applications. The purpose of a PLC is to control a particular process, or a collection of processes, by producing electrical control signals in response to electrical process- related inputs signals. The systems controlled by PLCs vary tremendously, with applications in manufacturing, chemical process control, machining, transportation, power distribution, and many other fields. Automation applications can range in complexity from a simple panel to operate the lights and motorized window shades in a conference room to completely automated manufacturing lines.With the widening of their application horizon,PLC programs are being subject to increased complexity and high quality demands especially for safety-critical applications. The growing complexity of the applications within the compliance of limited development time as well as the reusability of existing software or PLC modules requires a formal approach to be developed [I]. Ensuring the high quality demands requires verification and validation procedures as well as analysis and simulation of existing systems to be carried out [2]. One of the important fields for the formalization of PLC programs that have been growing up in recent time is Reverse-engineering [3]. Reverse Engineering is a process of evaluating something to understand how it works in order to duplicate or enhance it. While the reuse of PLC codes is being established as a tool for combating the complexity of PLC programs, Reverse Engineering is supposed to receive increased importance in the coming years especially if exiting hardware has to be replaced by new hardware with different programming environmentsVisualization of existing PLC programs is an important intermediate step of Reverse Engineering. The paper provides an approach towards the visualization of PLC programs using XML which is an important approach for the orientation and better understanding for engineers working with PLC programs.The paper is structured as follows. First, a short introduction to PLCs and the corresponding programming techniques according to the IEC 61131-3 standard isgiven. In Section Ⅲan approach for Re-engineering based on formalization of PLC programs is introduced. The transformation of the PLC code into a vendor independent format is identified as an important first step in this process. XML and corresponding technologies such as XSL and XSLT that can be used in this transformation are presented in Section IV. Section V presents the application of XML for the visualization of PLC programs and illustrates the approach with an example. The final Section summarizes the results and gives an outlook on future work in this ongoing project.ⅡPLC AND IEC 61131Since its inception in the early ‘70s the PLC received increasing attention due to its success in fulfilling the objective of replacing hard-wired control equipments at machines. Eventually it grew up as a distinct field of application, research and development, mainly for Control Engineering.IEC 61 131 is the first real endeavour to standardize PLC programming languages for industrial automation. In I993 the International Electrotechnical Commission [4] published the IEC 61131 Intemational Standard for Programmable Controllers. Before the standardization PLC programming languages were being developed as proprietary programming languages usable to PLCs of a special vendor. But in order to enhance compatibility, openness and interoperability among different products as well as to promote the development of tools and methodologies with respect to a fixed set of notations the IEC 61131standard evolved. The third part of this standard defines a suit of five programming languages:Instruction List (IL) is a low-level textual language with a structure similar to assembler. Originated in Europe IL is considered to be the PLC language in which all other IEC61 131-3 languages can be translated.Ladder Diagram (LO) is a graphical language that has its roots in the USA. LDs conform to a programming style borrowed from electronic and electrical circuits for implementing control logics.Structured Text (STJ is a very powerful high-level language. ST borrows its syntax from Pascal, augmenting it with some features from Ada. ST contains all the essential elements of a modem programming language.Function Block Diagram (FBD) is a graphical language and it is very common to the process industry. In this language controllers are modelled as signal and data flows through function blocks. FBD transforms textual programming into connecting function blocks and thus improves modularity and software reuse.Sequential Function Chart (SFC) is a graphical language. SFC elements are defined for structuring the organization of programmable controller programs.One problem with IEC 61 131-3 is that there is no standardized format for the project information in a PLC programming tool. At the moment there are only vendor specific formats. This is also one reason for the restriction of formalization approaches to single programs or algorithms. However, recently the PLC users’ organization PLCopen (see ) started a Technical Committee to define an XML based format for projects according to IEC 61131-3. This new format will ease the access of formalization tools to all relevant information of a PLC project.Ⅲ. RE-ENGINEERING APPROACHThe presented approach towards re-engineering (cf. Fig.1) is based upon the conception that XML can be used as a medium in which PLC codes will be transformed.This transformation offers the advantage of obtaining avendor independent specification code. (Even if the PLCopen succeeds in defining a standardized format for PLC applications, there will remain a lot of existing programs that do not conform to this standard.)Based on this code a step-wise transformation to a formal model (automata) is planned. This model can then be used for analysis, simulation, formal verification and validation, and finally for the re-implementation of the optimized algorithm on the same or another PLC.Since re-engineering of complete programs will, in most cases, be only a semi-automatic process, intermediate visualization of the code is an important point. At different stages of the process different aspects of the code and/or formal model have to be visualized in a way that a designer can guide the further work. XML with its powerful visualization and transformation tools is an ideal tool for solving this task.IV. XML AS A TOOL FOR VISUALIZATIONXML (extensible Markup Language) is a simple and flexible meta-language, i.e,a language for describing other languages. Tailored by the World Wide Web Consortium (W3C) as a dialect of SGML [S], XML removes two constraints which were holding back Web developments [6]. The dependence on a single, inflexible document type (HTML) which was being much abused for tasks it was never designed for on one side; and the complexity of full SGML, whose syntax allows many powerful but hard-to-program options on the other side.While HTML describes how data should be presented, XML describes the data itself. A number of industries and scientific disciplines-medical records and newspaper publishing among them-are already using XML to exchange information across platforms and applications. XML can be tailored to describe virtually any kind of information in a form that the recipient of the information can use in a variety of ways. It is specifically designed to support information exchange between systems that use fundamentally different forms of data representation, as for example between CAD and scheduling applications.Using XML with its powerful parsers and inherent robustness in terms of syntactic and semantic grammar is more advantageous than the conventional method of using a lexical analyzer and a validating parser (cf. Fig. 2, [7]).The conventional method of analysis of program code requires a scanner (lexical analyser) which generates a set of terminal symbols (tokens) followed by a parser that checks the grammatical structure of the code and generates an object net. In the object net the internal structure of the program is represented by identified objects and the relations between them. Both the scanner and the parser to be used in this method are document oriented which implies that analysis of different types of documents requires rewriting the generated code for the scanner and the parser. An example of anapplication of this method can be found in [8].The most promising aspect of using XML instead is that XML and its complementary applications for transformations are standardized so as to provide maximum flexibility to its user.The XML based method is advantageous, since the lexical specification is an invariant component of XML; therefore the well-formedness is independent from the respective individual application.Hence, an XML-Parser also can transfer well-shaped XML documents in an abstract representation called Document Object Model (DOM) without using a grammar. DOM is an application programming interface (APII) for valid HTML and well-formed XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated. In the DOM specification, the term "document" is used in a broad sense increasingly. XML is used as a way of representing many different kind of information that may be stored in diverse systems, and much of this would traditionally be seen as data rather than as documents. Nevertheless, XML presents this data as documents, and the DOM can be used to manage this data[5].XSLT, the transformation language for XML is capable of transforming XML not only to another XML or HTML but to many other user-friendly formats. Before the advent of XSLT, the transformation of XML to any other format was only possible through custom applications developed in a procedural language such as C++, Visual Basic or, Java. This procedure lacked the generality with respect to the structural variation of XML documents. Capitalizing on the concept that the custom applications for the transformations are all very similar, XSLT evolved as a high-level declarative language [9].XSLT functions in two steps. In the first step, it performs a structural transformation so as to convert the XML into a structure that reflects the desired output. The second stage is formatting the new structure into the required format, such as HTML or PDF (cf. Fig. 3 ). The most important advantage of this transformation is that it allows a simple and easily-conceivable representation of the document or data structure embedded inside the well-structured but hard-to-understand XML to be produced. When HTML is chosen as the format of the transformed produce it is possible to use the extensive ability of HTML to produce an easily-conceivable and attractive visualization of a program.Every XML document has its own syntax and vocabulary. Therefore, in addition to being well-formed, the XML document needs to conform to a set of rules. According to W3C recommendations this set of rules has to be defined either through a Document Type Definition (DTD) or an XML Schema. The rules defined in a DTD or an XML Schema state the hierarchical and structural constraints of the XML document.The DTD is for defining the document grammars; more recently a number of alternative languages have been proposed. The W3C XML Schema language replicates the essential functionality of DTDs, and adds a number of features: the use of XML instance syntax rather than an ad hoc notation, clear relationships betweenschemas and namespaces, a systematic distinction between element types and data types, and a single-inheritance form of type derivation. In other words schemas offer a richer and more powerful way of describing information than what is possible with DTDs. Fig. 4shows the XML technologies discussed above and the connection between them.V. AN APPROACH FOR THE VISUALIZATION OFPLC PROGRAMSA. OverviewSince Instruction List (IL) is the most commonly used PLC language in Europe, the presented approach is based on this language. The proprietary IL dialect Siemens STEP 5and the standardized version according to IEC 61131-3 are considered.The generation of XML documents showing different aspects of a PLC program is realized in the following three steps (cf. Fig. 5):1.Transformation of the PLC program to an XML document2.Validation of the XML against the XML Schema which sets the syntax of the XML3.Identification of the Instruction elements of the transformed XML according to the instruction set of the source PLCThese three steps are discussed in sub-sections B to D respectively. Sub-section E explains the visualization of the different XMLs obtained during the preceding steps.Throughout this Section an example is used to illustrate the presented concepts. Fig. 6shows a PLC code written in Instruction List Siemens S5. The PLC code is written in atabular form where each row element is either a delimited list consisting of address, label, instruction, operand and description or a comment.Fig. 6 A PLC program written in Siemens S5 Instruction ListB. Conversion of a PLC Program inio a well-formed XMLGiven a PLC program in ASCII format and in a tabular structure with separate columns for addresses, labels, instructions, operands and descriptions delimited by whitespaces, XSLT can convert it into a well-formed XML document. The XML document obtained through this transformation is a hierarchically structured document.Fig. 7 shows the XML document obtained through the transformation of the PLC code of Fig. 6. The XML document is structured in a hierarchy in which the root element is the IL Code Block representing the whole PLC code. Each of the rows of the PLC code is contained within a corresponding ILRow element which is M e r smtctured into child elements.Note: The structure chosen for the XML representation of IL-Code is oriented at the working proposal of the PLCopen.C. XML Validation against the XML SchemaThe XML obtained as a result of the previous processing can be validated using a validating parser that confirms that the XML document in addition to being well-formed conforms to the set of syntactic rules defined in context of the PLC programming language.D. rdenhpcation of instructionsThis step in the process of visualization of PLC programs using XML ensures that the XML document to be used for visualization contains only valid instructions.XSLT can be used to transform the well-formed and valid Xh4L to another XML which as a result of identification on instructions has an additional attribute appended to the instruction tags. This attribute notifies whether the instruction is a valid instruction of the concerned instruction set. This transformation procedure is also capable of attaching attributes to the instruction tags that declares a classification of the instructions into predefined classes.The instruction identification of the transformed XML proofs the semantic of the XML in accordance with the operation types of the PLC programming language.In the example of this section, (cf. Fig. 8), the new XML contains additional attributes which classify the instructions according to the type of operation it represents. The STEPS instructions are categorized into eleven different types of operations e.g. logical, jump, load or transfer operation assignment, etc.E. Visualization of XMLBoth of the XML documents generated above can be transformed into HTML or other readable documents with the help of XSL. An ingenious XSL can be designed so as to produce an HTML which can convey the logical and other features of the PLC program in an easily conceivable form. Moreover, the DOM structure embedded in the XML (cf. Fig. 9), also enables the user to navigate through the PLC programs in an easy way.For the example the visualization is done in HTML. This visualization is done for the transformed XML after the validation of it's syntax as a table where the child elements of the ILRow are the columns of this table.The XML after the instruction identification is transformed using the XSL, where the instruction and the instruction Id, obtained after extracting the XML according to the type of operations are visualized in a table containing two columns (Instruction, Instruction Id) in HTML.The HTML structures suggested here are not the only possibilities, with which the XML can be visualized, but they give a very easy practical option for the user's grasp of the PLC code.Fig. IO shows the same PLC code as shown in Fig. 4 as a HTML document converted &om the XML document shown in Fig. 7 using XSL. This visualization enables a better understanding of the PLC program. Fig. 11shows the special visualization of instruction ids given in the XML of Fig. 6.VI. CONCLUSIONS AND OUTLOOKRe-engineering of PLC programs needs a formal approach to be developed. In this paper one way to solve this task is introduced. Based on a given PLC program written in Instruction List a step-wise transformation to a formal representation is proposed. Since this process will not be fully automatic, the need for flexible visualization of intermediate steps is derived. XML is presented as a flexible, standardized means to serve as data format for the description of the PLC code. Thecorresponding technology of XSL transformations and the Document Object Model are presented as tools for the variety of customized visualization tasks during the re-engineering process.Based on the XML description of PLC programs further transformations will be applied to finally derive a completely formalized description of the original PLC code. This will be in the form of a finite automaton. During this process it is planned to identify common IL structures and formalize them via a library.Gaining the Benefit of the XML Metadata Interchange (XMI) as an open industry standard that applies XML to abstract systems such as UML and referring to the classification of the instructions of IL into the eleven categories mentioned above. We can extract UML classes from this classification, as it resembles the action semantics of UML.可视化的PLC程序使用XML摘要:由于P LC程序日益复杂,在PLC应用方面有越来越多的兴趣爱好者。
LabVolt Series DatasheetProgrammable Logic Controller (SIEMENS ET200S IM151-8 with Case)587529 (3240-AA)* The product images shown in this document are for illustration purposes; actual products may vary. Please refer to the Specifications section of each product/item for all details. Festo Didactic reserves the right to change product images and specifications at any time without notice.Festo Didactic en 240 V - 50 Hz 12/2023Programmable Logic Controller (SIEMENS ET200S IM151-8 with Case), LabVolt SeriesTable of ContentsGeneral Description_________________________________________________________________________________3 Features & Benefits_________________________________________________________________________________3 List of Manuals_____________________________________________________________________________________3 Table of Contents of the Manual(s)_____________________________________________________________________4 Additional Equipment Required to Perform the Exercises (Purchased separately) ______________________________4 Specifications______________________________________________________________________________________4 Module Options Description__________________________________________________________________________4Programmable Logic Controller (SIEMENS ET200S IM151-8 with Case), LabVolt Series•▪▪▪•••••••••••▪••General DescriptionThe Programmable Logic Controller (SIEMENS ET200S IM151-8 with Case) is specially designed to helpstudents develop skills in operating, programming, and troubleshooting modern PLC-controlled systems. Driven by a Siemens ® ET200S IM151 8 controller, the training module is compatible with several didactic applications.Listed below are the PLC applications compatible with this Programmable Logic Controller.- Traffic Lights, Model 8075-1: Full compatibility - Electro-Pneumatic, Model 8075-2: Full compatibility- Electro-Mechanical DC Motor, Model 8075-3: Full compatibility - Electro-Mechanical Step Motor, Model 8075-4: Full compatibility- Wind Turbine, Model 8075-5: Full compatibility, but requires the Analog Expansion Kit, Model 3244-C, to perform all exercises- Level Process Control, Model 8075-6: Full compatibility, but requires the Analog Expansion Kit, Model 3244-C, to perform all exercises- Bottling Process, Model 8075-7: Partial compatibility onlyFeatures & BenefitsDigital and Analog I/Os Ten 24 V dc digital inputs Six 24 V dc digital outputs Two analog inputs (0-10 V dc)24 V dc built-in power supplyBuilt-in 10/100 Mbps Ethernet/IP port for peer-to-peer messaging and programming Eight fault switches Online editingFive push-buttons, five toggle switches, and Two 0-10 V dc outputs PID CapabilityEmbedded Web server and LCD screen Onboard traffic light simulatorEasy expansion using rackless I/O modules (Analog Expansion Module, Model 3244-A)Compatibility with MicroLogix and SLC instruction setRequires the RSLogix Micro programming software, Model 3245-A ** RSLogix Micro Starter Lite for MicroLogix 1000 and 1100 is available for free on Allen-Bradleywebsite ().For programming, an Ethernet cable is included with the trainer. A serial cable, Model 3246-4, can also be orderedIncludes curriculumList of ManualsDescriptionManual numberProgrammable Logic Controller (Workbook) _____________________________________________589767 (52281-00)Programmable Logic Controller (Workbook (Instructor)) ___________________________________589768 (52281-10)Programmable Logic Controller (SIEMENS ET200S IM151-8 with Case), LabVolt Series•••••••••Table of Contents of the Manual(s)Programmable Logic Controller (Workbook) (589767 (52281-00))1 Familiarization with the PLC Trainer and RSLogix Micro2 Online Operations and Monitoring I/O Data Files3 Relay Instructions Part 14 Relay Instructions Part II5 Timer Instructions6 Counter Instructions7 Comparison Instructions8 Move Instructions9 Sequencer InstructionsAdditional Equipment Required to Perform the Exercises (Purchased separately)Qty Description Modelnumber1PLC Software (RSLogix Micro, Educational) ___________________________________________ 587552 (3245-A0)SpecificationsParameterValuePLCAllen-Bradley MicroLogix 1100Power Requirements 120-240 V, 50/60 Hz, 1.5 ASwitches (10) 5 push buttons and 5 toggle switches Inputs (10)24 V dc (four 40 kHz high-speed)Outputs (6)24 V dc (two 40 kHz high-speed), each with a pilot light Analog Inputs (2)0-10 V dc (10 bits resolution)Communication Ports (2)Ethernet, serial (DF1 full-duplex protocol)Fault-Insertion Switches 8ProtectionCircuit breakerPhysical Characteristics Dimensions (H x W x D)202 × 327 × 266 mm (8 × 12.9 × 10.5 in)Net Weight5 kg (11 lb)Module Options DescriptionPLC Software (RSLogix Micro, Educational) 587552 (3245-A0)The RSLogix Micro software is a tool to design and implement ladder programs for the Allen-Bradley MicroLogix™ family of processors (it cannot be used with SLC 500 controllers). It is a Windows ®-based application produced by Rockwell Software that allows PLC programming using a personal computer.The free-form ladder of RSLogix Micro lets students concentrate on the application logic rather than using the proper syntax when editing programs. Several other features of RSLogix Micro greatly facilitate PLC programming, such as a project verifier, drag-and-drop editing, and search-and-replace functions. The PLC can be programmed via either an RS-232 port or an Ethernetport on the PLC processor. This software comes with RSLinx™, which provides connectivity between the PLC and the computer.Programmable Logic Controller (SIEMENS ET200S IM151-8 with Case), LabVolt SeriesThe software is available with either an educational license (Model 3245-A) or as a commercial license (Model 3245-B).SpecificationsParameter ValueComputer Requirements A currently available personal computer with USB 2.0 ports, running under one of the following operating systems: Windows® 7 or Windows® 8.Programmable Logic Controller (SIEMENS ET200S IM151-8 with Case), LabVolt Series Reflecting the commitment of Festo Didactic to high quality standards in product, design, development, production, installation, and service, our manufacturing and distribution facility has received the ISO 9001 certification.Festo Didactic reserves the right to make product improvements at any time and without notice and is not responsible for typographical errors. Festo Didactic recognizes all product names used herein as trademarks or registered trademarks of their respective holders. © Festo Didactic Inc. 2023. All rights reserved.Festo Didactic SERechbergstrasse 373770 DenkendorfGermanyP. +49(0)711/3467-0F. +49(0)711/347-54-88500Festo Didactic Inc.607 Industrial Way WestEatontown, NJ 07724United StatesP. +1-732-938-2000F. +1-732-774-8573Festo Didactic Ltée/Ltd675 rue du CarboneQuébec QC G2N 2K7CanadaP. +1-418-849-1000F. +1-418-849-1666。
摘要数控技术作为现代制造业的核心技术之一,在各行各业得到了广泛的应用,在机械制造行业当中,数控加工中心由于可以以较高的精度实现多工种加工已经成为现代机械制造业中不可缺少的加工设备。
本文在选用三菱公司的PLC及M64S数控系统的基础上,设计了立式加工中心的CNC数控系统的硬件外围电路,同时利用三菱公司的DX-developer开发工具进行了PLC梯形图编程和仿真。
本文主要从硬件电路和PLC程序两大部分来撰写, PLC程序又包括程序的编写和仿真,这是本论文最重要的部分,其中PLC控制程序又是本次毕业设计的难点,分别在第三章和第四章。
【关键词】 M64S数控系统加工中心 PLC梯形图 I/O接口电路ABSTRACTIn today's machinery manufacturing developing process, the CNC technology is one of the core technologies. CNC Machining Center has become a modern control indispensable processing equipment, To meet the needs of machining accuracy regardless of the structure or mechanical control system is a very high demand CNC systems with high reliability and precision by a wide range of users of all ages. Based on Mitsubishi M64S NC system for the processing center, I introduced processing center structure, NC system specifications, and PLC selection, then use relative materials of Mitsubishi M64S numerical control system to design Vertical Machining Center's main circuit, controlling circuit and private servers circuit. And design corresponding PLC procedure simultaneously. Finally, we use DX-developer to edit PLC and emulate.In this paper, I write it in two parts: the hardware circuits and PLC programs. And PLC program includes procedures for the preparation and simulation, which is the most important part of this thesis. What’s more, PLC control program is one difficult part of this research, and it is discussed in Chapter III and IV respectively.【Keywords】M64S numerical control system machining centre control program circuitry目录前言 (1)第一章CNC数控系统概述 (2)第一节CNC数控系统相关介绍 (2)一、CNC数控基本概念 (2)二、数控系统的组成 (3)三、数控加工中心的优缺点 (4)四、数控技术发展回顾及未来发展趋势 (5)第二节PLC的选型 (6)一、输入输出(I/O)点数的估算 (6)二、存储器容量的估算 (6)三、控制功能的选择 (6)四、机型的选择 (8)五、冗余功能的选择 (9)六、经济性的考虑 (9)第三节数控系统介绍 (9)一、三菱数控产品简介 (9)二、三菱M64S数控系统简介 (10)第四节本章小结 (13)第二章立式加工中心电气原理图设计 (14)第一节数控加工中心设计概述 (14)第二节数控加工中心主回路/电气控制回路 (16)一、主回路/电气控制回路简述 (16)二、主回路/电气控制回路图 (16)第三节本章小结 (19)第三章数控加工中心PLC控制程序设计 (20)第一节三菱数控系统软件配置 (20)一、信号流程简述 (20)二、信号流程图 (20)第二节数控加工中心输入输出信号地址 (22)第三节数控加工中心PLC控制程序设计步骤 (27)第四节数控加工中心PLC控制程序说明 (28)一、加工中心方式选择 (28)二、加工中心定时器程序 (32)三、进给轴工作状态选择 (33)四、加工中心进给轴运动方向指示灯程序 (34)五、加工中心手轮选择及其倍率设定 (35)第五节本章小结 (40)第四章M64S数控系统仿真 (41)第一节GX Developer软件使用说明 (41)一、GX Developer软件的安装 (41)二、GX Developer软件的开启步骤与设定 (41)三、GX Developer软件的编程操作说明 (42)第二节PLC程序的仿真 (44)一、PLC控制程序的传输 (44)二、仿真结果 (44)第三节本章小结 (46)结论 (47)致谢 (49)参考文献 (50)附录 (51)一、英语资料原文 (51)二、英语原文翻译 (59)前言数控系统是现代制造系统的重要支柱之一,然而数控机床又是现代机械制造技术不可缺少的设备,它的核心是数控系统。
传送带PLC控制系统设计一、本文概述Overview of this article随着工业自动化水平的不断提升,传送带作为物流和生产流程中的关键环节,其控制系统设计变得愈发重要。
本文将深入探讨《传送带PLC控制系统设计》的相关内容,旨在为读者提供一套全面、高效的传送带控制系统设计方案。
文章将首先介绍传送带PLC控制系统的基本概念、发展历程以及其在工业自动化领域的应用价值。
随后,文章将详细阐述PLC控制系统的硬件组成、软件编程以及系统调试等关键环节,并结合实际案例进行分析。
文章还将探讨传送带PLC控制系统设计中的常见问题及解决方案,为读者在实际应用中提供有益参考。
通过本文的阅读,读者将能够深入了解传送带PLC控制系统的设计原理和实践方法,为工业自动化领域的发展贡献力量。
With the continuous improvement of industrial automation level, the control system design of conveyor belts, as a key link in logistics and production processes, has become increasingly important. This article will delve into the relevant content of "Design of PLC Control System for ConveyorBelt", aiming to provide readers with a comprehensive and efficient design scheme for conveyor belt control system. The article will first introduce the basic concept, development history, and application value of PLC control system for conveyor belts in the field of industrial automation. Subsequently, the article will elaborate in detail on the hardware composition, software programming, and system debugging of the PLC control system, and analyze them in conjunction with practical cases. The article will also explore common problems and solutions in the design of PLC control systems for conveyor belts, providing useful references for readers in practical applications. Through reading this article, readers will be able to gain a deeper understanding of the design principles and practical methods of PLC control systems for conveyor belts, contributing to the development of industrial automation.二、传送带基础知识Fundamentals of conveyor belts传送带作为工业生产和物流运输中的关键设备,广泛应用于各个行业。
PLC introducedThe graduation project topic is the application of PLC in the servo servo system, the PLC application and understanding of the graduate design, following the basic knowledge of PLC to make a brief introduction.The PLC can be programmed controller is the new industrial control devices based on computer technology. The PLC in the PLC draft standards issued by the International Electrotechnical Commission in 1987 made the following definition: "the PLC is a specially designed for applications in industrial environments digital computing operation of electronic devices which can be programmed memory, with to implementation of the logical, sequential operation, timing, counting and arithmetic operations, such as operating instructions in its internal storage and can be digital or analog inputs and outputs to control various types of machinery or production processes. PLC and its related peripherals should be easy and industrial control systems to form a whole, easy to extend the principle of functional design. "A.PLC features(a)High reliability, strong anti-jamming capabilityHigh reliability is the key to performance of the electrical control equipment.PLC is due to the introduction of modern LSI technology, strict production process, the internal circuit to take the advanced anti-jamming technology, with high reliability. For example, the Mitsubishi F series PLC MTBF up to 300,000 hours. Redundant CPU PLC, the average time between failures is longer. From a machine outside the circuit of the PLC, the PLC constitutes a control system, and compared to the same scale relay contactor system, electrical wiring and switch contacts have been reduced to hundreds or even thousands, the fault will be greatly reduced. In addition, PLC with a self-detection of hardware failure, failure to timely alert. In the application software, application can also be incorporated into the peripheral devices and fault diagnostic procedures, also received the fault self-diagnostic protection circuit outside the PLC system and equipment. In this way, the entire system with high reliability is also not surprising.Complete, fully functional, and applicability(b)Complete, fully functional, the applicabilityPLC development today, has formed a large, medium and small scale series products. Can be used for industrial control applications of all sizes. In addition to the logical processing functions, the modern PLC mostly data computing power can be used for a variety of digital control. In recent years the emergence of a large number of functional units of the PLC, PLC penetrated into the position control, temperature control, CNC and other industrial control. With PLC communication capability enhancement and development of human-computer interface technology, the use of PLC composed of a varietyof control systems have become very easy.(c)Easy to use, well received by engineers and technicians welcomePLC as a general-purpose industrial control computer, industrial control equipment for industrial and mining enterprises. It easy to interface, programming language is easy to be accepted for engineering and technical personnel. The ladder language graphic symbol and expression and relay circuit is very close, only a small number of switch PLC logic control instructions can easily relay circuit. Not familiar with the electronic circuit, people do not understand computer theory and assembly language using a computer to engage in industrial control to open the door.(d)System design, construction workload is small, easy to maintain, easy to transformPLC storage logic instead of wiring logic, greatly reduce the external wiring of control equipment, control system design and construction of the cycle is much shorter, while maintaining also become easily. More important is that the same device after the change the change the production process become possible. It is suitable for the occasion of many varieties, small batch production.(e)Small size, light weight, low energy consumptionUltra-Small PLC, for example, the newly produced species at the bottom of size less than 100mm, weighs less than 150g, only a few watts of power. Due to small size it is easy to load the internal machinery is the ideal control device for mechanical and electrical integration.B.The composition of the PLCPLC is divided into fixed and modular (modular) two points from the structure. Fixed PLC CPU board, I / O board, display panel, memory blocks, power, and these elements are combined into a non-removable as a whole. Modular PLC CPU module, I / O modules, memory, power supply modules, backplane or rack, these modules can be combined according to certain rules configuration.(a)The composition of the CPUCPU is the core of the PLC, since the role of the nerve center, at least one CPU in each PLC, the PLC system program, the functions entrusted to the reception and storage of user programs and data collected from field input devices sent a scanned stateor data, and deposit shall be required to register, at the same time, the diagnostic power and the working status of the PLC internal circuitry and programming process in syntax errors. Into operation from the user program memory, one by one read command, the corresponding control signal analysis and then according to the mandate of instruction, to command the control circuit.CPU is the main contact between the computing device, controller, register, and to implement them, control and status bus, a CPU unit also includes a peripheral chips, bus interface, and related circuit. Memory is mainly used for storing programs and data is an integral unit in PLC.User opinion, unnecessarily detailed analysis of the internal circuitry of the CPU, but on the part of the working mechanism should have sufficient understanding. The CPU controller controls the CPU to read instructions, which explain the instructions and execute instructions. However, the pace of work is controlled by the oscillation signal. The arithmetic unit is used for digital or logic operation under the command of the controller. Register to participate in operations, and store intermediate results of operations, it is under the command of the controller.CPU speed and memory capacity are important parameters in the PLC, they determine the pace of work of the PLC, IO number and software capacity, thus limiting the size of the control.(b)I / O modulesThe interface of the PLC and the electrical circuit is completed by the input and output portion (I / O). I / O modules with integrated PLC's I / O circuit, the input registers reflect the state of the input signal, output point to reflect the state of the output latch. The input module electrical signals into a digital signal into a PLC system, the output module is the opposite. I / O module is divided into the digital input (DI), digital output (DO), analog input (AI), analog output (AO).The I / O are classified as follows:Switch: the voltage level points, 220VAC, 110VAC, 24VDC, points by way of isolation and separation of relays and transistor isolation.Analog: Signal type, current-(4-20mA, 0-20mA), voltage type (0-10V,0-5V,-10-10V), etc., precision points, 12bit, 14bit, 16bit.In addition to these general-purpose IO, there are special IO module, such as thermal resistance, thermocouple, pulse module.I / O points to determine the module specification and quantity, I / O modules can be more or less, but the maximum number of the ability of the CPU can manage the basic configuration, that is, by the largest number of floor or rack slot limit.(c)Power supply modulePLC power supply IC for the PLC module supplies power to operate. At the same time, some of the input circuit to provide 24V power supply. Power input type: AC power (220VAC or 110VAC), DC power supply (usually24VDC).C. Working principlePut into operation when the programmable logic controller, the course of their work is generally divided into three stages, that is, the input sample, the user program execution and output refresh three stages. Completion of the three stages is called a scan cycle. During the entire operation, the CPU of the programmable logic controller scan speed, repeat the above three stages. (a)Input sampling phaseThe input sampling stage, the programmable logic controller in order toscan read into the state of all input and data, and deposit them with the corresponding unit in the I / O image area. Transferred to the user program execution and output refresh period after the end of the input samp le. In both phases, even if the input state and data changes, the state and data of the corresponding unit in the I / O image area will not change. Therefore, if the input pulse signal, the signal of the pulse width must be greater than one scan cycle, in order to ensure that in any case, the input can be read into the.(b)User program execution stageIn the user program execution stage, programmable logic controllers are always followed by a top-down order to scan the user program (ladder). Scan each one ladder, and always scan by the contact of the ladder left of the control of line, and first left and right first and then the order of logical operations on the control circuit by the contact form , then the logical result of the operation, refresh the logic of the coil system RAM storage area corresponding state; or refresh the state of the output coil corresponding bits in the I / O image area; or determine whether to perform the ladder the provisions of the special function instruction.That is, during user program execution, only the input status and data points in the I / O image area does not change, the output point and soft devices in the I / O image area or system RAM storage areastatus and data are likely to change, but came in above the ladder program execution results will be ranked below those who used these coils or data ladder work; the contrary, the row below the ladder, thethe status of logic coils to be refreshed or the data can only be to the next scan cycle can be ranked on top of the program work.If you use the I / O instruction immediately you can directly access the I / O points in the process of program execution. That the use of I / O instruction, the input process image register values are not updated, the program directly from the I / O module value, the output process image register is immediately updated, this immediately enter some difference.(c)Output refresh periodWhen the scan the user program after the end of the programmable logic controller to enter the output refresh period. During this time, the CPU in accordance with the I / O image area corresponding to the state and data refresh all of the output latch circuit driven by the output circuit corresponding peripherals. At this time, is the real output of the programmable logic controller.D.PLC applicationsAt present, the PLC at home and abroad has been widely used in iron and steel, petroleum, chemicals, electricity, building materials, machinery manufacturing, automobile, textile, transportation, environmental protection and cultural entertainment industry, usage can be broadly divided into the following categories.(a)Switch logic controlThis is the PLC basic, wide range of applications, which replaces thetraditional relay circuit, logic control, sequential control, both for the control of a single device, can also be used for multi-group control and automated assembly line.Such as injection molding machines, printing presses, stapler machine, combined machine tools, grinding machines, packaging production lines, electroplating lines and so on.(b)Analog ControlIn the industrial production process, there are many continuous variables, such as temperature, pressure, flow, level and speed are analog. To make the programmable controller to handle analog, analog (Analog) and Digital (Digital) A / D conversion and D / A conversion. PLC manufacturers are supporting the production of A / D and D / A converter module, the programmable controller for analog control.(c)Motion ControlPLC can be used in a circular motion or linear motion control.From the configuration of the control mechanism, early used directly in the switch I / O modules to connect the position sensors and actuators, is now generally use a dedicated motion control module. Drive a single or multi-axis position of the stepper motor or servo motor control module. The world on all major PLC manufacturers products almost every motion control functions, widely used in a variety of machinery, machine tools, robots, elevators and other occasions. (d)Process controlProcess control refers to the closed-loop control of temperature, pressure, flow analog. As an industrial control computer, the PLC can prepare a variety of control algorithm, the complete closed-loop control. PID regulation is a general closed-loop control system using more regulation. And medium-sized PLC have PID modules, and many small PLC also has this feature module. PID processing is generally run a dedicated PID subroutine. Process control in metallurgy, chemical industry, heat treatment, boiler control and so on a very wide range of applications.(e)Data processingModern PLC math (including matrix operations, functions, operation, logic operation), data transfer, data conversion, sorting, look-up table, bit operation functions, you can complete the data collection, analysis and processing.These data can be compared with the reference value stored in memory to complete the control operation can also use the communication functions to other intelligent devices, or print them tabulation. The data processing is generally used for large-scale control systems, flexible manufacturing systems such as unmanned control; can be used for process control systems, such as papermaking, metallurgy, food industry, some large-scale control system.(f)Communications and networkingPLC communication with the communication between PLC and communication between the PLC and other intelligent devices.With the development of computer control, factory automation, network development,the PLC manufacturers have attached great importance to the PLC communication function, have launched their own network systems. The newly produced PLC communication interface, communication is very convenient. E. History of the development(a)OriginGeneral Motors in 1968 to replace the relay control device requirements;In 1969, Digital Equipment Corporation developed the first programmable logic controller PDP-14, successful trial in the U.S. GM's production line, using procedural means for the first time used in electrical control, which is the first generationprogrammable logic controllers, said Programmable, is recognized as the world's first PLC.In 1969, the United States developed the world's first PDP-14;In 1971, Japan developed the first DCS-8;In 1973, Germany developed the first PLC;In 1974, the Chinese developed the first PLC.(b)DevelopingThe microprocessor in the early 1970s. Will soon be introduced into the programmable logic controller, programmable logic controller to increase the computing, data transmission and processing and other functions, the real computer features of industrial control devices. Programmable logic controller is the product of combining conventional control concepts of computer technology and relay. Development of personal computers, in order to facilitate and reflect the features of the programmable controller, programmable logic controllers be called the Programmable Logic Controller (PLC).The late 1970s, the programmable logic controller into the practical stage of development, computer technology has the full introduction of the programmable controller, a leap to make it function. Higher operating speed, ultra-compact size, the more reliable industrial anti-jamming design, analog computing, the PID function and the high cost laid in modern industry.The early 1980s, the programmable logic controller has been widely used in the advanced industrial countries. Production of programmable controllers on the country in the world is increasing, production is rising. This indicates that the programmable controller has entered a mature stage.1980s to the mid-1990s, the fastest-growing period of the programmable logic controller, the annual growth rate has been maintained at 30 to 40 percent. During this period, the PLC in the processing capacity of analog, digital computing power, man-machine interface capabilities and network capabilities have been greatly improved, programmable logic controllers gradually into the field of process control in the field of process control is replaced in some applications dominance of the DCS system.The late 20th century, the development characteristics of the programmable logic controller is more responsive to the needs of modern industry. This period the development of mainframes and super-minicomputer,the birth of a variety of special function units, the production of a variety of man-machine interface unit, communication unit, so that the application of programmable logic controllers, industrial control equipment supporting easier.。
英文回答:The PLC programming task process includes a number of elements, including needs collection, programme design, programming, debugging testing and document writing. The needs—gathering phase requires adequatemunication with the parties concerned on their specific needs and requirements, including the functional requirements of equipment, performance requirements, safety requirements, etc. Once specific requirements have been collected, they need to enter the programme design phase. During the programme design phase, the logical structure of the entire PLC process, including flow charts, status charts, etc., needs to be designed in accordance with the needs collected. There is also a need to rationalize the modular structure of the programme to ensure its stability and reliability, depending on the characteristics of the hardware.PLC程序编写工作任务流程包括需求收集、程序设计、程序编写、调试测试和文档编写等多个环节。
PLC控制技术理论与实践_常熟理工学院中国大学mooc课后章节答案期末考试题库2023年1.下列输出模块可以交直流两用的是()答案:继电器输出模块2.S7-300 PLC驱动的执行元件不工作,PLC的CPU面板上指示灯均正常,而输入、输出指示灯不亮,这时可判断故障出在()答案:输入线路上3.输入采样阶段,PLC的CPU对各输入端子进行扫描,将输入信号送入()答案:输入映像寄存器(PII)4.S7 Program对象包含源文件(Source)、块(Blocks)和()答案:符号表(Symbols)5.SIMATIC通信网络中,()属于多点通讯接口,主要用于连接编程器,适用于通讯数据量少、慢,实时性要求不高的场合。
答案:MPI6.PLC硬件的11号槽中组态了一块8通道4-20mA AI模块,该槽占据输入( )答案:167.若梯形图中某一输出过程映像位Q的线圈“断电”,对应的输出过程映像位为()状态,输出刷新后,对应的硬件继电器常开触点()答案:0,断开8.S7-300中央机架的5号槽的16点数字量输入模块占用的字节地址为()答案:IB4和IB59.不能以位为单位存取的存储区是()答案:外设I/O区10.CPU可以同时打开()个共享数据块和()个背景数据块。
答案:1,111.S7-300PLC对多可以扩展个机架,每个机架最多只能安装个信号模块、功能模块或通信处理模块。
答案:3 , 812.OB35是组织块。
答案:循环中断13.S7-300PLC的寻址方式有立即寻址、直接寻址和三种方式。
答案:间接寻址14.寻址数据块10中的字节3的第0位,绝对地址应写为。
答案:DB10.DBX3.015.顺序功能图由步、转换和三要素组成。
答案:动作##%_YZPRLFH_%##功能16.CPU检测到故障或错误时,如果没有下载对应的错误处理OB,CPU将进入模式。
答案:STOP##%_YZPRLFH_%##停止17.某模拟量输入模板,某通道测量类型为“E”,测量范围0-10V,当输入电压为5V时,经A/D转换后对应的数字量是。
可编程序控制器的编程方法Programming a programmable logic controller (PLC) can be a challenging yet rewarding task. It requires a good understanding of the PLC hardware and software, as well as knowledge of the specific programming language used by the PLC. Learning how to program a PLC effectively can help improve efficiency and productivity in various industrial applications.可编程序控制器的编程可能是一项具有挑战性但有回报的任务。
它需要对可编程序控制器的硬件和软件有很好的了解,以及对可编程逻辑控制器使用的特定编程语言的知识。
有效学习如何编程可编程序控制器可以帮助提高各种工业应用中的效率和生产力。
One of the key aspects of programming a PLC is understanding ladder logic, which is a graphical programming language commonly used in PLC programming. Ladder logic programs are created using a combination of rungs, each of which represents a specific logic function or operation. By understanding how ladder logic works, programmers can easily create and troubleshoot PLC programs.编程可编程序控制器的关键方面之一是理解梯形图,这是一种在PLC编程中常用的图形化编程语言。
Model-Based Design of PLC ProgramsMitchell M. Tseng (1), Matthias SchreyerDepartment of Industrial Engineering and Engineering Management,The Hong Kong University of Science & TechnologyKowloon, Hong KongAbstractProgrammable logic controllers (PLC) have been one of the important players in manufacturing systems and many other applications with sales of 15 million PLCs worldwide every year. However, our research has revealed that the programming of PLC based control systems is still very much relying on trial-and-error. In addition, current PLC based control systems are not properly designed to support the growing demand for flexibility and reconfigurability of manufacturing systems. This paper will report a systematic approach to model and design PLC based control systems for reducing the uncertainties in managing the control software development, increasing the flexibility of the systems, and facilitating the use of simulation technology for systems validation. This approach involves systematic design principles, formal modeling techniques, and a generic software component library structure. An example of using the proposed approach is given to illustrate the design of PLC based control systems for a material handling systems.Keywords: Design, Modeling, Programmable logic control1 INTRODUCTIONProgrammable Logic Controller (PLC) technology, invented more than 25 years ago, has been widely used in industry including manufacturing systems, transportation systems, chemical process facilities, and many others. Although PC based (soft-logic) control [1] has started to come into place, PLC based control will remain the technique, to which the majority of industrial application will adhere, due to its high performance, low price and increased reliability in harsh environments. Moreover, according to a study on the PLC market of Frost and Sullivan [2], an increase of the annual sales volume to 15 million PLCs per year with the hardware value of more than 8 billion US dollars has been predicted, though the prices of computing hardware is steadily dropping.2 KEY ISSUES IN PLC BASED CONTROL DESIGN There are several key issues in the design of PLC based control systems that need to be addressed.The design of PLC based control systems is characterized by uncertainty and long development time. Uncertainty emerges from the enormous amount of specific requirements, such as software quality, hazard analysis requirements, and the hardware requirements imposed from the mechanical system to be controlled. In order to cope with uncertainty, more than 50% of the manpower allocated for the control system design is scheduled for testing and debugging. The long design lead-time is a result of a rigor sequential design process in industrial practice, in case system developers do apply a system methodology at all. In many cases the design of the mechanical manufacturing or transport system and the control system are passed on to different subcontractors with less or no communication.A major problem, impelling the need for a systematic design methodology, is the increasing software complexity in large-scale projects alongside with the permanently growing fraction of software life-cycle cost. A common PLC application has often to handle complex systems with more than 10,000 control nodes. In industrial automation, 80-90% of the costs are going intosoftware maintenance, debugging, adaptation and expansion to meet changing customer requirements [3]. The increased demand for reconfigurability of manufacturing systems in quick response-markets imposes an additional requirement on control systems. The raising pace of changes in the manufacturing systems requires frequent adaptations of control programs. A major challenge is therefore to provide enabling technologies that can economically reconfigure manufacturing control systems in response to changing needs and new opportunities [4].Consequently, the need to strive for higher software quality, to cope with increased complexity, and to enable the quick and economical reconfiguration of manufacturing control systems require advanced concurrent design concepts, modern control technologies, and new computer-aided modeling and design tools. This paper presents a design approach to design PLC based control systems in order to reduce the uncertainties in managing the control software development, increasing the flexibilityof the systems, and facilitating the use of simulation technology for systems validation. The design approach includes formal top-down modeling techniques that are well known in real-time control research, but less known in industrial practice. An advanced design methodology also implies integrated modeling of the manufacturing system and the control system. Modeling of the manufacturing system facilitates off-line testing and simulation of the control system and should not cause additional cost though it may further consume design time.A reusable component library will help to ease the design and configuration of domain-specific systems. In this context, domain engineering targets at the design for reusability of software systems [5].3 DESIGN APPROACH FOR INTEGRATEDMANUFACTURING AND CONROL SYSTEM3.1 Current practice in control softwareengineeringIn most cases the software implementation of the control systems occurs during the installation of the manufacturing system. PLC programming is left over to control engineers or technicians who may have less knowledge about methodical and systematic design and programming. Only in large-scale and demanding projects,dedicated service provider for information and automation systems are requested. These specialists follow a rigorous sequential project methodology. Coarsely, the project steps are functional specification, hardware design, manufacturing and procurement, control system development and integration, factory acceptance test (FAT), and delivery including documentation and installation. The allocated manpower is based on empirical data from previous projects [6]. However, the delegation of the control system design to dedicated subcontractor embodies the problem of less interaction and communication between the design team of the mechanical system and the control system.3.2 Integrated design approachIn order to provide a coherent information flow and to achieve a reduction in the design lead-time we propose an integrated design approach based on axiomatic design theory [7].Axiomatic design is a simple, but powerful design methodology. It supports the design process with a general set of design rules forcing the designer to think systematically from a top-down perspective. Thereby, the two axioms, (1) Independence Axiom and (2) Information Axiom, guide the designer to generate a “good” solution and to select the best one among alternatives. Conceptually, the axiomatic design approach divides the design process into four separated semantic and syntactical perspectives, the domains of customer requirements (CR), functional requirements (FR), design parameters (DP), and process variables (PV). Although originally developed for mechanical systems engineering, axiomatic design has been applied to many other design contexts, including software engineering. Accordingly, the domains may have different interpretations in diverse design contexts.In the design of manufacturing system, the DPs describe the processes in a solution-neutral format, whereas the PVs indicate the selected resources, including software systems, hardware systems and human resources. The DPs in the manufacturing system design therefore impact the FRs of the control system to be designed. These are processes, control actions, and temporal requirements. Enabler (DPs) of the processes and control actions are software objects and states describing the abstract structure and system’s behavior. This abstract representation will finally be mapped into the implementation domain of the control system (PVs) indicating the program constructs and program code of the particular language, and the run-time platform. Additionally, common user requirements, such as best performance, reliability and reconfigurability, are superimposing the FRs from manufacturing processes to be implemented by the control system. Thus, the FR domain of the control software design process is pooling the requirements, derived from the manufacturing system configuration, and the desired control system attributes.3.3 FormalModelingCapturing all kind of design decisions during the development process requires various notations, each of them indicating a certain point of view. Commonly, three views are selected to describe the functionality, behavior and the structure of a software design. This F-B-S consideration gives answer to the three basic questions: • F: What to do ?• B: When, or in response to what, to do ?• S: Where to do ?The functionality indicates the what-to-do in the system to be designed, and might be represented with functional-oriented notations, such as SADT [8], SA-RT [9], or activity charts [10] in a decomposed hierarchical tree structure. The activity hierarchy together with the flow of information constitutes the functional view.The behavioral view specifies the dynamics of the system that is to say when and in response to what event the activities are triggered. The behavior could be represented with statecharts [10], various types of Petri nets [11], or formalized temporal logic [12].The structural view provides a hierarchical decomposition into modules and the communication between them. Usually, those modules represent a natural mapping from physically existent objects, such as devices, network nodes and manufacturing subsystems.In recent research on formal modeling, Selic et al. [13] began to combine real-time modeling and design with object-oriented formalism. Likewise, Douglass [14] augmented the Unified Modeling Language (UML) with real-time description techniques, for instance timing diagrams. Stewart et al. [15] developed a port-based model focusing on the structural design of real-time control systems.4 PLC BASED CONTROL SOFTWARE DESIGN4.1 GraphicalNotationsVisual modeling notations are important to convey design ideas and design decisions. They also help to allocate the functional requirements and the design parameters.In this research, we are employing statecharts to describe the behavior and module-charts, which are similar to those proposed in [7] to indicate the system structure (Figure 2). Statecharts as well as module-charts are nesting and orthogonal (independent state/module regions). Therefore, both notations are useful for a hierarchical decomposable design process. A module-chart is always accompanied with a statechart. In general, state transitions models are advantageous because they support directly a cognitive mapping from functional requirements to design parameter, here into states. In addition, state transition models may handle contingent behavior in a natural way. As a third notation, ladder logic charts are used to explicitly specify the Boolean conjunctions between incoming events. Though the ladder logic could be regarded as a redundant description to statecharts, we will reconsider it due to its high acceptance in industry.4.2 DesignProcessIn the following the important design steps are summarized. Step 1 and 2 refer to the manufacturing system design process (Figure 2), whereas step 3 and 4indicate the mapping procedure from the CSD-FR to the CSD-DP domain.Step 1a. Create module architecture from MSD-FR and MSD-DP domains:The modular architecture [7] of the manufacturing system indicates the physical components to be controlled. In case the modular architecture is not available a structural decomposition of the system exhibits the dynamic components.Step 1b. Structural decomposition of the system to be controlled:Structural decomposition of the identified physical components gains elementary functional modules or actors. I/O ports are used to identify the boundary of each module. They indicate the data flow between functional units and refer to the incoming event/sensor or outgoing event/actuator signals.Step 2. Create an ontology to identify the task-neutral system’s behavior (MSD-DP):Define a suitable set of task-neutral observable states, in which the controlled manufacturing system could be. By this means, an ontology about the controlled system is created. The system states are a set of disjoint states of system components to be controlled, such as gripper, shuttle, rotary actuators, and linear drives. Each of those components has a discrete number of states (Figure 3). This step should be usually performed on the manufacturing system design stage since it describes the task-neutral behavior of the manufacturing system.Step 3. Identify task-oriented CSD-FR and interpret them into transition of states (CSD-DP):Identify the desired high-level functional requirements on highest level and interpret them into transition of states. For instance CSD-FR x = “Transfer material bin from A to B” with CSD-DP x = “Transfer state”. In practice, each identified module has predefined high-level states, such as “on/off-state”, ”Initializing state”, “requesting state”, “recovering state”, et cetera. This step may be accompanied with selecting a statechart pattern of a domain database, wrapping up the task-oriented activities (Figure 4).Figure 3: Deriving behavior from system architecture.Figure 4: Statechart pattern for an abstract resource. Step 4. Behavioral decomposition:Statecharts support visually the behavioral decomposition. Hereby, the CSD-FRs describe the intended activities and commands that are going to be enclosed within states (CSD-DPs). Subordinate activities and states are identified through a zigzagging procedure between the CSD-FR and CSD-DP domains. A state is always accompanied by a triggering event and an internal or external action. An external control action creates a motion or state change of the manufacturing system. Therefore, it is causing a new physical state to be adopted by the machine or process. Internal actions are needed to facilitate the sequential or parallel execution of operations and the communication between modules of the control system. Activities have duration, whereas events and actions do not consume significant time. Activities are a composite of actions, which are irreducible. Step 5. Decouple the design:Modified design matrices, denoted as state transition tables, have been developed to model and analyze the interdependencies of modules and states (Table 2). The process of decoupling, segregates the design into a software structure with modules having less inter-modular communication, but high intra-modular interaction. In addition, explicitly modeling the interdependencies of modules and states raises the robustness of the design. The decoupling procedure assists to find a set of stable states among the usually numerous possible states of the control system. These stable states are desired operating states and cognizable errors states from which it is easier to recover in case of a faulty system behavior [16].Based on the state transition notation we have developed a method to analyze the coupling between states and modules. The statechart description is mapped into a state transition table indicating the inputs, outputs and data elements of each state. The state transition table checks the interdependencies between modules and states.Figure 5: Robot for material supply and collection.5 EXAMPLEThe developed design approach is illustrated by the means of a program segment of a transport system. The example shows that the entire semantic could be described in a concise and coherent way with better understandability and fewer elements compared to the original programming in relay ladder logic.The functional specification and mechanical design of the material handling robot is given in Figure 5. The task-independent behavior of the robot is derived from the MSD-design process. The dynamic components are the feeder (1), horizontal drive (x-axis) (2), vertical drive (z-axis) (3), rotary actuator (4), and the gripper (5). These components are represented with a module-chart and statechart description to describe the I/O ports and the behavior. On the right-hand side of Figure 5 the feeding module illustrates the derived notations.The material-handling robot might be controlled with a decentralized controller module. Therefore the next step implies the restructuring of the controller node and the modeled components to be controlled (Figure 6, left-hand side). Since the robot is a shared resource we may select a common resource state pattern from the database as depicted in Figure 4. The specific behavior is always wrapped up with a requested state in order to avoid accessing the resource at the same time. The task-oriented behavior is encapsulated within the active state. The controller module should provide two modes denoted with a dashed line since they are not task-neutral. In the supply mode material bins are transferred from the external transport system (AGV) to the internal transport system. The collect mode accomplishes the reverse operation. Each of these modes consists of 11 elementary control actions in a determined sequence as shown on the right-hand side of Figure 6 for the first control actions of the supply mode.After finalizing the design of the entire behavior the PLC code can be generated automatically. Table 2 visualizes a part of the computer-internal representation with the output pattern, the state interdependency, and input pattern in a state transition table.6 CONCLUSIONThis paper has presented an integrated model-based design approach for PLC based control. This approach aims at reduced development time and higher software quality. Testing and debugging of the PLC program is integrated in the manufacturing system design process. Visualized formal modeling techniques increase the understandability of the PLC programs, particularly, for non-experts with different perspective and expertise. Combined with the simple but powerful axiomatic design principles, this model-based design approach accelerates the generation of correct PLC program code.7 ACKNOWLEDGEMENTSThe authors would like to acknowledge Rockwell Foundation (RAHK 97/98) for supporting this research.8 REFERENCES[1] Carrow, R.S., 1998, Soft-logic: A Guide to Using aPC as a Programmable Logic Controller, McGraw-Hill, New York.[2] Frost, and Sullivan, 1995, World ProgrammableLogic Controller Markets: Increasing FunctionalityPromises Continued Growth, Frost & Sullivan, seealso /wwmarket.[3] Simmons, D.B., Ellis, N.C., Fujihara, H., and Kuo,W., 1998, Software Measurement, A VisualizationToolkit for Project Control & Process Improvement,Prentice Hall.[4] Koren, Y., Heisel, U., Jovane, F., Morikawa, T.,Pritschow, G., Ulsoy, G., Van Brussel, H., 1999,Reconfigurable Manufacturing Sytems, Annals of theCIRP Vol. 48/2, pp. 1-14.[5] Sohdi, J, Sohdi, P, 1999, Software Reuse: DomainAnalysis and Design Process, McGraw-Hill.[6] Rockwell Automation, 1999, Engineering ResourceChart: Project Proposal of MTR Extension, HongKong.[7] Suh, N.P., 1999, Axiomatic Design: Advances andApplications, University Press, New York.[8] Ross, D.T., 1985, Applications and Extensions ofSADT, IEEE Computer, April, pp. 25-35.[9] Ward, P.T., Mellor, S.J., 1986, StructuredDevelopment for Real-Time Systems, Yourdon Press, New York. [10] Harel, D., Naamad, A., 1996, The STATEMATESemantics of Statecharts, ACM Transaction onSoftware Engineering Methodology, October, pp.293-333.[11] David, R., Alla, H., 1992, Petri Nets and Grafcet –Tools for Modeling Discrete Event Systems, PrenticeHall, Hertfordshire.[12] Manna, Z., Pnueli, A., 1992, Temporal Logic ofReactive and Concurrent Systems, Springer Verlag,New York.[13] Selic, B., Gullekson, G., and Ward, P.T., 1994, Real-Time Object-Oriented Modeling, Wiley and Sons,New York.[14] Douglass, B.P., 1999, Doing Hard Time: DevelopingReal-Time Systems with UML, Objects, Frameworks,and Patterns, Addison-Wesley, Massachusetts.[15] Stewart, D.B., Volpe, R.A., Koshla, P. K., 1997,Design of Dynamically Reconfigurable Real-TimeSoftware Using Port-Based Objects, IEEE Transactions on Software Engineering, Vol. 23, No.12, pp. 759-776.[16] Schreyer, M., Tseng, M.M., 2000, Hierarchical StateDecomposition for the Design of PLC SoftwareBased on Axiomatic Design, 1st InternationalConference on Axiomatic Design, Cambridge,Massachusetts.Table 2: State transition table with output commands and input signals。