Ladder logic is the language used to communicate between humans and the PLC. It is called ladder logic because the form resembles that of a step ladder. Since the invention of ladder logic back in the 1970's, the need for hard wire machine control has become something of the past. In order to operate a functional PLC it is essential that an operator understand the program language which controls an automated machine. In the past, languages such as FORTRAN and C have made programming hard to learn. Programming using these old languages required the best trained engineers. The beauty of ladder logic is the code language is set up so that a high level of understanding is not essential to start programming. (Transtronics, 2001)

 

Ladder logic is set up in a sequence of left (inputs) and right (outputs) with conditionals in between. It is here where conditionals act upon a device and control its functions. To simplify the language, the code uses X's for the inputs and Y's for the outputs. Since PLC's use multiple inputs and outputs, each input is specified as X0001 or X0002 and Y0001 or Y0002 for outputs. PLC's can have anywhere from a few inputs and outputs to a few hundred depending on the machinery it is controlling. As stated above, conditionals control the feedback of an input signal. For example, an input signal is received by the plc in X0001 and the next conditional in line is a delay timer (02000 TON T002) stating an input signal must be delayed 20 seconds (2000 multiplied by 10ms = 20 seconds) before activating (turning on or TON) a output signal (T002 specifies which timer to use and in this case, it is timer 002). The ladder logic would looks something like this: (Transtronics, 2001)


|----------|X0001|-------- (02000 TON T002) ----------|Y0001|------------|

 

For someone to look at this without explanation, it would be undoubtedly nerve-racking. After mild exposure to ladder logic a programmer potentially has the ability to start programming ladder logic into a PLC. The heart of ladder logic is the if/then statement. The PLC is faced with this after every input signal received. If input X0001 receives an impulse signal from a weight sensor, and the program says "if" a signal is received "then" it is supposed to activate a pneumatic blow of nozzle after 75ms. It is that easy.

After each step of logic (a rung similar to the rung of a step ladder) another follows with more signal inputs and outputs. Depending on the size of the PLC, this logic can continue for quite some time. It is essential that at the end of each ladder, there is an (END) command specifying that the code is finished and it should recycle. If this (END) command is not registered the PLC can not start cycling. (Bullock, 1997)


Home

history

what are plc's

how they work

ladder logic

work cited


questions or concerns