Showing posts with label PLC. Show all posts
Showing posts with label PLC. Show all posts

Sunday, 3 May 2009

Wiring the -smart- way for programming

There are many ways to design a circuit or a PLC program. Many peoplebelieve that if the design works, then it's ok. Perhaps this is truebut why not do it with failures in mind. After all, we want the machine operators, us, and even the boss to be proud of our work, don'twe? (I hope your thinking -yes- , even about the boss being proud, butthey probably won't say anything!)
Ok, let's consider a conveyor running through our monster-sized factory with multiple detection sensors looking for various product defects. If any one of the sensors is activated, the conveying systemshould shut-down so we can examine the manufacturing fault. (after allbad product is worse than no product... unless you're M**rosoft...justkidding!)
If you think quickly, it would seem simple. Just use multiple normallyopen sensors wired in parallel with each other. The plc ladder logic program would look like this:
sensor A conveyor off output
---- ----------------( )---
sensor B
---- ----
sensor C
---- ----
sensor D
---- ----
Here we can see that if any of the sensors should detect a defectthe sensor will turn on its output and the plc input should close, the conveyor off output will turn on and disable the conveyor. We can addmore sensors if we wanted to. It's basically an OR ladder. In otherwords, if sensor a -OR- b -OR- c -OR- d should turn-on, the conveyoroutput coil will energize and disable the conveyor. Seems ok, little chance of a problem... right? Wrong! You're probably thinking "What, is he CRAZY?" I might be, but not in this case. Read on.
What happens if we get a cable failure? (not like cable tv going out again but rather a broken wire) Believe it or not, -open circuit-failures are the most common problems that happen. Examples of opencircuit failures include-- blown fuses, broken wire connections, loosewires, failed switches, failed sensors, fried relay contacts... andthe list goes on.
Now that we understand the theory, let's redesign to be more on-guardfor such things. Suppose sensor B (in the example above) fails open.If a bad product appears we want its output to close(turn on) but nothing would happen and the conveyor would continue on its merry way.(Does that explain buggy software??) How about if a wire connectingsensor C to the PLC input terminal breaks? Then sensor C is of no usesince it won't stop the conveyor! Ideally, the system is tested regularly during routine maintenance and the problem would be discovered... but what if maintenance is missed??(never happens in thereal world, right?!?)
Here's a -better- solution. Lets replace the normally open sensorswith normally closed types. (i.e. their output is ON unless there's aproblem) Here's our modified plc ladder program to reflect a change:
sensor A conveyor off output
---- ----------------( )---
sensor B
---- ----
sensor C
---- ----
sensor D
---- ----
Now, if we get a cable break or another -open circuit- fault, theconveyor off output will energize and the conveyor will stop. Here, wemight get false "conveyor offs" because of a broken wire, but it'sbetter than not being able to turn the conveyor off in a bad productsituation.
Before you say that it should be a series ladder rung (for you expertsout there), remember that the physical sensors are normally closed.So, when there's no fault, they are making the ladder false.
Although the conveyor example might not be too realistic for most ofus, it shows the general theory of smart design. Of course it'sstill possible to get a failure but it's statistically smarter than itwas before. When doing your design or programming, try to think aboutthe application as much as possible (sounds obvious). Eliminate thebest chances of failure and everyone will be happy in the end!So, do I still seem crazy? Maybe so...
And remember, this example is not intended for HUMAN safety! For thatyou want to design differently.

Tuesday, 9 September 2008

Program your PLC to REMEMBER status

Imagine if you will, a relay that doesn't forget. Its memory lasts for months or even years. This relay is called a "retentive relay" because it "retains" its status after a power loss. Confused? Read on...

Here's a typical scene:
Our parts conveying center is operating as usual. At the end of the  day we shutdown the system BUT we don't want to remove all the parts currently in process. In other words, when we come back to the factory in the morning, we want to just power up the machine and continue where we left yesterday. We don't want to go through a reset cycle as that would take time away from our production. How can we do it? 

Well, we must remember the status of our conveying system... was it  moving up or down? Here's what our conveying system looks like:
  _
|  0      |{-}<--- limit switch (a)
| 0 0   |
|  0      |
|          |  
|          | <---conveying system  
|          |  
|          |  
|          |++++++ <--- tray moves up to (a), then back down to (b)
|          |  
|   0     |     
| 0o0  |<--- motor
|   0     |
|          | {-}<--- limit switch (b)  
-     
A tray starts at the bottom (limit switch b) and is loaded with parts. After the parts are placed, the motor spins and the tray moves until it hits the top (limit switch a). There the parts are unloaded. After they are unloaded, the motor spins in the opposite direction until the tray hits the bottom (limit switch b). Then the cycle repeats. Let's solve the project!  We'll first assign plc addresses to our physical inputs/outputs. INPUTS limit switch (a) = 0000 limit switch (b) = 0001 OUTPUTS motor spin up = 0500 motor spin down = 0501      The ladder logic will look like this: ((MOTOR SPIN UP SECTION))   0001       0000    0500 ---| |---|---|/|-----( )--                |   0500   | ---| |---+

((MOTOR SPIN DOWN SECTION))
  0000       0001    0501
---| |---|---|/|-----( )--
               |
  0501    |
---| |---+

If the tray starts at the bottom, limit switch b (0001) is physically on and limit switch a (0000) is physically off. So, logic flows to the motor (0500) and it spins, moving the tray up. Notice that 0500 is latched on now and the limit switch b (0001) becomes physically off.

Eventually the tray hits the top limit switch a (0000) which unlatches 0500 and forces (motor spin down) 0501 to turn on. When the tray goes down enough to hit limit switch b (0001), the cycle will repeat.

BUT, if we lose power and the tray is somewhere between limit switches a and b, the latch on either 0500 or 0501 will be lost when power to the PLC is returned. In that case we need a "homing button" to return the tray to a "home" position. What if we don't want the tray to return home, but rather we want it to continue in the direction it was going before we lost power? In that case we need to use "retentive relays". Retentive relays simply retain their status when when the plc powers off and then back on again. So, if the relay was off when the power was lost, it will be off when the power returns. And, if the relay was on when the power was lost then it will again be on when the power returns.

Typically, a plc has internal utility relays that can be made to be retentive or not. Most will not have a function to make the real world outputs retentive. So, let's then modify the program to include retentive internal utility relays. In our example, we'll use two and they'll be addressed as 1000 and 1001.

INTERNAL RELAYS
retentive relay (c) = 1000
retentive relay (d) = 1001
INPUTS
limit switch (a) = 0000
limit switch (b) = 0001
OUTPUTS
motor spin up = 0500
motor spin down = 0501 
   
The ladder logic will NOW look like this:

((MOTOR SPIN UP SECTION))
  0001       0000    1000
---| |---|---|/|-----( )--
               |
  1000   |
---| |---+
  1000                     0500
---| |---------------( )--  
   
((MOTOR SPIN DOWN SECTION))
  0000       0001    1001
---| |---|---|/|-----( )--
               |
  1001    |
---| |---+ 
  1001                     0501
---| |---------------( )--  
   
So, now if the power is lost and then returned, 1000 and 1001 will retain their status as just before power was lost. Then the motor will continue moving in the direction it was going before the power loss.

Monday, 7 July 2008

Design Database Relasional

Menyimpan data dalam bentuk relasional secara sederhana dapat dikatakan sebagai membawa data tersebut ke dalam suatu bentuk tabel. Bagaimanas agar tabel yang digunakan untuk menimpan data terbentuk secara baik dan benar ? diperlukan suatu langkah desain database agar tabel yang dibuat dapat memenuhi syarat-syarat model relasional. Desain database secara umum dapat dibagi dalam empat langkah :

  • Menetukan Kebutuhan
  • Desain Konseptual
  • Desain Logikal
  • Desain Fisik

Untuk menentukan kebutuhan dapat dilakukan dengan mendapatkan informasi sebanyak-banyaknya. Sedangkan desain konseptual adalah dengan menggunakan ER model. Hasil dari desain konseptual adalah skema konseptual. Model Data relasional didapat kan dari perubahan model konseptual dengan menggunakan desain logik. Setiap informasi dalam model relasional irepresentasikan secara jelas dalam level logik, yaitu hanya dengan satu cara, yakni dengan nilai-nilai pada tabel tersebut. Desain fisik mengubah skema fisik. Dalam mode relasional, langkah-langkah desain database adalah sebagai berikut :

1. Mengumpulkan Informasi
Mengumpulkan informasi adalah langkah pertama yang harus ditempuh. Pada langkah ini harus didapatkan informasi selenkap-lengkapnya. Berbagai metode pengumpulan data dapat digunakan pada langkah ini. Bilamana sebelumnya telah memiliki suatu database, baik yang berupa flatfile, spreadsheet ataupun relasional, hal itu perlu mendapat perhatian.

2. Menentukan Entitas
Setelah semua informasi terkumpul maka langkah selanjutnya adalah menentukan ntitas utama dari semua informasi yang telah didapatkan. Misalkan dalam data balapan Formula 1 didapatkan entitas utama adalah : Pembalap, Balapan, dan Mobil balap. Setelah entitas utama didapatkan maka komponen dari setiap entitas dapat ditentukan.
3. Mengubah Entitas ke tabel
Setelah entitas dan komponen ditentukan maka kemudian masing-masing entitas dapat diubah dalam tabel. Langkah ini memungkinkan terjadinya penambahan suatu komponen. Misalkan ada suatu komponen alamat tersebut dalam sebuah entitas, maka dalam tabel alamat tersebut dapat menjadi : nama jalan, kecamatan, kelurahan, kode pos dan lain-lain. Pada contoh ini entitas utama dan komponen dapat langsung menjadi tabel tanpa harus mengalami perubahan.

4. Merelasikan Masing-masing tabel.
Ada tabel yang dihubungkan antara satu dengan yang lain. Hal ini menyebabkan terbentuknya relasi antartabel.

Saturday, 5 July 2008

Programmable Logic Controller

Introduction


Generally speaking, process control system is made up of a group of electronic devices and equipment that provide stability, accuracy and eliminate harmful transition statuses in production processes. Operating system can have different form and implementation, from energy supply units to machines. As a result of fast progress in technology, many complex operational tasks have been solved by connecting programmable logic controllers and possibly a central computer. Beside connections with instruments like operating panels, motors, sensors, switches, valves and such, possibilities for communication among instruments are so great that they allow high level of exploitation and process coordination, as well as greater flexibility in realizing an process control system. Each component of an process control system plays an important role, regardless of its size. For example, without a sensor, PLC wouldn’t know what exactly goes on in the process. In automated system, PLC controller is usually the central part of an process control system. With execution of a program stored in program memory, PLC continuously monitors status of the system through signals from input devices. Based on the logic implemented in the program, PLC determines which actions need to be executed with output instruments. To run more complex processes it is possible to connect more PLC controllers to a central computer. A real system could look like the one pictured below:


























At the outset of industrial revolution, especially during sixties and seventies, relays were used to operate automated machines, and these were interconnected using wires inside the control panel. In some cases a control panel covered an entire wall. To discover an error in the system much time was needed especially with more complex process control systems. On top of everything, a lifetime of relay contacts was limited, so some relays had to be replaced. If replacement was required, machine had to be stopped and production too. Also, it could happen that there was not enough room for necessary changes. control panel was used only for one particular process, and it wasn’t easy to adapt to the requirements of a new system. As far as maintenance, electricians had to be very skillful in finding errors. In short, conventional control panels proved to be very inflexible. Typical example of conventional control panel is given in the following picture.



















In this photo you can notice a large number of electrical wires, time relays, timers and other elements of automation typical for that period. Pictured control panel is not one of the more “complicated” ones, so you can imagine what complex ones looked like.


Most frequently mentioned disadvantages of a classic control panel are:
- Too much work required in connecting wires
- Difficulty with changes or replacements
- Difficulty in finding errors; requiring skillful work force
- When a problem occurs, hold-up time is indefinite, usually long.




With invention of programmable controllers, much has changed in how an process control system is designed. Many advantages appeared. Typical example of control panel with a PLC controller is given in the following picture.


















Advantages of control panel that is based on a PLC controller can be presented in few basic points:
1. Compared to a conventional process control system, number of wires needed for connections is reduced by 80%
2. Consumption is greatly reduced because a PLC consumes less than a bunch of relays
3. Diagnostic functions of a PLC controller allow for fast and easy error detection.
4. Change in operating sequence or application of a PLC controller to a different operating process can easily be accomplished by replacing a program through a console or using a PC software (not requiring changes in wiring, unless addition of some input or output device is required).
5. Needs fewer spare parts
6. It is much cheaper compared to a conventional system, especially in cases where a large number of I/O instruments are needed and when operational functions are complex.
7. Reliability of a PLC is greater than that of an electro-mechanical relay or a timer.
First, you need to select an instrument or a system that you wish to control. Automated system can be a machine or a process and can also be called an process control system. Function of an process control system is constantly watched by input devices (sensors) that give signals to a PLC controller. In response to this, PLC controller sends a signal to external output devices (operative instruments) that actually control how system functions in an assigned manner (for simplification it is recommended that you draw a block diagram of operations’ flow). Secondly, you need to specify all input and output instruments that will be connected to a PLC controller. Input devices are various switches, sensors and such. Output devices can be solenoids, electromagnetic valves, motors, relays, magnetic starters as well as instruments for sound and light signalization. Following an identification of all input and output instruments, corresponding designations are assigned to input and output lines of a PLC controller. Allotment of these designations is in fact an allocation of inputs and outputs on a PLC controller which correspond to inputs and outputs of a system being designed. Third, make a ladder diagram for a program by following the sequence of operations that was determined in the first step.Finally, program is entered into the PLC controller memory. When finished with programming, checkup is done for any existing errors in a program code (using functions for diagnostics) and, if possible, an entire operation is simulated. Before this system is started, you need to check once again whether all input and output instruments are connected to correct inputs or outputs. By bringing supply in, system starts working.

introduction PLC

What Does PLC means?
A PLC (Programmable Logic Controllers) is an industrial computer used to monitor inputs, and depending upon their state make decisions based on its program or logic, to control (turn on/off) its outputs to automate a machine or a process.

NEMA defines a PROGRAMMABLE LOGIC CONTROLLER
as:
“A digitally operating electronic apparatus which uses a programmable memory for the internal storage of instructions by implementing specific functions such as logic sequencing, timing, counting, and arithmetic to control, through digital or analog input/output modules, various types of machines or processes”.

Traditional PLC Applications

*In automated system, PLC controller is usually the central part of a process control system.
*To run more complex processes it is possible to connect more PLC controllers to a central computer.

Disadvantages of PLC control
- Too much work required in connecting wires.
- Difficulty with changes or replacements.
- Difficulty in finding errors; requiring skillful work force.
- When a problem occurs, hold-up time is indefinite, usually long.

Advantages of PLC control
* Rugged and designed to withstand vibrations, temperature, humidity, and noise.
* Have interfacing for inputs and outputs already inside the controller.
* Easily programmed and have an easily understood programming language.

Sunday, 22 June 2008

Pengenalan PLC (Programmable Logic Controller)

Dalam Era globalisasi saat in i efisiensi menjadi tuntutan disegala bidang usaha sebagai salah satu kunci sukses dalam persaingan industri. Efisiensi industri berarti.






  • Kecepatan dalam menghasilkan produk dari peralatan produksi ataupun line prouksi.


  • Menurunkan biaya material dan efisiensi pemakaian tenaga kerja


  • Meningkatkan kualitas dan menurunkan reject


  • Meminimalkan downime dari mesin produksi


  • Biaya peralatan produksi murah.




PLC memenuhi kebanyakan dari persyaratan iatas dan merupakan salah satu kunci dalam meningkatkan efisiensi produksi dalam industri.




Secara tradisional, otomasi hanya diterapkan untuk suatu tipe produksi dengan jumlah yang tinggi. Tetapi kebutuhan kini menuntut otomatisasi dari bermacam-macam produk dalam jumlah yang sedang, sebagaimana untuk mencapai produktivitas keseluruhan yang lebih tinggi dan memerlukan investasi minimum dalam pabrik dan peralatan. (Flexible Manufacturing System) FMS menjawab kebutuhn ini. Sisitem ini mencakup peralatan otomatik seperti mesin NC, robot industri, transport otomatik dan produksi yang terkontrol komputer.




Latar Belakang dan Perkembangan




Sebelum adanya PLC, sudah banyak peralatan kontrol sekuensial, semacam shft dan drum. Ketika relay muncul, panel kontrol dengan relay menjadi kontrol sekuensial yang utama. Ketika transistor muncul, solid state relay diterapkan pada bidang dimana relay elektromagnetik tidak cocok diterapkan seperti untuk kontrol dengan kecepatan tinggi. Sekarang sistem kontrol sudah meluas sampai ke seluruhan pabrikdan sistem kontrol total dikombinasikan kontrol dengan feedback, pemrosesan data dan sistem monitor terpusat.




Sistem kontrol logika konvensional tidak dapat melakukan hal-hal tersebut dan PLC diperlukan untuk itu. Perbandingan antar Wired Logic dengan PLC adalah sebagai berikut :

xxxxxxxxxxxxxxxx WIRED LOGIC xxxx PLC


Apa yang dapat dilakukan PLC( Programmable Logic Controler) ?? dan Keuntungannya


    Banyak hal yang dapat dikerjakan oleh PLC :


    Sequent Control :



    • Pengganti relay kontrol logik konvensional

    • Pewaktu/pencacah

    • Pengganti pengontrol card (PCB)

    • Mesin kontrol Auto/semi-auto/Manual dari berbagai proses industri.


    Kontrol Kompleks :



    • Operasi Aritmatika

    • Penanganan Informasi

    • Kontrol Analog (Suhu, tekanan, dll)

    • PID (Proporsional Integrator Diferensiator)

    • Fuzzy Logic

    • Kontrol Motor Servo


    Kontrol Pengawasan :



    • Proses monitor dan alarm

    • Monitor dan diagnosa kesalahan

    • Antarmuka dengan komputer (RS232C/RS422)

    • Antarmuka dengan printer ASCII

    • Jaringan kerja otomatisasi pabrik

    • Local Area Network

    • Wide Area Network



    Keuntungan penggunaan PLC


    Dalam melakukan pemilihan peralatan kontrol i industri ada hal-hal tertentu yang menjadi pertimbangan baik dari sudut teknis dan tentunya dari faktor ekonomis.


    Keuntungan dari penggunaan PLC dapat diuraikan sebagai berikut :



    • Waktu implementasi proyek dipersingkat

    • Modifikasi lebih mudah tanpa biaya tambahan

    • Biaya proyek dapat dikalkulasi dengan akurat

    • Training penguasaan teknik lebih cepat

    • Perancangan dengan mudah diubah dengan software(Perubahan dan penambahan dapat dilakukan pada software)

    • Aplikasi Kontrol yang luas

    • Maintenance yang mudah (Indikator Input dan Output dengan cepat dan mudah dapat diketahui pada sebuah system. Konfigurasi output dengan tipe relay plug-in

    • Keandaan tinggi

    • Perangkat kontroller standar

    • Dapat menerima kondisi lingkungan industri yang berat.