Upload
lionel-kelley
View
216
Download
0
Embed Size (px)
Citation preview
1
Programable Logic ControllersRBT-235-SC61
Instructor: Dan Wolfhttp://web.acd.ccac.edu/~dwolf/ 1/20/2014
WELCOME!
2
Week #1 - The PLC DemoHome Assignments:
1. Complete and turn in the Student Information Sheet
2. Read the textbook sections as stated in the syllabus
Lab Assignment:
Module 1 – Intro and Wiring
3
Student Information
1. Name
2. Student ID Number
3. Phone Number
4. Alternate Phone Number
5. Do you have easy access to a PC?
6. What other programming classes have you taken?
7.a.Do you have any hardware or electronics experience?
7.b. What areas?
8.a. What is your major?
8.b. Is your major a 2 or 4 year program?
8.c. What is your expected graduation date?
9. Your EMAIL address
4
Introductions
1. Introduction to the Instructor
2. Student Introductions
a) Name
b) Where do you work or what is your degree?
c) Why are you taking this class?
5
Administrative Information
1. Introductions2. Syllabus
a. Contact Information
b. Grading
2. Questions?
3. Beware of the “Wall”
6
Software & Hardware Fields
Areas of Application
IN D U S T R IA L /E M B E D D E D
P ro du c t D e ve lo p m e n t,In d u stria l C o n tro l
C O M M E R C IA L
B a n ks , F in a n cia l, In ve n to ry,O rd e r E n try
G R A P H IC A L
A n im a tio n , W eb D es ig n ,W e b A p p lica tio ns
T h e S o ftw are Ind u s try
E M B E D D E D
P ro du c t D e s ign
F A C T O R Y A U T O M A T IO N
P ro cess C on tro l & M ea su rem e nt
S A F E TY a ndR E L IA B IL ITY
P ro du c t T e st a nd V a lida tion
T h e H a rd w a re Ind u s try
7
RBT-235: Course Introduction
A course providing a working knowledge of programmable logic controllers (PLCs). Topics include terminology, basic and advanced relay logic programming, and connection and control of input/output devices. Emphasis is placed on interfacing, operating, and programming a wide range of robotic and industrial automation devices.
Prerequisites: None
8
Maximize Your Lab Time
Read the lab work prior to each class
Do not get behind in the labs
You will need the entire scheduled lab time each week
9
Budgeting Your Time
The college expects you to spend three home study hours for each hour in the classroom.
This course will require 3 * 3 = 9 hours of home study each week.
This is a technical / programming course. Nine hours is a good estimate.
10
Assignment #1
Questions to ask of two other students:
1) Name
2) Degree
3) Name of Pet
4) Employment
5) What do you want to learn from this class?
11
What is a PLC?
As defined by the National Electrical Manufacturers Association (NEMA), a Programmable Logic Controller is: "a digitally operating electronic apparatus which uses a programmable memory for the internal storage of instructions for implementing specific functions, such as logic, sequencing, timing, counting and arithmetic, to control through digital or analog input/output, various types of machines or process".
In other words, it is a generic, computer controlled device that can be used to control a process such as required in a a factory manufacturing environment or a Disney fun ride.
12
Input Devices Pushbuttons Selector Switches Limit Switches Level Switches Photoelectric Sensors Proximity Sensors Motor Starter Contacts Relay Contacts Thumbwheel Switches
120/230 VAC 24 VDC
– Sourcing
– Sinking
13
Output Devices
Valves Motor Starters Solenoids Control Relays Alarms Lights Fans Horns
Relays– 120 VAC/VDC– 240 VAC– 24 VAC/VDC
Triac– 120/230 VAC
Transistor MOSFET– 24 VDC
14
Input Scan
Program ScanOutput Scan
Housekeeping
START
Each ladder rung is scanned using the data in the Input file. The resulting status (Logic being solved) is written to the Output file (“Output Image”).
The status of external inputs (terminal block voltage) is written to the Input image (“Input file”).
The Output Image data is transferred to the external output circuits, turning the output devices ON or OFF.
Internal checks on memory, speed and operation. Service any communication requests, etc.
PLC Operating Cycle
15
Motor Solenoid 1 Solenoid 2
Solenoid 3
Sensor 1
Sensor 2
Ingredient A Ingredient B
Typical PLC Application
16
Motor Solenoid 1 Solenoid 2
Solenoid 3
Sensor 1
Sensor 2
Ingredient A
Ingredient B
Operation of Mixer (Sequence of Control)
Solenoid 1– On = Sol 3 is off, and Motor is off, and
Sensor 2 is off, and Auto Switch is on– Off = Sol 3 is on, or Motor is on, or
Sensor 2 is on
Solenoid 2– On = Sol 3 is off, and Motor is off, and
Sensor 2 is on– Off = Sol 3 is on, or Motor is on, or
Sensor 1 is on
Motor– On = Sensor 1 is on, and Solenoid 2 is
off, and Solenoid 1 is off– Off = Solenoid 3 on
Solenoid 3– On = Sol 1 is off, and Sol 2
is off, and Motor has run for 30 sec.
– Off = Solenoid 3 has been
on for 60 sec.
17
Basic Electric RefresherE = I * R
E = Voltage PotentialI = Current FlowR = Resistance (load)
Current (I) always flows in the direction from the highest voltage to the lower voltage(s).
E
I R
+5V
0 Volts Current Flow when LED is On
Current Flow when LED is On+5V
18
Wiring Practice for Tonight
Do not apply power until I check your circuit!
19
Alternate Wiring Diagrams
20
Alternate Wiring Diagrams
21
The End
22
Week #2 - Wiring & PLC Intro
Home Assignments:
1. Informal Lab Material: Turn in lab samples
2. Read the textbook sections as stated in the syllabus
Lab Assignment:
Module 1
23
Logicals - Truth Tables
AND Truth Table Input Input Output
A B F
0 0 0
0 1 0
1 0 0
1 1 1
OR Truth Table Input Input Output
A B F
0 0 0
0 1 1
1 0 1
1 1 1
XOR Truth Table Input Input Output
A B F
0 0 0
0 1 1
1 0 1
1 1 0
24
Logicals – NOT Truth Table
NOT Truth Table Input Output
0 1
1 0
25
Logicals – Conventional Definitions
1. AND: If A and B are High Then F = High
2. OR: If A or B is High Then F = High
3. XOR: If A or B is High (but not both) Then F = High
4. NOT: If A is High then F = Low If A is Low Then F = High
Logicals – Hardware Logic Diagrams
NOT
AND XOR
OR
Logicals – Switch Equivalents
+5V
F
A
B
AND Gate
OR Gate
+5V
A B
F
Logicals – Switch Equivalents
NOT Logic
XOR Gate
+5V
F
ANC
+V
29
Programming PLC’s
The purpose of a PLC Program is to control the state of PLC outputs based on the current condition of PLC Inputs
Different PLC’s support different languages, but the most popular PLC language is know as “Ladder Logic”.
PLC Ladder Logic purposely resembles Relay Logic
Relay Logic versus Ladder Logic
Relay Logic is an electrical circuit.PB1 PB2
L1Relay Logic
Ladder Logic
Examine ON instruction: checks for ON state, does not care about NO or NC state
Ladder Logic is a logic circuit not an electrical circuit. It establishes an output based on logic continuity.
Ladder Logic Concepts
| | |/|
Read / Conditional Instructions
Write / Control Instructions
| | |/|
| | |/|
| |
| | |/| ( )
| |
( )
( )
( )
( )
| |
Start (Rung #1)
End (Rung #5)
Ladder Logic Concepts
Read / Conditional Instructions
Write / Control Instructions
No Logical Continuity
|/| | |
T F F
( )
( )|/| |/|
T T T
Logical Continuity
33
Logical AND Construction
IF input 4 AND input 5 have power
THEN energize output 0
| |I/4
| |I/5
( )O/0
Logical Continuity
T T T
On
34
Logical OR Construction
IF input 4 OR input 5 have power
THEN energize output 0
| |I/4
| |I/5
( )O/0
Logical Continuity
F
T
On
| |I/4
| |I/5
( )O/0
Logical Continuity
T
F
On
Complex Construction
|/|I/11
| |I/5
|/|I/7
|/|I/1
| |I/3
| |I/2
| |I/4
|/|I/0
| |I/1
| |I/1
|/|I/8
| |I/9
( )O/0
| |I/10
|/|
CR3
CR3 M1
PB1 LS1 SOL2
PB2LS1
LS3
LS4
Relay Logic vs. PLC & Ladder Logic
I/8
I/4 I/6 O/0
O/1
| | | | ( )
I/5I/7 B/0| | | | ( )
| |
|/|B/0
( )| |I/9
ProgrammableLogic
Controller
Inputs Outputs
CR
INPUT Address Assignment:PB1- I/4 PB2- I/5LS1- I/6 LS2- I/7LS3- I/8 LS4- I/9
OUTPUT Address Assignment:SOL2- O/0 M1- O/1
|/|
CR3
CR3 M1
PB1 LS1 SOL2
PB2LS1
LS3
LS4
Relay Logic to Ladder Logic
I/8
I/4 I/6 O/0
O/1
| | | | ( )
I/5I/7 B/0
| | | | ( )
| |
|/|B/0
( )| |I/9
Relay Logic versus Ladder Logic
Relay Logic is an electrical circuit.PB1 PB2
L1Relay Logic
Ladder Logic
Examine ON instruction: checks for ON state, does not care about NO or NC state
Ladder Logic is a logic circuit not an electrical circuit. It establishes an output based on logic continuity.
Input Instructions
Function Bit Example
I1 – INPUT 0 I:0.0/0 N.O Pushbutton Switch SW = Released = Open = 0 XIC SW = Pressed = Closed = 1
1 I:0.0/1 N.O. Pushbutton Switch SW = Released = Open = 1 XIO SW = Pressed = Closed = 0
2 I:0.0/2 N.C. Pushbutton Switch SW = Released = Closed = 1 XIC SW = Pressed = Open = 0
3 I:0.0/3 N.C. Pushbutton Switch SW = Released = Closed = 0 XIO SW = Pressed = Open = 1
Output Instructions
FUNCTION BIT EXAMPLE
O0 - Output 0 O:0.0/0 OTE – Output Energize
1 O:0.0/1 OTL – Output Latch
2 O:0.0/2 OUT – Output Unlatch
3 O:0.0/3
U
L
41
Helpful Hints on the PLC Syntax
There are two (approximate) PLC identifier formats:1. The syntax for the Inputs and Outputs are similar to each
other. O:0.0/4 I:0.0/3 2. The syntax for the Binary, Counters, and Timers are
similar to each other. B3:1/12 T4:0/EN C5:0/CU
The two formats are confusingly similar:• The colon “:” after the I/O in format #1 is not used in
format #2• The period “.” in format #1 appears to be replaced by a
colon “:” in format #2
42
The Project Planning Sheet
The Project Planning Sheet should be completed before you begin wiring or before you start the
RSLogix program.
1. Description of the Requirements2. Inputs3. Outputs4. Wiring Diagram5. Ladder Diagram
43
The End
Thank You !
44
Week #3 – PLC Demo & Try-out
Home Assignments:
1. Informal Lab Material
2. Mini-Quiz
2. Read the textbook sections as stated in the syllabus
Lab Assignment:
Module 1
45
PLC Demo
Turn your PC on and follow your instructor throughout the demonstration.
46
PLC Programming Process
1. Go Offline
2. Select the User tab
3. Drag a control from the User tab onto the rung. The red link squares will turn green when you approach them. Release the mouse button when the intended link spot is green.
4. Double-left click the control to add or change the address or parameter.
5. Click the Verify Project button to check your syntax
47
PLC Control Drag Operation
Green link during a control drag operation.
48
RSLogix Run Procedure
Summary of steps to run RSLogix:
1. Load RSLinx. Configure drivers as needed.2. Minimize RSLinx3. Load RSLogix4. Load Program from disk or start new
program.5. Verify Program6. Download to PLC7. Go Online
49
Project Phases
1. Requirements Phase is based on “What to build”
2. Design Phase is based on “How to build it”3. Implementation Phase is based on “Now is the
time to build things”4. Test Phase is based on “Prove that you have
built the correct thing AND prove that it works correctly”.
50
RSLogix 1500 Instruction Set Help
Start RSLogix 1500Help | SLC Instruction Help
51
How much is your time worth?
11 participants in the workplace can cost the company $14.67 per minute.
52
Lab Estimate Sheet
Estimated Time (hours)
Estimated Budget = Estimated Time * $70/hour
Actual Time (hours)
Actual Budget = Actual Budget * $70/hour
53
The End
Thank You !
54
Week #4 – Inputs & Outputs
Home Assignments:
1. Informal Lab Material
2. Read the textbook sections as stated in the syllabus
Lab Assignment:
Module 1
55
Document your Programs
1. Right-click while on the symbol2. Left-click on “Edit Description”3. Use meaningful titles!
56
Relay Example
N.O.
+12V
+120V
Relay120V Lamp
N.O.
Low voltage on switch causes the high voltage lamp to light.
57
Relay Example – Sealing Circuit
Lamp is latched on even after the switch is released.Why might we need this?
N.O.
N.O.
+12V
+120V
Relay120V Lamp
58
Relay Example – Reset Logic
Reset switch added to shut off lamp.
N.O.
N.O.
+12V
+120V
Relay120V Lamp
N.C.ResetSwitch
59
Development Process – 4 Way Switch
Requirements:Implement a four-way switch where any one of three switches will turn on/off a light. This logic is to be used in a meeting room where there is a single switch at each of three entrances.
Design:Analyze the requirement and decide how this will be implemented. Create a truth table or boolean equation description of the relationship between the inputs and outputs.
Implementation:Create the ladder logic.
Test: Be Careful!
60
Four-Way Switch - First Attempt
SW1 SW2 SW3 F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 0
Enter a “1” in the F-column wherever a single switch is true.
61
First Attempt Ladder Logic
S1
S1
S1
S2
S2
S2
S3
S3
S3
62
Test and Verify !
1. Now enter and test your logic.
• Create a rung for each “1” in the output column.
• Use three inputs for each rung, Sw1, Sw2, and Sw3
• Use an XIC wherever an input is high and an XIO whenever a switch is low.
2. Quick testing may indicate that the logic is OK.
3. But careful testing will show a condition that does not work.
4. Our original assumption was to put a “1” in the truth table wherever a single switch is on. However we should have put a one whenever there was a “single bit change”.
63
Four-Way Switch - Second Attempt
SW1 SW2 SW3 F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
Enter a “1” in the F-column wherever there is a “single-bit change” to the input switches.
Our error was created because we made a mistake during the design phase.
64
Second Attempt Ladder Logic
S1
S1
S1
S2
S2
S2
S3
S3
S3
S1 S2 S3
65
Test and Verify !
1. Now enter and test your logic.
• Create a rung for each “1” in the output column.
• Use three inputs for each rung, Sw1, Sw2, and Sw3
• Use an XIC wherever an input is high and an XIO whenever a switch is low.
2. Careful testing will indicate that the logic is now OK.
66
Development Process – Conveyor DemoRequirements:
The conveyor belt should move if power is on and if the operator seat is depressed. If the Maintenance override is active, the conveyor should move as long as power is on.If Panic is active, shutdown the conveyor.
Design:Create a truth table or boolean equation description of the relationship between the inputs and outputs. Arrange the input columns so the table is intuitive.
Implementation:Create the ladder logic.
Test: Be Careful!
67
Conveyor DemoPANIC MAINT PWR SEAT F Mode
0 0 0 0 0 Not used0 0 0 1 0 Not used0 0 1 0 0 Not used0 0 1 1 1 Normal Mode
0 1 0 0 0 Maintenance0 1 0 1 0 Maintenance0 1 1 0 1 Maintenance0 1 1 1 1 Maintenance1 0 0 0 0 Panic Shutdown1 0 0 1 0 Panic Shutdown1 0 1 0 0 Panic Shutdown1 0 1 1 0 Panic Shutdown1 1 0 0 0 Panic Shutdown1 1 0 1 0 Panic Shutdown1 1 1 0 0 Panic Shutdown1 1 1 1 0 Panic Shutdown
68
Conveyor Demo Ladder Logic
ABCD +
ABCD +
ABCD = F
69
Larnaugh Map Simplification
70
Simplified Ladder Logic
ACD + ABC = F
71
Simplified Ladder Logic
AC (B+D) = F
72
The End
73
Week #5 – Latches and Bits
Home Assignments:
1. Informal Lab Material
2. Mini-Quiz
3. Read the textbook sections as stated in the syllabus
Lab Assignment:
Lab Estimate
Module 2
74
The Bit & Byte
BIT - Either '1' or '0', the smallest number
BYTE - consists of eight bits
The byte has a range of:0 - 255 (base 10)00h - FFh (base 16)00000000 - 11111111 (base 2)Two bytes make a wordThere are two hex digits in a byte1Mbyte = FFFFFh = 1048575
75
The Nibble
NIBBLE - consists of four bits
The nibble has a range of:
0 - 15 (base 10)0h - Fh (base 16)0000 - 1111 (base 2)Two nibbles make a byteThere is one hex digit in a nibble
76
The Word
WORD - consists of sixteen bits
The word has a range of:0 - 65535 (base 10)0000h - FFFFh (base 16)0000000000000000 -
1111111111111111 (base 2)Two words make a double wordThere are four hex digits in a word
77
Number Conversions
Decimal Base 10 Our own number system
Hex Base 16 The programmers’ number system
Binary Base 2 The computers’ number systemWe will convert to and from each of these number systems.
Hex Binary
Hex Decimal
Decimal Binary
See the appendix in the lab book
78
MS-Windows Scientific Calculator
79
Relay Instructions
L
U
OTE – Output Enable
OTL – Output Latch
OUT – Output Unlatch
O:0.0/1 Output Bit 1
O:0.0/2 Output Bit 2
O:0.0/3 Output Bit 3
80
Ladder Diagram of a Sealing Circuit
81
Ladder Diagram of a Latching Circuit
82
The BIT Instruction
83
The End
Thank You !
84
Week #6 - Timers
Home Assignments:
1. Informal Lab Material
2. Read the textbook sections as stated in the syllabus.
Lab Assignment:
Module 2
Lessons Learned – ANDed Outputs
I:0.0/1
O:0.0/2
B3:0/3
LB3:0/3
O:0.0/1
Observation:
Inputs are OR Logic but the Outputs are AND Logic
Lessons Learned – Mixing OTE and OTL
I:0.0/0
O:0.0/0
O:0.0/0
L
U
I:0.0/1
O:0.0/0I:0.0/2
Button 0 unlatches Output 0 (1rst rung), thus it negates the latch of Output 0 on the 2nd rung. Output 0 will never latch!
OTE
OTL
Lessons Learned – Race Conditions
Enter this program and then press the Over-speed switch. Observe the reaction while the 3rd rung is trying to turn it off.
L
U
Overspeed SW
Overspeed Reset
B3:0/1
B3:0/1
B3:0/1 Alarm
Manual SW B3:0/1
Lessons Learned – Race Conditions
Solution: Enter this program and then press the Over-speed switch.
L
U
Overspeed SW
Overspeed Reset
B3:0/1
B3:0/1
B3:0/1 Alarm
Manual SW
Lessons Learned – Dual Rung Outputs
Left
Guard
Guard
Guard
Right Material
Limit
Avoid driving the same output from two different rungs as you can experience timing related side-affects. Better to merge the two rungs into one rung.
Lessons Learned – Sequence Anomoly
I:0.0/1
O:0.0/2
B3:0/3
L
U
B3:0/3
B3:0/3
B3:0/3I:0.0/2
I:0.0/3
UO:0.0/2
What sequence of pressing and releasing SW2 and SW3 will unlatch Output 2?
1. SW2 and SW3 together2. SW3 first3. SW2 first
91
Timer Types
BI-STABLE TIMER (free running)These run continuously - every time the timer expires, it is restarted. They are used for periodic events such as temperature monitoring. frmMain.tmrTimer_TimerThis is also known as an ASTABLE timer.
MONOSTABLE TIMER (one-shot)These run once and then stop. They are used to implement delays such as a 60 second crosswalk (street) sign. frmMain.tmrTimerDelay_Timer
Timer Instructions
TON – Timer Delay On
TOF – Timer Delay Off
RTO – Retentive Delay Timer OFF
EN
DN
TONTimer On Delay
Timer T4:8Time Base 1.0Preset 5 <Accum 0 <
TON
EN
DN
TOFTimer Off Delay
Timer T4:8Time Base 1.0Preset 5Accum 0
TOF
EN
DN
RTORetentive Timer On
Timer T4:8Time Base 1.0Preset 5Accum 0
RTO
93
The Timer On (TON) Circuit
94
The Retentive Timer (RTO) Circuit
Switch #0 must be pressed for three seconds.
Retentive Timer #3 stays on until Switch 1 is pressed.
95
Delayed Start Circuit
Switch #0 closure may be momentary.
Latched output stays on until Switch 1 is pressed.
MOV Instruction
The MOV instruction will move a value to another location when the input is enabled. In this example, it moves the value 10 into the Preset register of the C12:2 counter.
MoveSource 10
10<Dest C12:2.PRE
10<
MOV
MOV - Move
97
Lab Reports - An Overview
The title page should include your name, chapter# and lab title.
Printouts of the programs may be referenced in the text.
Discuss as many of the new lab concepts as possible.
Optional work is highly encouraged and required for grades above 89%.
One of the worst things to do is get behind on the labs.
Additional grading details are explained in the syllabus.
98
Lab Report Format
INTRODUCTION:Provide an overview of the topics that are involved in the lab.
BODY:List and discuss each experiment. Optionals should be identified.
Experiment #1
Experiment #2
CONCLUSION:Summarize each new instruction or concept.
PRINTOUTS:Include a printout of each program and it’s output
99
Lab Report Schedule and Grading
• Lab reports are due two weeks after the last work night for that lab.
• I require a majority of the labs before I will grade them.
• I will return the graded labs to you the week after I grade them.
• You must inform me in advance if your lab report will be late.
100
Spell & Grammar Check Reminder
Are you using MS-Word for your labs?
Are you using the Spell Checker and Grammar Checker?
To Configure:
Tools | Options | Spelling and Grammer
To run:
F7
101
Week #7 - Counters
Home Assignments:
1. Informal Lab Material
2. Formal Lab Report – Vat Mixer Section 2.3.8
3. Mini-Quiz
3. Read the textbook sections as stated in the syllabus.
4. EXAM NEXT WEEK!
Lab Assignment:
Module 2
102
Comments on Section 2.3.4 PPS
The different class teams each implemented variations of the requirements.
As a class exercise, this is great.
However, in a work environment, you must always seek clarification and approval from your customer (internal or external) as what makes sense to you may not make sense to the customer. In addition, each new feature adds risk, cost, and schedule; something that your company may not be able to accept.
103
Comments on Commenting
Uncommented Ladder Logic Diagrams are hard to understand.
All controls should be given a descriptive name (inputs, outputs, bits, timers, counters, etc.
Please use printouts whenever possible (instead of hand drawings) – especially on the more complex logic.
You can also add “rung-level” comments.
After you have it working, take time to review the logic in order to simplify it. But be careful you don’t break it or add side affects if you make improvements… Don’t make rushed changes!
BiStable Timer ConfigurationStart
T4:9/DN
T4:8/DN
T4:9/DN
EN
DN
TOF
Timer Off Delay
Timer T4:8
Time Base 1.0
Preset 5
Accum 0
TOF
EN
DN
TOF
Timer Off Delay
Timer T4:9
Time Base 1.0
Preset 5
Accum 0
TOF
Counter Instructions
CTU – Count Up
CTD – Count Down
CU
DN
CTUCount UpCounter C5:2Preset 5 <Accum 0 <
CTU
CD
DN
CTDCount DownCounter C5:2Preset 5 <Accum 0 <
CTD
106
Counter Example
Switch 0 requires five closures to enable Output 0
Switch 1 resets the counter and unlatches Output 0
107
I/O Port Nomenclature
Port - An electronic location typically used to allow the computer to access a hardware device.
1 = On = Set = +5Volts = High
0 = Off = Clear = 0Volts = Low
I/O Port InterfacingIntel
M icroprocessorRAM Mem oryROM Mem ory
Port PortPort Port
KeyboardDisplay MousePrinter
Output PortInput Port
D7
+5V +5V
D0
D6D5
D4D3
D2D1
D7
+5V
+12V
D6D5
D4D3
D2D1
D0
AC D rive M otor
120V AC
Data Bus
.
109
I/O Port Industrial Example
110
Bottle Sensors
111
Review Lecture
Review material
Exam Next Week – Take time to look at the past material and ask questions.
112
The End
Thank You !
113
Week #8 – Exam & Analog Input
Home Assignments:
1. Informal Lab Material
2. Mid-Term Exam
3. Read the textbook sections as stated in the syllabus.
Lab Assignment:
Module 3
114
Analog Definition
Digital - Only two states: 0 volts and +5V 1 = On = Set = +5Volts = High
0 = Off = Clear = 0Volts = Low
Analog - Unlimited number of states between a lower and an upper value.
0V, 0.02V, 0.04V, 1.44V, 3.60V, 5.00V
Connection Diagram for an ADC
116
ADC Resolution
ADC Resolution is the smallest change in voltage that the ADC can measure.
A 16-bit converter has a resolution of:
1/(216) = 1/65536 = 0.0000152 times the full scale input voltage
I.e. it can measure a signal as small as:
0.0000152 * 10V = 0.000152 Volt (152uV)
Each “count” of the ADC value stands for 152uV
Volts / Bits = 10-0 / 65536 = 0.000152 Volts per bit
Analog Input ScalingANALOG VOLTAGE
INPUT DIGITAL INPUT
(RAW A-D) Base 10
0V 0000 0000 0000 0000 0 0.000152 0000 0000 0000 0001 1
0.5V 0000 1100 1100 1101 3277 1.0V 0001 1001 1001 1010 6554 2.0V 0011 0011 0011 0011 13107 4.0V 0110 0110 0110 0110 26214 10V 1111 1111 1111 1111 65536
Assuming:
• The analog input is from 0 to +10 volts
• The ADC is a 16-bit device (0 to 65535)
118
Examples and Practice
Assuming a 10-bit ADC and a 0 to +10V input:
1. What value do you expect if we apply 7.5V to the analog input?
2. If you are reading 9000h on the PLC, what voltage must be at the input?
119
Analog Input Sensors
• Thermocouples - for extreme temperatures
• Thermistors - for extreme chemical environments
• RTD - Resistance-Temperature-Device
• Pressure Transducers - for air, fluids
• Strain & Force Gauges - for mechanical measurements
• Acceleration and Torque - for movements
120
The End
Thank You !
121
Week #9 – Math Instructions
Home Assignments:
1. Informal Lab Material
2. Mini-Quiz
3. Read the textbook sections as stated in the syllabus.
Lab Assignment:
Module 3
122
“Experienced” does not mean “careful”
123
The End
124
Week #10 – Process Control
Home Assignments:
1. Informal Lab Material
2. Read the textbook section as stated in the syllabus.
Lab Assignment:
Module 3
125
Analog Definition
Digital - Only two states: 0 volts and +5V 1 = On = Set = +5Volts = High
0 = Off = Clear = 0Volts = Low
Analog - Unlimited number of states between a lower and an upper value.
0V, 0.02V, 0.04V, 1.44V, 3.60V, 5.00V
Connection Diagram for an ADC
PC #1
8-Bit A-D Chip Digital Input Port CPUDigital In/Output
Port
RS-232Driver IC
UART Chip
PC #2
Tx
Rx
Gnd
COM1
COM1
Tx
Rx
Gnd
Signal
Gnd
TemperatureTransducer
0 to 5 VoltAnalog Data(Sensitive to
Electrical Noise)
8 Data BitsDigital Data00000000
to11111111
+12 Voltor
-12 VoltSerial Data50' distance
1 wire Transmit1 wire Receive1 wire ground
0 Voltor
+5 VoltSerial Data
Connection Diagram for an ADC
V in
GN D
V ref
B 1
B 8
Sig n
EN B
A /D Conv erterTemperatureTransducer
/Enable
C lock
8-bit D ata Bus0-2Volt = 0-200 deg rees F
.01V = 1deg00 - FF h
5.1V
128
ADC Resolution
ADC Resolution is the smallest change in voltage that the ADC can measure.
An 14-bit converter has a resolution of:
1/(214) = 1/16384 = 0.000061 times the reference voltage
The PLC has a 16.384 Volt reference.
I.e. it can measure 0.000061 * 16.384V = 0.001 Volt (1mV)
Volts / Bits = (16.384 – 0) / 16384 = 1mVolts per bit
129
Analog Input Scaling - Engineering Units
Assuming:• The analog input is from 0 to +10 volts• The PLC reference voltage is 16.384 volts• The PLC resolution is 1mV• Actual Voltage = PLC Value * 1 mV
Volt In ADC Binary ADC Base 10 Value * 1mV
0 V 00 0000 0000 0000 0 0
1 mV 00 0000 0000 0001 1 0.001
2 mV 00 0000 0000 0010 2 2
2.378 00 1001 0100 1001 2377 2.377
5 V 01 0011 1000 1000 5000 5.000
8 V 01 1111 0100 0000 8000 8.000
10 V 10 0111 0001 0000 10000 10.000
130
Analog Input Scaling – MODE = ???
Assuming:
• The analog input is from 0 to +10 volts
• The PLC reference voltage is 16.384 volts
Volt In ADC Binary ADC Hex ADC Base 10
0 V 00 0000 0000 0000 0000h 0
1 mV 00 0000 0000 0001 00001h 1
2 mV 00 0000 0000 0010 00002h 2
5 V 01 0011 1000 1000 1388h 5000
8 V 01 1111 0100 0000 1F40h 8000
10 V 10 0111 0001 0000 2710h 10000
131
Lab Temperature Sensor – AD590
The lab temperature sensor has the following parameters: Temperature range from 0 to 200 F Outputs .01 volts (+10mV) per F Maximum output is: 200F * .01V = 2Volts Made by Analog Devices
Temperature Input
+12V
To PLCAnalog In
1K ohm
70degF = 25degC = 298uA è 298mV @ 1K ohm load
AD590Temperature sensor
Heater Controller
Amp meter
+12V
PLC
2N2222Hfe = 100
2N3055Hfe = 20-70Ic = 1A max
47K ohm
Start your tests with the 5V supply instead of the 12V supply.
Do not exceed 1A on the 2N3055 !
Temperature Setpoint
+9V
Setpoint298mV @ 70degF = 25degC
135
Bug Fix - Communication
Problem:The PLC will not communicate with the PC and you get the
following message:“No Response from Processor at selected path/node!”
Solution:Tools | Options | System Communication | Download
136
Bug Fix – No Run Mode
Problem:The PLC is in “Remote Program” mode and will not go into
“Run” mode.
Solution:A) Download and run your programB) The PC will say you are in “Run Program” mode.C) Comms | Mode | Run
137
The End
138
Week #11 - Sequences
Home Assignments:
1. Informal Lab Material
2. Read the textbook sections as stated in the syllabus.
Lab Assignment:
Module 3
139
The End
140
Week #12 – Sequence Project
Home Assignments:
1. Informal Lab Material
2. Formal Lab Report: Robot Pallet Section 3.3.9
3. Mini-Quiz
4. Read the textbook sections as stated in the syllabus.
Lab Assignment:
Lab Estimate
Module 3
141
The End
Thank You !
142
Week #13 – Review & Project
Home Assignments:
1. Read the textbook sections as stated in the syllabus.
2. Formal Report is TBD: group project or waived
2. Course Review
Lab Assignment:
Module 4
143
Agenda
1. Safety Overview2. Introduction to Project Phases3. Plant Tour4. Review5. Closing Discussion
144
Agenda
1. Safety Overview2. Introduction to Project Phases3. Plant Tour4. Review5. Closing Discussion
145
Project Phases
1. Design
2. Implementation (Peer Reviews and Engineer Desk Testing)
3. Engineering Test (Lab Testing)
4. Factory Test (Factory Testing)
5. Field test (Field Testing)
146
Test Phases
1. Peer Reviews • Cheap; paper based; not very glamorous; MOST EFFICIENT
2. Engineer Desk Testing• Cheap; very limited capabilities
3. Lab Testing• Requires additional equipment; does not include the full
system; allows abnormal tests; significant simulation required4. Factory Testing
• Requires a support team to setup and maintain the equipment; requires considerable lab space; includes almost the entire system but some parts are simulated. Increased safety risks.
5. Field Testing• MOST EXPENSIVE; extreme visibility/risk with the customer;
very limited access to the equipment (2-6 hours/night); Requires an expensive support team. Highest safety risks.
147
Bug Detection and Correction Times
Each successive phase requires 10 times the effort to detect and fix a bug.
1. Peer Reviews• Multiple bugs found per hour
2. Engineer Desk Testing• Assume one bug requires 30 minutes to find and fix
3. Lab Testing• The same bug requires 5 hours to find and fix
4. Factory Testing• The same bug requires 50 hours to find and fix
5. Field Testing• The same bug requires 500 hours to find and fix
148
Agenda
1. Safety Overview2. Introduction to Project Phases3. Plant Tour4. Review5. Closing Discussion
149
Agenda
1. Safety Overview2. Introduction to Project Phases3. Plant Tour4. Review5. Closing Discussion
150
Agenda
1. Safety Overview2. Introduction to Project Phases3. Plant Tour4. Review5. Closing Discussion
151
Do you want to be a millionaire?
Tonight, I will show you how.
152
Success with Retirement Goals
1. Many companies match the first 3-6% of your contributions to a 401K retirement plan.
2. Assuming a salary of $50K/year and a company matching contribution of 6%, the company will be giving you $3000 if you contribute $3000 / 12 = $250 each month.
3. BUT, your contribution of $3000 is not taxable so you will also pay $750 less in taxes for the year (assume 25% tax bracket).
4. Your contribution of $3K yields you $3K + $3K + $750 = $6750
What would be a good reason to justify not contributing?
153
Success with Retirement Goals
1. Due to the power of accumulated interest, saving at an early age will net a you far greater amount at retirement than if you only start saving at the age of 30-40.
2. Someone entering the engineering profession today can expect to have $1-2M in his/her retirement account at age 60 – but only if you contribute (early and often)!
154
Two Quick Tips
1. Start now by contributing whatever you are able to – do not wait.
2. Each year when you get a raise or promotion, increase the amount that you contribute – you will never notice the difference.
An individual is allowed to save up to $5000 in a 2008 IRA and $15,500 per year to a company sponsored 401K plan.
155
EQ versus IQ
1. IQ – A measure of your ability to learn.
2. EQ – A measure of how you understand yourself and how you understand others. Also your understanding of how others affect yourself and how you affect others.
156
EQ – Top-Level Notes
1. A high EQ will almost always benefit you more than a high IQ.
2. EQ can be learned.
3. As you gain seniority, the value of EQ increases while the value of IQ decreases.
4. EQ can also be referred to as “People Skills”
157
EQ – How it is Measured
1. Self-awareness – your ability to accurately perceive your own emotions in the moment and understand your tendencies across situations.
2. Self-management – what happens when you act (or do not act). It is dependent on your self-awareness.
3. Social-awareness – your ability to accurately pick up on emotions in other people and understand what is really going on with them.
4. Relationship-management – This is your ability to use your awareness of both your own emotions and those of others to manage interactions successfully. This is the product of the first three skills.
EQ is the product of each of the above four skills.
158
Quick Tips
1. Think about your interactions with your co-workers.
2. Notice when emotions come into play and observe how they affect the conversation.
3. If you or others are uncomfortable, stressed, intimidated or fearful, then emotions are affecting the conversation.
4. Your emotions affect your thoughts so understanding your (or others) emotions will allow you to better control the conversation.
159
The End
Thank You !
160
Week #14 - Final Exam
Exam Time: 7:00 pm to 9:00 pm
All outstanding work is due.
161
Final Wrap-up
• Final Exam• All Labs and Materials are due
162
Fill-in Material
The material that follows will be discussed during the course when the schedule
allows.