0% found this document useful (0 votes)
210 views38 pages

Programmable Logic Controllers: Unit 2

The document provides an overview of the steps to program a Programmable Logic Controller (PLC). The 6 steps are: 1) finding a wiring diagram, 2) wiring inputs and outputs, 3) installing programming software, 4) networking the PLC, 5) programming ladder logic, and 6) wiring any outputs. It also discusses concepts like contacts, coils, and the program scan cycle in which the PLC reads inputs, executes the program, and updates outputs.

Uploaded by

ethan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
210 views38 pages

Programmable Logic Controllers: Unit 2

The document provides an overview of the steps to program a Programmable Logic Controller (PLC). The 6 steps are: 1) finding a wiring diagram, 2) wiring inputs and outputs, 3) installing programming software, 4) networking the PLC, 5) programming ladder logic, and 6) wiring any outputs. It also discusses concepts like contacts, coils, and the program scan cycle in which the PLC reads inputs, executes the program, and updates outputs.

Uploaded by

ethan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Programmable Logic

Controllers

UNIT 2

- BY RASHMI SHARMA
2
PLC PROGRAMMING PROCEDURE

 Programming a PLC is an incredibly important aspect of any position in industrial automation. By


knowing how to accurately and quickly set up and program a PLC one can effectively streamline any
industrial process. 
 PLCs require multiple different skills from wiring to networking all the way down to a fundamental
understanding of ladder logic systems. 
 Step 1: Finding a Wiring Diagram
 Step 2: Wiring
 Step 3: Install Programs
 Step 4: Networking
 Step 5: Programming
 Step 6: Wiring Outputs
3
Step 1: Finding a Wiring Diagram

 The first step of programming any PLC is to wire it correctly. 


 For example, after identifying the Micrologix PLC being used, it is essential to find a wiring diagram and
understand the polarity and position of each input and output.
 Each individual Micrologix model may contain different inputs and outputs. Wiring any of these incorrectly can
cause a catastrophic failure and may damage the PLC. 
4
Step 2: Wiring

 Begin laying out the industry standard terminal blocks around the PLC on the DIN rail. Build the terminal blocks in
a way that meets safety standards as well as provides access to all terminals.
 Begin wiring a circuit breaker using local safety standards. Always ensure the breaker is open to avoid prematurely
energizing the system. 
 After wiring the breaker attach the outputs of the breaker to their respective terminal block clusters and any DC
power supplies that may be necessary for the job.
 After wiring the first set of terminal blocks, with the PLC still disconnected, close the breaker and check for shorts
that could damage the PLC.
 Lastly, wire the PLC using its respective diagram and make sure all AC and or DC inputs and outputs are energized
properly. 
 After wiring a PLC energize it to ensure it powers on correctly. If the PLC behaves strangely or doesn’t boot at all,
immediately check the wiring to ensure accuracy.
5
Step 3: Install Programs

 Once the wiring has been double checked and the PLC is booting correctly begin installing the correct
software on the device being used to program the PLC. 
 For Micrologix Allen Bradley systems use RsLogix500 and RsLinx to program and network the PLC. 
 Ask a local administrator, IT specialist, or manager for the install files and all necessary serial numbers and
product keys.
 Upon completing setup of all necessary programs make sure to restart the device to ensure a completed install.
6
Step 4: Networking

 First assign the PLC an IP under the networking tab on the Micrologix device itself. An example IP is
“172.72.7.2”. 
 Configure the PLCs address and connect it to the programming device using ethernet. Open the networking and
sharing center tab on the device being used to program. 
 Click on “change adapter settings.” Next, right click on “ethernet” and select properties. Left click on “IPV4” and
select properties. Check the box that says “use the following IP address.” Use the same IP address as registered on
the PLC, however, change the final number. 
 An example IP is “172.72.7.1”. After inputting the IP into the programming device “OK” and close all windows.
 Open RsLinx next, click the communication drop down tab and open “RsWho.” Once RsLinx has detected the
networked PLC click on the ethernet connection. Lastly double click on the PLC labeled by its IP to ensure a
connection.
7
Step 5: Programming

 The first thing that should always be done upon first activating a PLC is to upload the program already on the PLC
to the programming device. 
 This ensures no valuable programs are lost from the PLC and are forced to be rewritten. 
 After uploading the installed program be sure to save and back it up just in case it is of any importance. 
 Finally, program the PLC using a background understanding of ladder logic, schematic diagrams of the project to be
programmed, and the debug feature that enables the program to be tested preemptively for errors. 
 Once all errors have been rectified download the program to the PLC identically to how the program was uploaded
from it.
8
Step 6: Wiring Outputs

 Upon completion of the programming portion, shut down the PLC breaker and begin wiring the outputs of the
PLC. 
  It is crucial to double check the programming of the PLC before wiring outputs. 
 An incorrect program goes from being an error to a potentially hazardous situation once the PLC has control of
external real world outputs that can prove very dangerous.
 The outputs should be wired using the very same DIN rail and terminal block set up as the inputs used. 
  Always ensure all wiring is to code and safe before proceeding. Before powering the system for the final run
ensure all wiring is exactly to code and no shorts or errors are present that could cause unexpected consequences.
 Finally, power on the PLC and activate the process.
9
CONTACTS AND COILS

 The fundamental element of a ladder diagram is a "Contact".


 A contact has only two states: open or closed. An open contact breaks the current flow whereas a closed contact
allows current to flow through it to the next element. 
 The simplest contact is an On/OFF switch which requires external force (e.g. the human hand) to activate it. 
 Limit switches are those small switches that are placed at certain location so that when a mechanical device
moves towards it, the contact will be closed and when the device moves away from it, the contact will be open. 
10
CONTACTS AND COILS

 If a contact is connected to a load and the contact is closed, the load will be turned ON.
 The vertical line on the left is the "Power" line, current must flow through the "Switch"
contact in order to turn ON the load "Lamp". 
11
TYPES OF CONTACTS
12
COILS

 A PLC output is really just an internal relay with a physical connection that can supply
electrical power to control an external load. Thus, like a relay, an output can also have
unlimited number of contacts that can be used in the ladder program.
 Each Coil is tied to a specific Bit of data. 
13
PROGRAM SCAN

 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 deenergizes the outputs according to the user program.
 This process is known as a program scan cycle.
14
15
PROGRAM SCAN

 Because the inputs can change at any time, it constantly repeats this cycle as long as the PLC is in the RUN mode.
 The time it takes to complete a scan cycle is called the scan cycle time and indicates how fast the controller can
react to changes in inputs.
 The time required to make a single scan can vary from about 1 to 20 ms.
 If a controller has to react to an input signal that changes states twice during the scan time, it is possible that the
PLC will never be able to detect this change.
 For example, if it takes 8 ms for the CPU to scan a program, and an input contact is opening and closing every
4 ms, the program may not respond to the contact changing state.
 The CPU will detect a change if it occurs during the update of the input image table file, but the CPU will not
respond to every change.
16

The speed of the The length of the


The scan time processor module ladder program

is a function of
the following:

The type of instructions The actual ladder


executed true/false conditions
17
Overview of Data Flow during SCAN Process
18
Overview of Data Flow during SCAN Process

 Examine the status of the input image table bits.


 Solve the ladder logic in order to determine logical continuity.
 Update the appropriate output image table bits, if necessary.
 Copy the output image table status to all of the output terminals. Power is applied to the
output device if the output image table bit has been previously set to a 1.
 Copy the status of all of the input terminals to the input image table. If an input is active
(i.e., there is electrical continuity), the corresponding bit in the input image table will be
set to a 1.
19
Evaluating ladder logic rung conditions
20
Evaluating ladder logic rung conditions

 If the rung-condition-in to an input instruction is true, the controller evaluates the instruction
and sets the rung-condition-out to match the results of the evaluation.
 If the instruction evaluates to true, the rung condition-out is true.
 If the instruction evaluates to false, the rung condition-out is false.
 If the rung-condition-in to an output instruction is true, the rung-condition-out is set to true.
 If the rung-condition-in to an output instruction is false, the rung-condition-out is set to false.
21
Scan process applied to a single rung program
22
Scan process applied to a single rung program

 If the input device connected to address I:3/6 is closed, the input module circuitry senses voltage at the input
terminal and a 1 (ON) condition is entered into the input image table bit I:3/6.
 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.
23
Scan process applied to a multiple rung program
24
Scan process applied to a multiple rung program

 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.
 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.
 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 devices changes when the processor is in step 2 or 3, the output condition will not react to
them until the next processor scan.
25
PLC Programming Languages

 The term PLC programming language refers to the method by which the user communicates information to the
PLC.
 The standard IEC 61131 (Figure 5-14) was established to standardize the multiple languages associated with PLC
programming by defining the following five standard languages.
26
PLC Programming Languages

 Ladder Diagram (LD)—a symbolic depiction of instructions arranged in rungs similar to


ladderformatted schematic diagrams.
 Function Block Diagram (FBD)—a graphical depiction of process flow using simple and complex
interconnecting blocks.
 Sequential Function Chart (SFC)—a graphical depiction of interconnecting steps, actions, and
transitions.
 Instruction List (IL)—a low-level, text-based language that uses mnemonic instructions.
 Structured Text (ST)—a high-level, text-based language such as BASIC, C, or PASCAL specifically
developed for industrial control applications.
27
PLC Programming Languages

 Ladder diagram language is the most commonly used PLC language and is designed to mimic relay logic.
 The ladder diagram is popular for those who prefer to define control actions in terms of relay contacts and coils,
and other functions as block instructions.
28
PLC Programming Languages

 The instructional list consists of a series of instructions that refer to the basic AND, OR, and NOT logic gate
functions.
 Functional block diagram programming uses instructions that are programmed as blocks wired together on screen to
accomplish certain functions.
 Typical types of function blocks include logic, timers, and counters. Functional block diagrams are similar in layout
to electrical/electronic block diagrams used to simplify complex systems by showing blocks of functionality.
 The primary concept behind a functional block diagram is data flow. Function blocks are linked together to complete
a circuit that satisfies a control requirement.
 Data flow on a path from inputs, through function blocks or instructions, and then to outputs.
29
Functional Block diagram
30
Sequential Function Chart

 Sequential function chart programming language is


similar to a flowchart of your process.
 SFC programming is designed to accommodate the
programming of more advanced processes.
 This type of program can be split into steps with multiple
operations happening in parallel branches.
31
Structured Text

 Structured text is a high-level text language primarily used to implement complex


procedures that cannot be easily expressed with graphical languages.
 Structured text uses statements to define what to execute.
 For this application, the objective is to energize SOL 1 whenever either one of the two
following circuit conditions exists:
• Sensor 1 and Sensor 2 switches are both closed.
• Sensor 3 and Sensor 4 switches are both closed and sensor 5 switch is open.
32
Instruction Addressing

 To complete the entry of a relay-type instruction, you must assign an address to each instruction.
 This address indicates what PLC input is connected to what input device and what PLC output will drive what
output device.
 The addressing of real inputs and outputs, as well as internals, depends on the PLC model used.
 Addressing formats can vary from one PLC family to another as well as for different manufacturers.
 These addresses can be represented in decimal, octal, or hexadecimal depending on the number system used by the
PLC.
 The address identifies the function of an instruction and links it to a particular bit in the data table portion of the
memory.
33
Instruction Addressing

 Addresses contain the slot number of the module where input or output devices are connected. Addresses are
formatted as file type, file number, slot number, and bit.
34
I/O connection diagram

 Allen-Bradley Logix 5000 controllers offer a


more flexible method of addressing memory
space. Instead of a fixed device with a fixed
address space, tags are used for assigning and
referencing memory spaces.
 Tags are a pure text based addressing scheme
and a departure from the more conventional ways
of programming PLCs.
 Here, inputs and outputs are typically represented
by squares and diamonds, respectively.
35
Branch Instructions

 Branch instructions are used to create parallel paths of input condition instructions. This
allows more than one combination of input conditions (OR logic) to establish logic
continuity in a rung.
36
Input Branching

 Input branching by formation of parallel branches can be used in your application program to allow more than one
combination of input conditions.
 If at least one of these parallel branches forms a true logic path, the rung logic is true and the output will be
energized.
 If none of the parallel branches complete a logical path, logic rung continuity is not established and the output will
be de-energized.
 Here, either A and B, or C provides logical continuity and energizes output D.
37
Output Branching

 On most PLC models, branches can be established at both input and output portions of a rung.
 With output branching, you can program parallel outputs on a rung to allow a true logic path to control multiple
outputs.
 When there is a true logic rung path, all parallel outputs become true. In the example shown, either A or B provides a
true logical path to all three output instructions: C, D, and E.
 Additional input logic instructions (conditions) can be programmed in the output branches to enhance conditional
control of the outputs.
 When there is a true logic path, including extra input conditions on an output branch, that branch becomes true.
 Here, either A and D or B and D provide a true logic path to E.
38
Nested Branching

 Input and output branches can be nested to avoid redundant instructions and to speed up
processor scan time.
 A nested branch starts or ends within another branch.
 In some PLC models, the programming of a branch circuit within a branch circuit or a
nested branch cannot be done directly.
 It is possible, however, to program a logically equivalent branching condition.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy