Programmable logic controller

This is an old revision of this page, as edited by 213.253.39.10 (talk) at 10:56, 31 July 2002 (sp.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A programmable logic controller or PLC is an electronic appliance designed to replace a bulky cabinet full of relay logic.

It consists of a small computer running a program. The program reads the inputs of the logic controller, calculates a custom logic function, and then produces the outputs.

Unlike general purpose computers, PLCs are designed to be used by electricians who train on the job. They are usually programmed in a language called "ladder logic", which strongly resembles a blueprint of relay logic. PLCs are also available that can be programmed in more traditional programming languages.

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 designing a relay based control system. 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.

A PLC programmer numbers the contacts and coils and decides which relays are powered when.

PLCs generally accept contact closures (like buttons and switches) as inputs, and provides some set of switches as output.

PID Loops

PLCs often also include logic for single-variable generic industrial feedback loop, a "proportional, integral, derivative" loop, or "PID loop." A PID loop is the standard solution to many industrial control processes that require proportional control. The basic idea is that the controller reads a sensor. Then it subtracts the read value from a "setpoint" to determine an "error".

The error is then treated in three different ways:

  • To handle the present, the error is multiplied by a proportion, the "P" of the pid loop.
  • To handle the past, the error is averaged over a period of time, where that time is the "I" of the PID loop.
  • To handle the future, the rate of change of the variable is multipled by another constant.

All these are added to the last output of the PID loop.

To tune a PID loop, first set the I and D values to zero. Increase the P until the output of the loop oscillates. Then increase I until oscillation stops. FInally, adjust D until the loop is acceptably quick to reach its setpoint.

Many companies manufacture PLCs including Zworld, GE Fanuc, Microchip (makers of PIC microcontrollers).