When the input coil is not energized, the normally closed contacts will be closed conducting. The output contacts are shown with two parallel lines. Statement List In statement-list programming approach, an instruction set similar to assembly language for a microprocessor is used. Figure 8 — Ladder logic to controlling one light with three switches The second solution assumes that each switch can turn the light on or off, regardless of the states of the other switches. The ladder diagram consists of two vertical lines representing the power rails. The circuit shown in Figure 6 is an example of this and it is called a seal-in circuit. Figure 1 — Simple relay layouts and schematics Relays are normally drawn in a schematic form using a circle to represent the input coil.
When the relay coil is energized, contacts of the relay change their state, i. How to create and use Function blocks in the project In this video you will learn how to create customized function blocks in the project and call them in the main program. The input B will only be on when the output B is on. If B is off, and A is energized then B will turn on. . An input can come from a sensor, switch, or any other type of sensor.
Thus, for an automatic drilling machine, there might be a condition that the drill motor is to be activated when limit switches are activated that indicate the presence of the workpiece and the drill position as being at the surface of the workpiece. If B turns on then the input B will turn on, and keep output B on even if input A goes off. The ladder logic is shown in Figure 8. Circuits connected as horizontal lines between two rails are called. To interpret this diagram, imagine that the power is on the vertical line on the left-hand side, called hot rail. Figure 2 — A simple relay controller and corresponding ladder-logic The same scheme can be implemented following ladder logic as shown in Figure 2. Few symbols used to denote ladder logic inputs and outputs are shown in Figure 3 and 4 respectively.
It is important to get a clear understanding of how the controls are expected to work. Taking into consideration these ladder logic symbols, the ladder logic implemented in Figure 2 mimics the same hard-wired relay logic. Logic Functions There are many control situations requiring actions to be initiated when a certain combination of conditions is realised. Any other combination of input values will result in the output X being off. This sort of arrangement is normally employed in. The relay arrangement can be shown with the help of different schematic circuits as shown in Figure 1.
According to the relay logic diagram shown in the figure, activation of the input relay coil corresponds to the contact B, makes C output closed and activation of the input relay coil corresponds to the contact A, makes C output to get opened. You might recognize this problem as an exclusive or problem. If A is closed, the output B will turn on, and input B will also turn on which will keep output B on permanently — until power is removed. Figure 6 — A seal-in circuit Note! After B is turned on, the output B will not turn off. In this circuit, the current can flow through either branch of the circuit, through the contacts labelled A or B. Solution There are two possible approaches to this problem. In the top rung, the contacts are normally open and normally closed, which means if input A is on and input B is off then power will flow through the output and activate it.
In this example, two radically different solutions were obtained based upon a simple difference in the operation. The first assumes that any one of the switches on will turn on the light, but all three switches must be off for the light to be off. Functional blocks can have standard functions, such as those of the logic gates or counter or timers or have functions defined by the user, e. Ladder Diagrams As an introduction to ladder diagram, consider the simple relay circuit which contains a coil and contacts as shown in Figure 1. In the figure there are two rungs, and on each rung there are combinations of inputs two vertical lines and outputs circles. On the right-hand side is the neutral rail.
It is described as being a graphical language for depicting signal and data flows through Inputs blocks, these being reusable software elements. Figure 9 — Ladder logic to controlling one light in a different way with three switches Note! The magnetic field pulls a metal switch or reed towards it and the contacts touch, closing the switch. A function block is a program instruction unit which, when executed, yields one or more output values. When a voltage is applied to the input coil, the resulting current creates a magnetic field. The ladder logic is as shown in Figure 9. This method is more complex and involves thinking through all of the possible combinations of switch positions. The equivalent statement list would be as shown in Table 1.
Figure 7 — A simple ladder logic diagram Note! If the inputs are opened or closed in the right combination, the power can flow from the hot rail, through the inputs, to power the outputs, and finally to the neutral rail. Another example of ladder logic can be seen in Figure 7. The electric circuit, truth table, ladder diagram and functional block diagram for different logics are presented in Table 2. Thus, a block is represented in a manner shown in Figure 10 with the function name written in the block. .
. . . . .