Ladder Logic Diagram (LAD) Programming:
Ladder logic Diagram (LAD programming) is very commonly used method for the PLC Programming. In Ladder programming language writing a program is equivalent to drawing a switching circuit in electronic. The ladder diagram consists of two vertical lines; these are as left most vertical line and right most vertical line. The left most vertical line representing the power rails named as hot rail while the right most vertical line representing the neutral rail. The complete circuits in ladder logic are connected with horizontal lines, i.e. the rungs of the ladder, between these two verticals lines i.e. hot and neutral rails.
How to read Ladder Logic Diagram:
To understand the ladder logic diagram we needs to know the about how does it works and perform operation. For this purpose some of the conventions are adopted, when a programmer drawing a ladder diagram and these conventions are as follows;
- At the both (left and right ends) the vertical lines of the diagram represent the power rails between which circuits are connected. The left and right lines are known as hot and neutral rail respectively. The power flow is taken to be from hot rail across a rung to neutral rail.
- In the ladder diagram each rung defines the operations in the control process.
- To understand the ladder logic the diagram is read from left to right and from top to bottom, Figure 6.1 showing the scanning motion employed by the PLC. The top rung is read from left to right i.e hot rail to neutral rail. Then the second rung down is read from left to right and so on.
Figure 6.1: Scanning of Ladder diagram
- When the PLC is in its run mode, it goes through the entire ladder program to the end, the end rung of the program being clearly denoted, and then promptly resumes at the start. This procedure of going through all the rungs of the program is termed a cycle. The end rung might be indicated by a block with the word END or RET for return, since the program promptly returns to its beginning.
- In ladder logic diagram every rung must have an input or set of inputs and rung must end with at least one output. The term input is used for a control action, such as closing the contacts of a switch and output of the sensors, used as an input to the PLC. The term output is used for a device connected to the output of a PLC, e.g. a motor, solenoid valves.
- The inputs and outputs are all identified by their addresses, the notation used depending on the PLC manufacturer. This is the address of the input or output in the memory of the PLC.
- A particular device can appear in more than one rung of a ladder. For example, we might have a relay which switches on one or more devices. The same letters and/or numbers are used to label the device in each situation.
- Electrical devices are shown in their normal condition. Thus a switch which is normally open until some object closes it, is shown as open on the ladder diagram. A switch that is normally closed is shown closed.
Basic Device notations used in PLC LAD Programming:
When a PLC programmer using the LAD programming, in each rang programmer have to represent the required devices. So as per the most required devices in the PLC a standard notation is used to represent the required devices. Mostly in PLC programming, there are six basic programming devices are required and each device has its own unique use. To enable quick and easy identification each device is assigned a single reference letter or say this single latter defines the particular existence of the available device;
- X: This is used to identify all direct, physical inputs to the PLC.
- Y: This is used to identify all direct, physical outputs from the PLC.
- T: This is used to identify a timing device which is contained within the PLC.
- C: This is used to identify a counting device which is contained within the PLC.
- M and S: These are used as internal operation flags within the PLC.
All of the devices mentioned above are known as ‘bit devices’. This is a descriptive title telling the user that these devices only have two states; ON or OFF, 1 or 0.
A Simple Example of PLC System:
Figure 6.2: A simple example of ladder logic diagram
In the Figure 6.2, shown the control a motor by the toggle switch and input limit is monitor by the limit switch. This motor control by the two switches is programmed by the Ladder diagram shown in the center part of the Figure 6.2. Let us consider X0 (Toggle switch), X1 (Limit switch) and Y0 represent the output of the logic or Y0 connected with the motor.
In this logic X0 is NO (Normally Open) i.e. when toggle switch is on/pressed; the logic X0 becomes NC (Normally Closed), its means power comes from hot rail follow the path of X0. The logic X1 is NC i.e. when the limit is crossed then the limit switch is ON and the logic X1 becomes OFF and the power flow path brake, result is no output.
Hence, to run the motor pressed the switch X0 under the limit X1. The output is gathered from Y0 i.e. motor is attached with Y0.