Mikrodenetleyiciler için taşınabilir türde merdiven diyagramı C dili dönüştürcüsü ve kullanıcı arayüzü tasarımı

thumbnail.default.alt
Tarih
1993
Yazarlar
Arifoğlu, Birol
Süreli Yayın başlığı
Süreli Yayın ISSN
Cilt Başlığı
Yayınevi
Fen Bilimleri Enstitüsü
Özet
Endüstriyel sistemlerinin kontrolünde en yaygın şekilde kullanılan kontrol cihazları programlanabilir mantıksal denetleyicilerdir (PLC - Programmable Logic Controller). Mikro Denetleyiciler (MD) ise endüstriyel kontrolde kullanılabilen en az PLC ler kadar yetenekli, ancak hakettigi yeri henüz alamamış kontrol cihazlarıdır MD'lerin birleştirici (Assembly) dillerinin öğrenilmesi ve endüstriyel ortamlarda bunları programlayabilecek veya uygulamaya yöneltecek elemanların zor bulunması en büyük dezavantajıdır. Hatta MD üreticileri karmaşık olan birleştirici dili öğrenme zorunluluğunu ortadan kaldırabilmek için C derleyici programları pazarlamakta dırlar. Ancak bu da MD kullanımını yaygın hale getirmeye yetmemiştir. Endüstriyel ortamlarda çalışan teknisyenler kumanda semalarına cok benzer hatta çoğu yönden aynı olan merdiven dili kullanan PLC ' leri tercih etmektedirler. Yapılan bu yüksek lisans çalışması ile merdiven dilinden C programlama diline bir dönüştürücü yazılımı tasarlanmıştır. Bu dönüştürücü ile merdiven dilinde yazılan bir program C diline çevrilmekte böylece farklı MD 'ler için kaynak program üretilmektedir. Dolayısı ile oluşturulan yazılım taşınabilir olma özelliğine de sahiptir. Bu dönüştürücü ile birlikte bir kullanıcı arayüzü programı da hazırlanmıştır. Ayrıca yazılan programların gerçek bir ortam da deneyebilmek için National Semiconductor Co. 'nun HPC 16040 denetleyicisi için bir uygulama başlık (header) programı da hazırlanmıştır. Hazırlanan başlık programının görevi, hedef donanımın ( HPC 16040 ) tasarlanan yazılıma tanıtılmasıdır.
(Programmable Logic Controller) is used at industrial control systems commonly. Some features of a PLC are as follows: -The PLC is price competitive with the relay systems. -The PLC is capable of sustaining an industrial environment. -The input and output interfaces are easily replaceable. -The PLC is designed in modular form. -The PLC is re-usable. -The method used to program the PLC is simple, so that it is easily used and understood by plant personnel These features are very important for an industrial control system. A microcontroller has got some of these features but the method used to program the microcontroller is not simple, so it isn't easily used and understood hy plant personnel. Its the assembly language of a microcontroller is not easy to use, some of microcontroller producers develop C compilers for microcontrollers. The plant personel know the ladder diagram for the control system very well. These diagram are very easy and understandable for them, as they have used them for a long time. The purpose of the thesis is to develop a software compiler to convert circuits to C language. The portable output, can be used C compilers to produce object codes for a microcontroller. Furthermore a user interface program is developed and a header file is developed for National Semiconductor Co. ' s HPC16040. In the first chapter of this thesis, the general concepts of a PLC system and its advantages are explained. vi In the next chapter PLC input/output interfaces are explained, namely the discrete I/O. Register I/O, Anolog I/O and special I/O system. There are also lots of special I/O interfaces. Temperature and PID (Propotional - Integral -Derivative) interfaces are two examples for these special I/O systems. The discrete I/O system provides the physical connection between the digital outside world (field equipment) and the central processing unit. This is the only "real" connection between the PLC's CPU and discrete field devices. Through various interface circuits and use of field devices (limit switches, transducers, etc.), the controller can sense and measure physical quantities regarding a machine or process such as proximity, position, motion, level, temperature, pressure, current and voltage. Based on status of the devices sensed or process values measured, the CPU issues commands that control various devices such as valves, motors, pumps and alarms. In short, the I/O interfaces are the sensory and motor skills required by the CPU to exercise control over a machine or process. With new technological advances and the growth of application areas for programmable controllers came the need for the implementation of systems which were beyond the discrete I/O world. Although discrete interfaces encompass most of the I/O modules used in PLC applications, analog and special I/O interfaces are also extensively used to accomplish specific control tasks. Analog measurement and control is generally used in applications that are concerned with continuous processes such as batching, temperature control and the monitoring of sensors and process instruments. The text on PLC communication is a part of chapter 2. Serial communication and two of the most popular standards for serial communication, the RS-232C and the 20 ma. current loop are explained. PLC programming languages are included in the next chapter. The main programming language of PLC is the ladder circuit. The programmable controller was conceptualized with the ease of programming using effective representation of the program logic needed to control the machine or process. This effective representation involved the use of the existing relay ladder symbols and expressions to define the control logic. The result was a programming language which used the original basic relay ladder elements of symbols the name given is ladder language. Figure 1 illustrates a relay ladder logic and the PLC ladder language. Some programmable controllers may offer the ability to program in other languages besides the conventional ladder language. An example is the BASIC programming language. Other manufacturers use what is called Vll Boolean Mnemonics to program a controller. LI Start Stop H -o o- Motor M - ( ) - M (a) Hardwired Ladder Circuit Start Stop - l/h Motor M - ( ) - M (b) PLC Ladder Circuit L2 Figure 1. Electrical Ladder Circuit and PLC Ladder Circuit In chapter 4, the designed software, which converts, the ladder circuit to C programming language is explained. Figure 2 illustrates the input and output of the converter on an example. Figure 2. A Compile Result for a PLC Ladder Circuit vm In the implementation of the ladder, the space occupied by contact or coil is called as a cell. The designed software provides a ladder occupieing 10 rows and 16 columns. A special function depending on its type may occupy more than one cell. For example the counter and timer functions occupy 3 cells. A ladder circuit is expressed with a matrix of 10 rows and 16 columns. Figure 3 illustrates a ladder circuit and its matrix equivalent. 0 1 2 3 4 0 Ladder Circuit 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 14 II 12 13 hxS - "xt- " h 17 18 U 19 Ladder Matrix 2 101 4 102 4 103 2 105 2 106 4 4 5 0 0 0 2 108 3 109 2 110 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01 -( ) Figure 3. A Ladder Circuit and Matrix Equivalent. Once a ladder is created, it is put in linked lists. This linked lists are lined up with ladder recording number. In chapter 5, user interface section is explained. Basically the user interface section can be divided into five different parts; Selection, Program, Print, Compile and Help. User interface is a pull - down menu type. Selection part consists of Header, Filename and Exit. Header part is the selection file for adaptation of IX microcontroller hardware to the developed software. Filename is the selection of a file from hard disk or create a new ladder filename. Exit can be selected for returning to DOS. The program section is the most important part of the user interface section. This is the section where the user introduce the control algorithms, change the control scheme, make deletion or modification on the ladder circuit. The Print section is used to print the ladder circuit or C program. The Compile section is used to compile from ladder circuit to C programming language. In the last. chapter, adaptation of a microcontrol ler hardware to developed software is explained and a header file for National Semmi conductor Co. HPC16040 is introduced.
Açıklama
Tez (Yüksek Lisans) -- İstanbul Teknik Üniversitesi, Fen Bilimleri Enstitüsü, 1993
Anahtar kelimeler
Bilgisayar ve Kontrol, Dönüştürücüler, Mikrodenetleyiciler, PLC, Programlama dilleri, Computer Science and Control, Transformers, Mikrodenetleyiciler = Microcontroller, PLC = Programmable logic controller, Programlama dilleri = Programming languages
Alıntı