77范文网 - 专业文章范例文档资料分享平台

王曦英文翻译最终版

来源:网络收集 时间:2019-03-10 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

沈阳航空工业学院毕业设计论文

PROGRAMMABLE LOGIC CONTROLLER

ABSTRACT

Industrial automation is the now vital for its prosperity, since it reduces the production cost many folds and also increases productivity. For this purpose WLC (i.e. Wired Logic Controller) was introduced in 60s-70s. It was the first step in the industrial automation. Later on microcontrollers were introduced which had the advantage of greater flexibility over the WLC. With the evolution of technology, a very sophisticated version of a controller was introduced with a very large I/O handling capability and extreme flexibility called the Programmable Logic Controller, commonly called the PLC.

The PLCs are not alien to the industries of Pakistan. They have been around for quite a long period and are being employed extensively. Even though the demand of this product is considerable here, there has been no effort to develop it indigenously. Since there had been no development in this field in our country and being a requisite of the nation, so as an exercise of Logic Design, Digital Electronics, Interfacing and Software Engineering. As part of our coursework, we have to undertake a project in the final semester. This article describes the design and implementation process of a Programmable Logic Controller (PLC), in that connection. The task was undertaken as an exercise in digital circuit design, microcontroller application and interface since we already had taken up projects related to power and analog electronics in preceding semesters.

Keywords: Programmable Logic Controller (PLC), Automation, Microcontroller Applications, Industrial Electronics, Digital Control, On-Off Control, Digital Electronics

1. INTRODUCTION

1.1 PROBLEM DESCRIPTION

We all know that industrial automation is the backbone of a nation for its prosperity since, it reduces the production cost many folds and also increases productivity. For this purpose WLC (i.e. Wired Logic Controller) was introduced. It was the first step in the industrial automation. Later on microcontrollers were introduced which had the advantage of greater flexibility over the WLC.

Eventually, a very sophisticated version of a controller was introduced with a very large I/O handling capability and extreme flexibility called the Programmable Logic Controller, commonly called the PLC. Siemens introduced many series of controllers with different capabilities. One of the first series was the SIMATIC? 5 Controllers. The PLC available to us is the S5-100U-100. Later on Siemens introduced the SIMATIC? 7 series of controllers and now, we also have the S7-314IFM PLC.

The PLCs are not alien to the industries of Pakistan. They have been around for quite a long period and are being employed extensively. Even though the demand of this product is

1

沈阳航空工业学院毕业设计论文

considerable here, there has been no effort to develop it indigenously. Since there had been no development in this field in our country and being a requisite of the nation, so as an exercise of Logic Design, Digital Electronics, Interfacing and Software Engineering, we undertook this task of making a PLC better than the S5 controllers and comparable to some extent to the S7 controllers. The PLC that we have designed can also be upgraded to support Remote Data Acquisition.

1.2 BLOCK DIAGRAM AND BRIEF DESCRIPTION

The complete general block diagram of the PLC is depicted in Fig.1-1. Just like the SIMATIC? 5 systems, our PLC can also be broadly classified into three distinct units:

a. CPU

b. Bus unit, and

c. Modules (I/O and function)

Fig.1-1 Block diagram of the PLC

Each unit can be discussed as follows:

1.2.1 CPU

The CPU, as the name suggests, is the brain of the PLC system. Without its brain, the PLC

2

沈阳航空工业学院毕业设计论文

simply cannot function.

In our system, the CPU comprises of two ATMEL? 89C52 microcontrollers. As in every multi processor system, one is the master and the other is the slave. The functions performed by the master or the controlling unit (Fig.1-1) can be summarized as follows:

??Monitor and control the operating modes of the PLC using the operation controls. ??Configure the PLC modules.

??Check program integrity by monitoring scan cycles.

The slave microcontroller (executing unit, Fig.1-1) functions to run the user program. It is responsible for:

??Taking the appropriate actions during startup.

??Issuing the CONVsignal at the start of every scan cycle and the subsequent addressing and transaction of data with the modules. ??Handling the counters and timers.

The CPU section also has the responsibility of communicating the programming device i.e. the computer through a serial port. The communication channel works according to the semaphore algorithm (commonly known as token algorithm). It is to be noted here that the communication link currently does not function, as mentioned earlier, because it was a part of the planned GUI, which has not been implemented due to the constraint of time.

1.2.2 BUS UNIT

The bus unit functions similar to the motherboard in a computer. The bus unit that we have constructed holds up to 4 modules and the CPU; we named it the main bus unit. Moreover, the bus unit also carries the extension connector by which other bus units can be cascaded to increase the I/O handling capability of the PLC. The bus units that will be cascaded will not have a slot for connecting the CPU; only modules can be connected.

The main function of the bus unit is to buffer all the signals i.e. the data buses, address buses, and the control signals, to eliminate the loading of the CPU. This function is also performed by the main bus unit but this also performs an extra function during the configuration stage. The bus unit controller, see Fig.1-1, selects each slot one at a time so that it can be configured for the module connected in it and also sends a signal to the controlling unit when all the slots have been selected and configured once.

1.2.3 MODULES

The modules serve to provide the interface of the PLC with the plant to be controlled. The modules, which we had designed were digital input, digital output, analog input and analog output modules (verified using OrCAD? PSpice). But we only managed to manufacture the digital input and output modules, each capable of handling 16 devices. The standards of the modules are similar to that of commercially available modules.

The modules are equipped with an address decoder circuit, which is common in all the modules, as the circuit has been designed to support auto configuration.

1.3 POSSIBLE SOLUTIONS

Now that the overview of the project is present before us, we will take a look into the

3

沈阳航空工业学院毕业设计论文

possible solutions that came to our mind when we commenced brainstorming. The ideas can be listed as follows along with their supporting and disagreement comments.

??Use of a single processor/microcontroller was the first idea that came to mind

because it was most simple and easy to implement. The problem with such an idea was that we were striving for a good scan time due to which we needed a fast processor (which was unavailable) or had to go for multiple processors.

??The use of microprocessor instead of a microcontroller was also among the options because we have been taught the assembly language of this processor and we were well aware of it. The drawback of such a selection was that in a PLC, bit operations are plenty while the microprocessor instruction is not very powerful for such operations.

??Using a 16-bit microcontroller for ease of work was a great idea but its materialization was not possible as it was not available here.

??After all these options, we were left only with the option of using two microcontrollers in tandem to achieve our desired task.

1.4 REASONS FOR SELECTION

Of all the above solutions mentioned above, we decided to implement the multi processor CPU with the bus unit scheme for connecting the modules. The advantages, which also form the reasons for the selection of this design, are enumerated below.

??This solution was the first seemingly feasible solution that came to our minds. During the course of work, many more came but then it was too late.

??The design was based on equipment and technology easily available in our city.

??The use of microcontroller instead of a microprocessor is justified by the fact that the microprocessor is incapable of bit operations, which are numerous in a PLC.

??A fast microcontroller was unavailable hence we decided to distribute the work load and run tasks simultaneously by using two controllers so that the speed is not compromised.

??The auto configuration feature allows the design of the modules to be quite generic as the address decoding section is identical hence ensuring ease of manufacture.

??The use of the bus unit allows cost effectiveness as specialized circuits in each module are not required as found in the SIMATIC? 7 controllers.

2. ANALYSIS AND SIMULATION

Since our system is a digital system based on microcontrollers, it was not possible to obtain its mathematical model. Instead, we have simulated our circuit design with all the real life limitations in OrCAD? 9.1 PSpice. The computer hardware simulation results and their analysis are discussed below.

2.1 COMPUTER SIMULATIONS - HARDWARE

The simulations were carried in different stages; the auto configuration process, in which the control word is read and then the appropriate address, is assigned to the module. Once this was tested, the complete sequence of reading data from a digital input module was tested. Similarly, the sequence of writing to a digital output module was also tested.

4

沈阳航空工业学院毕业设计论文

Before discussing the processes, one thing that must be stressed is that the signals used for testing the performance of the circuits were constructed using actual timing delays that would be introduced by the microcontrollers. All the propagation delays, pulse widths, etc. have been carefully implemented so that our simulations are as near to practical results as possible.

2.1.1 THE AUTO CONFIGURATION PROCESS

The configuration cycle is handled purely and solely by the second microcontroller. It is the job of this controller to read the control words of the various modules and then assign addresses to each. The process is carried out as follows.

Whenever the PLC is switched ON, the microcontroller will carry out the configuration cycle. To initiate this cycle, the microcontroller sends an active low signal PSENpulse. At the first rising edge of the CLK, this low state is transferred to P0, the signal for selecting the module at the first slot. Meanwhile, PSENnow goes back high. Now the microcontroller sends out A1A0=00, which causes the control word to be addressed. Hence when the RDsignal goes low, the control word of the module at the first slot is read and stored in the RAM of the microcontroller. Now the next module is selected on the next rising edge of the clock. Similarly, its control word is read and stored. Once a bus unit has been completely checked, it raises a flag bit. This flag bit of each bus unit is ANDed with the flag bit from the next bus unit (i.e. NBUS) and the output of the AND gate goes to the input of the preceding bus unit. This chain continues until the output of the final AND gate goes to the microcontroller. This output goes high when all the modules have been selected once and their control words have been read.

Figure 2.1

The timing diagram shown below depicts the sequential selection of each module and the reading of their control words. Also note that the BU_END signal goes high when all the modules have been read.

Now the microcontroller reads all the stored control words and overwrites them with proper addresses, each 16-bit long. Once all the control words are converted to addresses, these are to be transferred to the modules. Hence, once again, the PSENgoes low and on the first rising edge of the clock, the first module is selected. However, this time the microcontroller sends out A1A0=10, which indicates that the lower byte of the address latch is being pointed to. Then the lower byte of the address appears on the data bus of the microcontroller and when the WRsignal goes low, the address latch latches the data. Once lower byte has been written, the microcontroller sends out A1A0=11, which shows that the high byte is being addressed. Again, the high byte is transferred to the address latch when WRgoes low. This completes the auto configuration for one module. In a similar manner, all the remaining modules are configured, as

5

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库王曦英文翻译最终版在线全文阅读。

王曦英文翻译最终版.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/513819.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: