1

PLC Programs

A typical PLC application program is created in a format called ladder logic.

46101

1

2

3

 

Input 1

 

 

 

Output 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Input 2

 

 

 

Output 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Input 3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Input 4

Input 5

Output 3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Each symbol in the ladder logic represents a type of input, output, or other program action. There are many types of symbols. The three symbols shown above are:

Inputs

Output

46102

normally±open

normally±closed

coil

contact

contact

 

In the ladder logic, each line or group of lines that ends in an action being performed, such as an output being sent, is called a rung. In the example above, there are three rungs.

Power Flow in a Program

The PLC executes the logic in the ladder from top to bottom, one rung at a time. Within each rung, the execution flows from left to right. This movement of program execution through the ladder can also be thought of as power flow. In the example:

Rung 1: Input 1 represents a switch. It is shown in the ladder logic program as a ªnormally±openº contact. When the switch is turned on, the input 1 con- tact closes and power flows across rung 1 to the coil labelled Output 1.

Rung 2: Rung 2 begins at the left side with two lines of logic that lead to the same output on the right. In this type of rung, which can have several lines beginning on the left, the output is ON if any of the input lines can be completed. In this rung, if either Input 2 or Input 3 is closed, Output 2 is turned ON.

Rung 3: Rung 3 illustrates the use of multiple inputs in the same line of logic. All of these inputs must be completed for the output to be ON. In this exam- ple, Input 4 must be closed (active), and Input 5 must be closed (inactive) for Output 3 to be set to ON.

GFK-0804B

Chapter 1 Programming for the Micro PLC

1-3

Page 11
Image 11
GE GFK-0804B manual PLC Programs, Power Flow in a Program