Basic Ladder Logic Programming. Programming the Unitronics V1040 PLC: Getting Started, Basic Ladder Logic, and HMI Operation.
Fundamental of Ladder logic. All electrical machine diagrams are drawn using a standard format called the ladder diagram.
Ladder diagram is used to show the electrical relationship of the components and to speed understanding of how the circuit works. Beginning with the control transformer, we add a protective fuse on the left side, which is often part of the transformer itself.
All wires in a control system are numbered. In the diagram, the left rail is often wired as 1 and the right rail is wire number 2. From the transformer/fuse combination, horizontal lines are extended to both sides and then drawn vertically down. These vertical lines are called power rails or simply rails or uprights.
Electrical ladder diagram Electrical ladder drawings are still one of the common and reliable tools used to troubleshoot equipment when it fails A type of line diagram that uses the input and output symbols used by PLC ladder logic. Line diagrams are converted to programming diagrams before being entered into a PLC. Rung. One of multiple horizontal programming lines in a ladder logic diagram. Each rung controls one output. Ladder logic instruction No The first instruction here is called examine if closed.
The symbol for the instruction looks like this: - - Nc The first instruction here is called examine if open. The symbol for the instruction looks like this: - / - Output Coil The instruction itself even has a place in the PLC memory. What the PLC will put there is the result of the instruction.
To see what the PLC uses that result for, we have to look at the next instruction:-( ). Follow Us On: Google Reviews: Facebook: Twitter: Linkedin: Google +: Youtube: Website.
1 Programmable Logic Controllers (PLCs) An Overview Photo courtesy Rockwell Automation, Inc. Chapter Objectives After completing this chapter, you will be able to: 1.1 Define what a programmable logic controller (PLC) is and list its advantages over relay systems 1.2 Identify the main parts of a PLC and describe their functions 1.3 Outline the basic sequence of operation for a PLC 1.4 Identify the general classifications of PLCs This chapter gives a brief history of the evolution of the programmable logic controller, or PLC. The reasons for changing from relay control systems to PLCs are discussed. You will learn the basic parts of a PLC, how a PLC is used to control a process, and the different kinds of PLCs and their applications. The ladder logic language, which was developed to simplify the task of programming PLCs, is introduced.
Each chapter begins with a brief introduction outlining chapter coverage and learning objectives. 1 Figure 2-49 Human Machine Interfaces (HMIs). Source: Photo courtesy Omron Industrial Automation, www.ia.omron.com. Through personal computer–based setup software, you can configure display screens to:.
Replace hardwired pushbuttons and pilot lights with realistic-looking icons. The machine operator need only touch the displayinterfacing panel to activate the Pico Human machine with pushbuttons. Show operations in graphic format for easier viewing.
Allow the operator to change timer and counter presets by touching the numeric keypad graphic on the touch screen. Show alarms, complete with time of occurrence and location. Display variables as they change over time. The Allen-Bradley Pico GFX-70 controller, shown in Figure 2-50, serves as a controller with HMI capabilities.
Figure 2-50 Allen-Bradley Pico GFX-70 controller. Source: Photo courtesy Rockwell Automation, Inc.
Controllers added. This device consists of three modular parts: an HMI, processor/power supply, and I/O modules.
The display/keypad can be used as an operator interface or can be linked to control operations to provide realtime feedback. It has the ability to show text, date and time, as well as custom messages and bitmap graphics, allowing operators to acknowledge fault messages, enter values, and initiate actions.
Users can create both the control program and HMI functionality using a personal computer with PicoSoft Pro software installed or the controller’s on-board display buttons. PLC Hardware Components Chapter 2 39 Output module. Each connected output has a bit in the output image table file that corresponds exactly to the terminal to which the output is connected.
If the program calls for a specific output to be ON, its corresponding bit in the table is set to 1. If the program calls for the output to be OFF, its corresponding bit in the table is set to 0. The processor continually activates or deactivates the output status according to the output table file status.
L2 OFF ON 0 Typically, micro PLCs have a fixed number of inputs and outputs. Figure 5-6 shows the MicroLogic controller from the Allen-Bradley MicroLogic 1000 family of controllers.
The controller has 20 discrete inputs with predefined addresses I/0 through I/19 and 12 discrete outputs with predefined addresses O/1 through O/11. Some units also contain analog inputs and outputs embedded into the base unit or available through add-on modules. 1 Word corresponding to output module Output image 5.2 Data table files When a PLC executes a program, it must know—in real time—when external devices controlling a process are changing. During each operating cycle, the processor reads all the inputs, takes these values, and energizes or de-energizes the outputs according to the user program. This process is known as a program scan cycle. Figure 5-7 illustrates a single PLC operating cycle consisting of the input scan, program scan, output scan, and housekeeping duties.
Because the inputs can change at any time, it constantly repeats this cycle as long as the PLC is in the RUN mode. Figure 5-5 Connections of pilot lights to the output image table file through the output module. Connection of two pilot lights to the output image table file through the output module. Its operation can be summarized as follows.
The status of each light (ON/OFF) is controlled by the user program and is indicated by the presence of 1 (ON) and 0 (OFF). L1 L2 AC COM I/0 I/1 I/2 I/3 AC COM VAC VDC O/0 CR L1 L2 Discrete Inputs L2 I/4 I/5 VAC VDC O/4 I/6 I/9 I/10 Program Scan L1 I/7 I/8 I/11 I/12 VAC VDC O/2 O/3 VAC VDC O/4 O/5 O/6 O/7 VAC VDC O/8 CR CR CR CR CR CR VAC 2 VDC 1 VDC 2 VAC 2 VDC 1 COM COM I/13 I/14 I/15 VDC 3 VDC 2 COM I/16 I/17 I/18 I/19 O/9 O/10 O/11 CR CR CR VDC 3 COM Discrete Outputs Figure 5-6 Typical micro PLC with predefined addresses. Source: Photo courtesy Rockwell Automation, Inc. 76 Chapter 5 Basics of PLC Programming Addressing of a micro PLC illustrated. Input module Input device Ι:3/6 Processor memory Data Input Output image image table table file file Ι:3/6 O:4/7 Output module Output device O:4/7 Field-device power supply Field-device power supply Ι:3/6 O:4/7 Program Figure 5-9 Scan process applied to a single rung program. During the program scan, the processor examines bit I:3/6 for a 1 (ON) condition. In this case, because input I:3/6 is 1, the rung is said to be TRUE or have logic continuity.
The processor then sets the output image table bit O:4/7 to 1. The processor turns on output O:4/7 during the next I/O scan, and the output device (light) wired to this terminal becomes energized. This process is repeated as long as the processor is in the RUN mode. If the input device opens, electrical continuity is lost, and a 0 would be placed in the input image table. As a result, the rung is said to be FALSE due to loss of logic continuity. The processor would then set the output image table bit O:4/7 to 0, causing the output device to turn off. Ladder programs process inputs at the beginning of a scan and outputs at the end of a scan, as illustrated in Figure 5-10.
For each rung executed, the PLC processor will: Step 1 Update the input image table by sensing the voltage of the input terminals. Based on the absence or presence of a voltage, a 0 or a 1 is stored into the memory bit location designated for a particular input terminal. Step 2 Solve the ladder logic in order to determine logical continuity. The processor scans the ladder program and evaluates the logical continuity of each rung by referring to the input image table to see if the input conditions are met. If the conditions controlling an output are met, the processor immediately writes a 1 in its memory location, indicating that the output will be turned ON; conversely, if the conditions are not met a 0 indicating that the device will be turned OFF is written into its memory location. 78 Chapter 5 Basics of PLC Programming Step 3 The final step of the scan process is to update the actual states of the output devices by transferring the output table results to the output module, thereby switching the connected output devices ON (1) or OFF (0). If the status of any input devicesexplained changes wheninthe processor Program scan process is in step 2 or 3, the output condition will not greater detail.
React to them until the next processor scan. Each instruction entered into a program requires a certain amount of time for the instruction to be executed. The amount of time required depends on the instruction. For example, it takes less time for a processor to read the status of an input contact than it does to read the accumulated value of a timer or counter. The time taken to scan Input image table 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 START Step 1 Read input module Step 2 Solve the ladder program END 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 Output image table Step 3 Transfer to output module Figure 5-10 Scan process applied to a multiple rung program. L1 Wiring of field inputs and outputs to a micro PLC illustrated.
Motor/controller Stop L2 L1 L2 Start I1 I2 Inputs Controller Servo amplifier I2 Position feedback Speed feedback Q1 Servo motor Q1 M Tachometer: speed Encoder: position Source: Photos courtesy Omron Industrial Automation, www.ia.omron.com. The motor stop/start circuit shown in Figure 6-44 is a typical example of a seal-in circuit. The hardwired circuit consists of a normally closed stop button in series with a normally open start button.
The seal-in auxiliary contact of the starter is connected in parallel with the start button to keep the starter coil energized when the start button is released. When this circuit is programmed into a PLC, both the start and stop buttons are examined for a closed condition because both buttons must be closed to cause the motor starter to operate. Figure 6-45 shows a PLC wiring diagram of the motor seal-in circuit implemented using an Allen-Bradley Pico controller. The controller is programmed using ladder logic.
Each programming element can be entered directly Stop Motor L2 starter coil L1 Q3 Motor starter coil via the Pico display. This controller also lets you program the circuit from a personal computer using PicoSoft programming software. 6.9 Latching Relays Electromagnetic latching relays are designed to hold the relay closed after power has been removed from the coil. Latching relays are used where it is necessary for contacts to stay open and/or closed even though the coil is energized only momentarily. Figure 6-46 shows a latching relay that uses two coils. The latch coil is momentarily energized to set the latch and hold the relay in the latched position.
The unlatch or release coil is momentarily Inputs Ladder logic program Stop M M Q1 Figure 6-45 Motor seal-in circuit implemented using an Allen-Bradley Pico controller. Figure 6-43 Closed-loop servo motor system.
Start Outputs Q2 Q3 Load Feedback device L1 I1 Start Stop Start Seal-in contact Output Motor starter coil L2 M Motor starter coil M Hardwired Programmed Figure 6-44 Hardwired and programmed seal-in circuit. Developing Fundamental PLC Wiring Diagrams and Ladder Logic Programs Chapter 6 111 Ladder logic program Man/Auto Low sensor switch OFF/ON I:2/4 I:2/8 Man/Auto Latch/Unlatch I:2/4 Motor O:3/1 I:2/0 B3:0/0 Man/Auto High sensor switch Latch coil L I:2/4 I:2/12 B3:0/0 Man/Auto Low sensor switch Unlatch coil I:2/4 I:2/8 B3:0/0 U Man/Auto Motor G I:2/4 O:3/1 O:3/5 Low sensor switch R I:2/8 O:3/9 High sensor switch Y I:2/12 Wiring of field inputs and outputs to a SLC 500 PLC illustrated.