Programming A Plc:Developing a Program

Developing a Program

This circuit will now be developed into a program that can be loaded into the programmable controller. Figure 54 – 3 shows a program being developed on a computer. Assume that the controller has an I/O capacity of 32, that I/O terminals 1 through 16 are used as inputs, and that terminals 17 through 32 are used as outputs.

Before a program can be developed for input into a programmable logic controller, it is necessary to assign which devices connect to the input and output terminals. This circuit contains four input devices and four output devices. It is also assumed that the motor starter for this circuit contains an overload relay that contains two contacts instead of one. One contact is normally closed and is connected in series with the coil of the

PROGRAMMING A PLC-1041

motor starter. The other contact is normally open and is used to supply an input to a programmable logic controller. If the motor becomes overloaded, the normally closed contacts will open and disconnect the motor from the line. The normally open contacts will close and provide a signal to the programmable logic controller that the motor has tripped on overload. The input devices are as follows:

A. Normally closed STOP push button

B. Normally open START push button

C. Normally open overload contact

D. A float switch that contains both a normally open and normally closed contact.

The four output devices are:

A. Solenoid valve A

B. Solenoid valve B

C. Motor starter coil M

D. Solenoid valve C

The connection of devices to the inputs and outputs is shown in Figure 54 – 4. The normally closed STOP but- ton is connected to input #1, the normally open START button is connected to input #2, the normally open overload contact is connected to input #3, and the float switch is connected to input #4.

The outputs for this PLC are 17 through 32. Output #17 is connected to solenoid A, output #18 is connected to solenoid B, output #19 is connected to the coil of the motor starter, and output #20 is connected to solenoid C. Note that the outputs do not supply the power to operate the output devices. The outputs simply complete a circuit. One side of each output device is connected to the ungrounded or hot side of a 120 V AC power line. Neutral is connected to the common terminal of the four outputs. A good way to understand this is to imagine a set of contacts controlled by each output, as shown in Figure 54 – 5. When programming the PLC, if a coil is given the same number as one of the outputs, it will cause that contact to close and connect the load to the line.

Unfortunately, programmable logic controllers are not all programmed the same way. Almost every manufacturer employs a different set of coil numbers to per- form different functions. It is necessary to consult the manual before programming a PLC with which you are not familiar. In order to program the PLC in this

PROGRAMMING A PLC-1042

example, refer to the information in Figure 54 – 6. This chart indicates that numbers 1 through 16 are inputs. Any contact assigned a number between 1 and 16 will be examined each time the programmable logic con- troller scans the program. If an input has a low (0 V) state, the contact assigned that number will remain in the state it was programmed. If the input has a high (120 V) state, the program will interpret that contact as having changed state. If it was programmed as open, the PLC will now consider it as closed.

Outputs are 17 through 32. Outputs are treated as coils by the PLC. If a coil is given the same number as an output, that output will turn on (close the contact) when the coil is energized. Coils that control outputs can be assigned internal contacts as well. Internal contacts are contacts that exist in the logic of the program only. They do not physically exist. Since they do not physically ex- ist, a coil can be assigned as many internal contacts as desired, and they can be normally open or normally closed.

The chart in Figure 54 – 6 also indicates that internal relays number from 33 to 103. Internal relays are like internal contacts. They do not physically exist. They exist as part of the program only. They are programmed into the circuit logic by inserting a coil symbol in the program and assigning it a number between 33 and 103.

Timers and counters are assigned coil numbers 200 through 264 and retentive relays are numbered 104 through 134.

PROGRAMMING A PLC-1043

Leave a comment

Your email address will not be published. Required fields are marked *