Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to...
Transcript of Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to...
![Page 1: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/1.jpg)
Basic PLC
ProgrammingProgramming
Copyright © 2011 Rockwell Automation, Inc. All rights reserved.
![Page 2: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/2.jpg)
PLC Basics Agenda
1. Introduction to Terms / Conceptsp
2. Programming a PLC
3. Application Example
4. Hands-On Lab
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 2
![Page 3: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/3.jpg)
How did the “PLC” get started?
• 1968 -> GM (Hydramatic Division) approached suppliers to help with a
problem:
– Relay “walls” covered the plant floor.
– Changes and Troubleshooting took weeks/months. High costs
– Every change (model year) was major destruction and re-wiring.y g ( y ) j g
GM d d th fl ibilit f “ lid t t ” t ll th t ld bGM d d th fl ibilit f “ lid t t ” t ll th t ld bGM d d th fl ibilit f “ lid t t ” t ll th t ld bGM d d th fl ibilit f “ lid t t ” t ll th t ld bGM needed the flexibility of “solid state”; a controller that could be GM needed the flexibility of “solid state”; a controller that could be programmed and maintained by plant engineers; and was rugged programmed and maintained by plant engineers; and was rugged enough to withstand the factory environment and provided easy enough to withstand the factory environment and provided easy
troubleshootingtroubleshooting
GM needed the flexibility of “solid state”; a controller that could be GM needed the flexibility of “solid state”; a controller that could be programmed and maintained by plant engineers; and was rugged programmed and maintained by plant engineers; and was rugged enough to withstand the factory environment and provided easy enough to withstand the factory environment and provided easy
troubleshootingtroubleshootingtroubleshooting...troubleshooting...troubleshooting...troubleshooting...
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 3
�� AllenAllen--Bradley PLCBradley PLC�� AllenAllen--Bradley PLCBradley PLC
![Page 4: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/4.jpg)
What is a PLC?
• A solid state (electronic) device that controls output devices based on
programming and input signals.
Inputs
Control
Program
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 4
Outputs
![Page 5: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/5.jpg)
Two types of I/O (Inputs & Outputs)
• Analog• Has many possible states between two
values
• Digital• Also called Discrete
• Has two possible states values.
• Example: Temperature sensor.
• Range of values between two limits. For
example:
• Has two possible states
• Represented by “1” or “0”
• Electrically:
• “0” is usually 0 Volts (AC or DC)• 0°F represented by “0”
• 100°F represented by “4095” (example)
• Electrically: 4-20mA, 0-5VDC, -10 to 10VDC
y ( )
• “1” is a fixed voltage value such as
5VDC, 24VDC, 120VAC, etc.
• Technology: Relays, Triac, Transistor,
MOSFET TTLMOSFET, TTL
14095
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 5
00
![Page 6: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/6.jpg)
PLC Control Program
• Program
– Instructions used to process inputs and set outputs
• Primarily written as (Relay) Ladder Diagram:
Start_Button Light
• Programs can also be written in other languages• Programs can also be written in other languages
– Function Block or Structured Text
• Data (Variables)
– Examples
• Start_Button is assigned to a digital input
• Light is assigned to a digital outputg g g p
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 6
![Page 7: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/7.jpg)
PLC Basics Agenda
1. Introduction to Terms / Conceptsp
2. Programming a PLC
3. Application Example
4. Hands-On Lab
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 7
![Page 8: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/8.jpg)
Today's applications require a high level of control capability and advanced features
• Arithmetic (Addition, Subtraction, Multiplication, Division, etc)
• Data Comparison (Equal, Greater Than or Equal, Less Than or Equal)Data Comparison (Equal, Greater Than or Equal, Less Than or Equal)
• Word Manipulation (Copy, Move, etc)
• Communications or Messaging data between PLC’s
• Sequencing
• Data Manipulation
• Motion and Process Control
(Used for Temperature, Pressure, Speed, Flow regulation)
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 8
![Page 9: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/9.jpg)
Simple PLC Instructions (IEC 1131)
• Contacts
Direct
• Instruction Blocks
– Arithmetic (+ - * / COS SIN TAN)–Direct
–Reverse
( )
– Binary (Mask, Shift)
– Boolean (AND,OR,NOT,XOR)
• Coils
–Direct
– Comparator (< > = CMP)
– Counter (CTD, CTU, CTUD)
D t C i (ANY TO **)Direct
–Reverse
S t
– Data Conversion (ANY_TO_**)
– Process (PID, SCALER, more…)
– String (FIND REPLACE more )S–Set
–Reset
– String (FIND, REPLACE, more…)
– Time (TON,TOF,TONOFF)S
R
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 9
![Page 10: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/10.jpg)
Ladder Logic Example
Start Button Light
This is a very simple rung of logic, from a PLC program:
Sta t_ utto g t
The rung is read as:
If the Start Button is on, turn the Light. , g
If the Start Button is off, then turn the Light off.
Copyright © 2006 Rockwell
![Page 11: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/11.jpg)
I/O Addressing
Often, a descriptive name of the device connected to the I/O point is used
in addition to, or in place of the I/O variable which describes the physical , p p y
location on the controller.
Example of
user-defined
name
Start Button Light
_IO_Embedded_Digital_Input_0 _IO_Embedded_Digital_Output_0g p g p
Example of
system-defined
I/O variable
Copyright © 2006 Rockwell
![Page 12: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/12.jpg)
Software Introduction
12
![Page 13: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/13.jpg)
Connected Components Workbench Software
• Easy to Acquire/Install– Free Internet download
Easy to Configure• Easy to Configure– Single software for component
class products
G hi l D i C fi ti– Graphical Device Configuration
• Easy to Program– Extensive use of Microsoft
and IEC-61131 standards
– Symbolic Programming
– Rockwell Automation andRockwell Automation and user-defined function blocks
• Easy to UpdateS ft d t il bl– Software updates available via Internet
RAS1
![Page 14: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/14.jpg)
Slide 13
RAS1 updated screenshot.
Rick Sykora, 9/1/2010
![Page 15: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/15.jpg)
Connected Components WorkbenchController Software
• Graphical Micro800
controller configuration
• IEC 61131-3 editors
– Ladder Diagram, Function
Block, Structured Text
– User-defined function blocks
– Run-time program download
• Extensive Standard• Extensive Standard
Instruction Set
– IEC 61131-3 base
instructions with Rockwell
Automation extensions
RAS2
![Page 16: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/16.jpg)
Slide 14
RAS2 updated screenshot
Rick Sykora, 9/1/2010
![Page 17: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/17.jpg)
Using Programming Software (CCW)
Brief walk-through on developing program…
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 15
![Page 18: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/18.jpg)
PLC Basics Agenda
1. Introduction to Terms / Conceptsp
2. Programming a PLC
3. Application Example
4. Hands-On Lab
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 16
![Page 19: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/19.jpg)
Conveyor control
So where could you use a PLC?
• Conveyor control
• Printed circuit board handling equipment
• SCADA(Supervisory Control And Data Acquisition)
– Remote pump/lift station (water/wastewater)
– Flow monitoring for leak detection (Oil & Gas)
• Strapping machinery / trash compactorspp g y p
• Palletizers
• Compressor control
• Amusement park rides and attractions• Amusement park rides and attractions
• Hard-wired relay panels or Single Board Computers
• Many, many more
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 17
![Page 20: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/20.jpg)
PLC Basics Agenda
1. Introduction to Terms / Conceptsp
2. Programming a PLC
3. Application Example
4. Hands-On Lab
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 18
![Page 21: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/21.jpg)
Programming a PLC – Traffic Light example
Now let’s take a look at a modern traffic light application. With sensors to
determine the presence of a car at the various parts of the intersection, the
traffic light controller must determine the lighting sequencing and timing totraffic light controller must determine the lighting sequencing and timing to
allow traffic to flow in a orderly fashion. In your lab, you will learn to
program a Micro800 to control a traffic light and use it and our PanelView
C i f h
Copyright © 2006 Rockwell
Component operator interface to test the program.
![Page 22: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/22.jpg)
Your Lab box
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 20
![Page 23: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/23.jpg)
For more information on the Micro800 and Connected C W kb h lComponents Workbench, please visit the Essential Components Booth
Copyright © 2010 Rockwell Automation, Inc. All rights reserved. 21
![Page 24: Basic PLC Programming - WordPress.com · PLC Control Program † Program – Instructions used to process inputs and set outputs † Primarily written as (Relay) Ladder Diagram: Start_Button](https://reader036.fdocuments.in/reader036/viewer/2022062605/5fcf71e1e2e5a05fd62b9756/html5/thumbnails/24.jpg)
Copyright © 2011 Rockwell Automation, Inc. All rights reserved.