Ladder Diagram to Programmable Logic Controllers ( PLC )

Introduction

Programmable controllers are generally programmed in ladder diagram (or "relay diagram") which is nothing but a symbolic representation of electric circuits. Symbols were selected that actually looked similar to schematic symbols of electric devices, and this has made it much easier for electricians to switch to programming PLC controllers. Electrician who has never seen a PLC can understand a ladder diagram.

Ladder diagram

There are several languages designed for user communication with a PLC, among which ladder diagram is the most popular. Ladder diagram consists of one vertical line found on the left hand side, and lines which branch off to the right. Line on the left is called a "bus bar", and lines that branch off to the right are instruction lines. Conditions which lead to instructions positioned at the right edge of a diagram are stored along instruction lines. Logical combination of these conditions determines when and in what way instruction on the right will execute. Basic elements of a relay diagram can be seen in the following picture.
PLC

  Most instructions require at least one operand, and often more than one. Operand can be some memory location, one memory location bit, or some numeric value -number.In a case when we wish to proclaim a constant as an operand, designation # is used beneath the numeric writing (for a compiler to know it is a constant and not an address.)

Based on the picture above, one should note that a ladder diagram consists of two basic parts: left section also called conditional, and a right section which has instructions. When a condition is fulfilled, instruction is executed, and that's all!
PLC

  Picture above represents a example of a ladder diagram where relay is activated in PLC controller when signal appears at input line 0. Vertical line pairs are called conditions. Each condition in a ladder diagram has a value ON or OFF, depending on a bit status assigned to it. In this case, this bit is also physically present as an input line (screw terminal) to a PLC controller. If a key is attached to a corresponding screw terminal, you can change bit status from a logic one status to a logic zero status, and vice versa. Status of logic one is usually designated as "ON", and status of logic zero as "OFF".

Right section of a ladder diagram is an instruction which is executed if left condition is fulfilled. There are several types of instructions that could easily be divided into simple and complex. Example of a simple instruction is activation of some bit in memory location. In the example above, this bit has physical connotation because it is connected with a relay inside a PLC controller. When a CPU activates one of the leading four bits 10, relay contacts move and connect lines attached to it. In this case, these are the lines connected to a screw terminal marked as 0 and to one of COM screw terminals.


Normally open and normally closed contacts

Since we frequently meet with concepts "normally open" and "normally closed" in industrial environment, it's important to know them. Both terms apply to words such as contacts, input, output, etc. (all combinations have the same meaning whether we are talking about input, output, contact or something else).

Principle is quite simple, normally open switch won't conduct electricity until it is pressed down, and normally closed switch will conduct electricity until it is pressed. Good examples for both situations are the doorbell and a house alarm.

If a normally closed switch is selected, bell will work continually until someone pushes the switch. By pushing a switch, contacts are opened and the flow of electricity towards the bell is interrupted. Of course, system so designed would not in any case suit the owner of the house. A better choice would certainly be a normally open switch. This way bell wouldn't work until someone pushed the switch button and thus informed of his or her presence at the entrance.

Home alarm system is an example of an application of a normally closed switch. Let's suppose that alarm system is intended for surveillance of the front door to the house. One of the ways to "wire" the house would be to install a normally open switch from each door to the alarm itself (precisely as with a bell switch). Then, if the door was opened, this would close the switch, and an alarm would be activated. This system could work, but there would be some problems with this, too. Let's suppose that switch is not working, that a wire is somehow disconnected, or a switch is broken, etc. (there are many ways in which this system could become dysfunctional). The real trouble is that a homeowner would not know that a system was out of order. A burglar could open the door, a switch would not work, and the alarm would not be activated. Obviously, this isn't a good way to set up this system. System should be set up in such a way so the alarm is activated by a burglar, but also by its own dysfunction, or if any of the components stopped working. (A homeowner would certainly want to know if a system was dysfunctional). Having these things in mind, it is far better to use a switch with normally closed contacts which will detect an unauthorized entrance (opened door interrupts the flow of electricity, and this signal is used to activate a sound signal), or a failure on the system such as a disconnected wire. These considerations are even more important in industrial environment where a failure could cause injury at work. One such example where outputs with normally closed contacts are used is a safety wall with trimming machines. If the wall doors open, switch affects the output with normally closed contacts and interrupts a supply circuit. This stops the machine and prevents an injury.

Concepts normally open and normally closed can apply to sensors as well. Sensors are used to sense the presence of physical objects, measure some dimension or some amount. For instance, one type of sensors can be used to detect presence of a box on an industry transfer belt. Other types can be used to measure physical dimensions such as heat, etc. Still, most sensors are of a switch type. Their output is in status ON or OFF depending on what the sensor "feels". Let's take for instance a sensor made to feel metal when a metal object passes by the sensor. For this purpose, a sensor with a normally open or a normally closed contact at the output could be used. If it were necessary to inform a PLC each time an object passed by the sensor, a sensor with a normally open output should be selected. Sensor output would set off only if a metal object were placed right before the sensor. A sensor would turn off after the object has passed. PLC could then calculate how many times a normally open contact was set off at the sensor output, and would thus know how many metal objects passed by the sensor.

Concepts normally open and normally closed contact ought to be clarified and explained in detail in the example of a PLC controller input and output. The easiest way to explain them is in the example of a relay.
PLC

Normally open contacts would represent relay contacts that would perform a connection upon receipt of a signal. Unlike open contacts, with normally closed contacts signal will interrupt a contact, or turn a relay off. Previous picture shows what this looks like in practice. First two relays are defined as normally open , and the other two as normally closed. All relays react to a signal! First relay (10) has a signal and closes its contacts. Second relay (11) does not have a signal and remains opened. Third relay (12) has a signal and opens its contacts considering it is defined as a closed contact. Fourth relay (13) does not have a signal and remains closed because it is so defined.

Concepts "normally open" and "normally closed" can also refer to inputs of a PLC controller. Let's use a key as an example of an input to a PLC controller. Input where a key is connected can be defined as an input with open or closed contacts. If it is defined as an input with normally open contact, pushing a key will set off an instruction found after the condition. In this case it will be an activation of a relay 0.

If input is defined as an input with normally closed contact, pushing the key will interrupt instruction found after the condition. In this case, this will cause deactivation of relay 0 (relay is active until the key is pressed). You can see in picture below how keys are connected, and view the relay diagrams in both cases.
PLC

Normally open/closed conditions differ in a ladder diagram by a diagonal line across a symbol. What determines an execution condition for instruction is a bit status marked beneath each condition on instruction line. Normally open condition is ON if its operand bit has ON status, or its status is OFF if that is the status of its operand bit. Normally closed condition is ON when its operand bit is OFF, or it has OFF status when the status of its operand bit is ON.

When programming with a ladder diagram, logical combination of ON and OFF conditions set before the instruction determines the eventual condition under which the instruction will be, or will not be executed. This condition, which can have only ON or OFF values is called instruction execution condition. Operand assigned to any instruction in a relay diagram can be any bit. This means that conditions in a relay diagram can be determined by a status of I/O bits, operational bits, timers/counters, etc.


author: Nebojsa Matic

Hopefully this article can add your insights.
Please follow me:

ShareTo
Share on Facebook Tweet this Share to Google Plus
CLOSE

Please enter your Email address to Download




All Labels

  1. ABB PLC
  2. Allen Bradley PLC
  3. Allen-Bradley MicroLogix
  4. Allen-Bradley PLC
  5. Analog Input
  6. Android
  7. Android and PLC
  8. Android Bluetooth
  9. Arduino
  10. Arduino Data Logging Shield
  11. Arduino Microcontroller
  12. Arduino USB Host Shield
  13. Audio and PLC
  14. Automatic Gates using PLC
  15. Baldor PLC
  16. Barcode Reader
  17. Barcode Scanner
  18. Battery Level Indicator using PLC Analog
  19. BMS
  20. Build a Simple PLC
  21. Building Management System
  22. Car Ticketing Machine using PLC
  23. CIMON PLC
  24. Click Series PLC
  25. Computer Vision
  26. Computer Vision and PLC
  27. Control Seven Segment Display with PLC
  28. Conveyor Control Using PLC
  29. CPU PLC
  30. CV and PLC
  31. CX-One
  32. Cypress
  33. Data Logging
  34. DCS
  35. DDC
  36. DELMIA V5
  37. DeltaV
  38. Digital Input
  39. DirectLogic PLC
  40. DirectSOFT PLC
  41. Eaton PLC
  42. Elevator with PLC Program
  43. EPICS PLC
  44. Fatek PLC
  45. Festo PLC
  46. Fieldbus
  47. Forex Trading and PLC
  48. FPGA PLC
  49. GE Fanuc PLC
  50. GP proface
  51. GX Developer
  52. Heater Controller with PLC
  53. Hitachi PLC
  54. HMI
  55. Home Automation
  56. Honeywell PLC
  57. IDEC PLC
  58. Internet of Things
  59. IoT
  60. Keyence PLC
  61. Koyo PLC
  62. LED Display
  63. LG PLC
  64. Lock Unlock Door Using PLC
  65. Logixpro PLC
  66. Maple OIT
  67. Matsushita PLC
  68. MELSEC A
  69. MELSEC Q
  70. Memory PLC
  71. Micro PLC
  72. Microcontroller
  73. MicroLogix 1000
  74. MicroSmart PLC
  75. Mitsubishi PLC
  76. Mobile Application
  77. Modbus
  78. ModBus Communication
  79. ModBus RTU
  80. ModBus RTU Communication
  81. Modicon PLC
  82. Momentum PLC
  83. Motion Control
  84. National Instruments PLC
  85. Omron PLC
  86. OPC
  87. PAC
  88. Panasonic PLC
  89. Parking Information using PLC
  90. Password Using PLC
  91. PLC
  92. PLC Analog Input Module
  93. PLC and Android
  94. PLC and Arduino
  95. PLC and CNC
  96. PLC and Computer
  97. PLC and Facebook
  98. PLC and PC
  99. PLC and PSoC
  100. PLC and Servo
  101. PLC and Visual Basic
  102. PLC Application Project
  103. PLC Battery
  104. PLC Beginner Guide
  105. PLC Book
  106. PLC Cable
  107. PLC Codesys
  108. PLC Companies List
  109. PLC Computers
  110. PLC Data Logging
  111. PLC Design
  112. PLC for 3 Movement
  113. PLC for Assembly Line
  114. PLC for Automatic Welding
  115. PLC for Binding Machine
  116. PLC for Cutting Machine
  117. PLC for Filling Machine
  118. PLC for Fountain Application
  119. PLC for Injection Molding
  120. PLC for Marking
  121. PLC for Packing
  122. PLC for Rotary Bottle Washing
  123. PLC for Snack Vending Machine
  124. PLC for Sorter Machine
  125. PLC for Water Treatment
  126. PLC Hardware
  127. PLC Hybrid
  128. PLC Information
  129. PLC Knowledge
  130. PLC Language
  131. PLC Link Model
  132. PLC Mitsubishi Download
  133. PLC Model
  134. PLC Modules
  135. PLC Real Time Clock
  136. PLC Simulator
  137. PLC Software
  138. PLC Supplier
  139. PLC Types
  140. PLC using Arduino
  141. PLC Wiring
  142. PLC WorkShop
  143. PLC-ANALYZER
  144. PLCSIM
  145. Power Supply for PLC
  146. Profibus
  147. Programmable Logic Controller
  148. Programmable System on Chip
  149. ProSafe PLC
  150. PSoC
  151. Push ON Push OFF with PLC
  152. Quickpanel Operator Interfaces
  153. Raspberry Pi
  154. Raspberry Pi and PLC
  155. Read Data
  156. RFID
  157. RFID System
  158. RTU
  159. RTU and PLC
  160. SAS
  161. SCADA
  162. Schneider PLC
  163. Sensor
  164. SHARP PLC
  165. Siemens PLC
  166. Simple ModBus
  167. Simple PLC
  168. SINUMERIK CNC
  169. Small Modular PLC
  170. Standard Sequence Programming for PLC
  171. Substation Automation System
  172. Teco PLC
  173. Telemetry
  174. TEP PLC
  175. Texas Instruments PLC
  176. Timer Countdown with PLC
  177. Toshiba PLC
  178. Touch Screen PLC
  179. Traffic Light with PLC
  180. TWIDO PLC
  181. Types of PLC
  182. Ultrasonic Sensor
  183. Unitary PLC
  184. Unitronics PLC
  185. USB Credit/Debit Card Reader
  186. USB Keyboard and PLC
  187. very Cheap PLC
  188. VIPA PLC
  189. Vision PLC
  190. Weighing Machine Using PLC
  191. Write Data
  192. Yokogawa PLC
  193. Zelio PLC

Search This Blog

Loading...
Copyright © 2009- All Rights Reserved