Programmable logic controller: Difference between revisions

Content deleted Content added
Patden (talk | contribs)
No edit summary
added to A/D I/O section, changed beginning
Line 1:
A '''programmable logic controller''' or '''PLC''' is a small [[computer]] used for [[automation]] of real-world processes, such as control of machinery on factory assembly lines. Where older automated systems would use hundreds or thousands of relays, a single PLC can be programmed as a replacement.
 
The PLC is a [[microprocessor]] based device with either modular or integral [[input/output]] circuitry that monitors the status of the field connected "[[sensor]]" inputs (pushbuttons, limit-switches, photo-eyes, analog transmitters, etc.) and controls the attached output "actuators" (motor starters, solenoids, pilot lights/displays, speed drives, valves, etc.) according to a user-created, logic program. The program is generally created using "relay ladder logic" development software in a PC and then downloaded and stored in the microprocessor's battery-backed [[RAM]] memory. The functionality of the PLC has evolved over the years to include capabilities beyond typical relay control; sophisticated motion control, process control, [[DCS]] and complex networking have now been added to the PLC's list of functions.
PLCs often replace bulky cabinets full of electro-mechanical relay logic. Where older automated systems would use hundreds or thousands of relays, a single PLC can be programmed as a replacement.
 
The PLC is a [[microprocessor]] based device with either modular or integral [[input/output]] circuitry that monitors the status of the field connected "[[sensor]]" inputs (pushbuttons, limit-switches, photo-eyes, analog transmitters, etc.) and controls the attached output "actuators" (motor starters, solenoids, pilot lights/displays, speed drives, valves, etc.) according to a user-created, logic program. The program is generally created using "relay ladder logic" development software in a PC and then downloaded and stored in the microprocessor's battery-backed [[RAM]] memory. The functionality of the PLC has evolved over the years to include capabilities beyond typical relay control; sophisticated motion control, process control, [[DCS]] and complex networking have now been added to the PLC's list of functions.
 
A simple program could maintain the level of water
Line 9 ⟶ 7:
 
=== Analog vs Digital Inputs and Outputs ===
SomeDigital signals behave as switches, yielding simply an On or Off signal. OthersPushbuttons, limit-switches, and photo-eyes are examples of devices providing a digital signal. Analog signals behave likeas volume controls, yielding a range of values between On and Off. Pressure transducers, scales and gas leak detectors can provide analog signals.
 
In the simple example above, the PLC is accepting two digital inputs from float switchs. The PLC is controlling a single digital output to actuate the inlet valve into the tank. If both float switches are off (down) the PLC will open the valve to let more water in. It will continue to fill until both floats lift making their switches turn on.
 
The slightly more complex example (scale and flow controller) uses analog inputs and outputs. The scale is connected to one of the PLC's analog inputs and the flow controller is connected to one of the PLC's analog outputs. In this system, we can fill at different rates based on how much water in left. If the water level drops rapidly, the flow controller can be opened wide. If water is dripping out, the flow controller can be set to allow only a small amount of water back into the tank.
 
PLCs typically have a limited number of connections built in for signals such as digital inputs, digital outputs, analog inputs and analog outputs. Typically expansions are available if the base model of a PLC does not have sufficient I/O.
 
=== Ladder LogicProgramming ===
Early PLCs were designed to be used by electricians who train on the job. TheyThese PLC's were usually programmed in a language called "[[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.