Programmable logic controller: Difference between revisions

Content deleted Content added
added to A/D I/O section, changed beginning
m re intro'd programming section
Line 16:
 
=== Programming ===
PLCs programs are generally written in a special application on a personal computer then downloaded over a custom cable to the PLC. The program is stored in the PLC either in battery-backed-up [[RAM]] or some other non-volatile memory.
 
Early PLCs were designed to be used by electricians who train on the job. These PLC's were programmed in "[[ladder logic]]", which strongly resembles a schematic of relay logic. Modern PLCs can be programmed in ladder logic or in more traditional programming languages such as C.
 
In ladder logic, a [[relay]] coil, or just 'coil', can open or close any number of contacts, the switches which a relay controls. This can make ladder logic on a PLC easier then using real relays which seldom have more then four contacts. A PLC programmer lays out these virtual contacts and coils on their PC then downloads the program to a PLC to control a process or machine in the real world.
In addition to normal relays, ladder logic allows for math functions through [[black box]] pieces that are integrated into the ladder. A simple addition function may count the number of times a button is pushed.