Vous êtes sur la page 1sur 162

Programable Logic Controllers

RBT-235-SC61

WELCOME!

Instructor: Dan Wolf


http://web.acd.ccac.edu/~dwolf/
1/20/2014 1
Week #1 - The PLC Demo
Home 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

2
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?
3
9. Your EMAIL address
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?

4
Administrative Information

1. Introductions
2. Syllabus
a. Contact Information
b. Grading
2. Questions?
3. Beware of the “Wall”

5
Software & Hardware Fields
Areas of Application

The Software Industry

INDUSTRIAL/EMBEDDED COMMERCIAL GRAPHICAL

Product Development, Banks, Financial, Inventory, Animation, Web Design,


Industrial Control Order Entry Web Applications

The Hardware Industry

EMBEDDED FACTORY AUTOMATION SAFETY and


RELIABILITY
Product Design Process Control & Measurement Product Test and Validation

6
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

7
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

8
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. 9
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?

10
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.
11
Input Devices
 Pushbuttons  120/230
VAC
 Selector Switches
 24 VDC
 Limit Switches
– Sourcing
 Level Switches
– Sinking
 Photoelectric Sensors
 Proximity Sensors
 Motor Starter Contacts
 Relay Contacts
 Thumbwheel Switches 12
Output Devices
 Valves  Relays
 Motor Starters – 120 VAC/VDC
 Solenoids – 240 VAC
– 24 VAC/VDC
 Control Relays
 Triac
 Alarms
– 120/230 VAC
 Lights
 Transistor
 Fans MOSFET
 Horns – 24 VDC 13
PLC Operating Cycle
START

Housekeeping Input Scan


Internal checks on The status of external inputs
memory, speed and (terminal block voltage) is written
operation. Service to the Input image (“Input file”).
any communication
requests, etc.

Output Scan Program Scan


The Output Image data Each ladder rung is scanned
is transferred to the using the data in the Input file.
external output The resulting status (Logic
circuits, turning the being solved) is written to the
output devices ON or Output file (“Output Image”).
OFF.

14
Typical PLC Application
Solenoid 1 Solenoid 2
Motor
Ingredient A Ingredient B

Sensor 1

Sensor 2

Solenoid 3
15
Operation of Mixer (Sequence of
Control)
 Solenoid 1  Solenoid 3
– On = Sol 3 is off, and Motor is off, – On = Sol 1 is off, and Sol 2
and Sensor 2 is off, and Auto Switch is off, and Motor has run
is on
for 30 sec.
– Off = Sol 3 is on, or Motor is on, or
Sensor 2 is on – Off = Solenoid 3 has been
on for 60 sec.
 Solenoid 2 Solenoid 2
Solenoid 1 Motor
– On = Sol 3 is off, and Motor is off, Ingredient
A
Ingredient
B
and Sensor 2 is on
– Off = Sol 3 is on, or Motor is on, or Sensor 1
Sensor 1 is on
 Motor Sensor 2

– On = Sensor 1 is on, and Solenoid 2


is off, and Solenoid 1 is off
– Off = Solenoid 3 on Solenoid 3 16
Basic Electric Refresher
E=I*R
E = Voltage Potential
E
I = Current Flow
R = Resistance (load) I R
Current (I) always flows in the direction from the
highest voltage to the lower voltage(s).
0 Volts Current Flow when LED is On

+5V

+5V Current Flow when LED is On

17
Wiring Practice for Tonight
Do not apply power until I check your circuit!

18
Alternate Wiring Diagrams

19
Alternate Wiring Diagrams

20
The End

21
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

22
Logicals - Truth Tables
AND Truth Table OR Truth Table XOR Truth Table
Input Input Output Input Input Output Input Input Output

A B F A B F A B F
0 0 0 0 0 0 0 0 0
0 1 0 0 1 1 0 1 1
1 0 0 1 0 1 1 0 1
1 1 1 1 1 1 1 1 0

23
Logicals – NOT Truth Table

NOT Truth Table


Input Output
0 1
1 0

24
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

25
Logicals – Hardware Logic
Diagrams
AND XOR

OR
NOT
Logicals – Switch Equivalents
+5V +5V
F F

AND Gate
A
A B

OR Gate
B
Logicals – Switch Equivalents
+5V

A +V
NC

XOR Gate

NOT Logic
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

29
Relay Logic versus Ladder Logic
Relay Logic is an electrical circuit.
PB1 PB2
L1
Relay Logic

Ladder Logic is a logic circuit not an electrical circuit. It establishes an


output based on logic continuity.

Ladder Logic

Examine ON instruction: checks for ON state, does not


care about NO or NC state
Ladder Logic Concepts

Read / Conditional Write / Control


Instructions Instructions
Start (Rung #1) || ()

|| |/| ()

|| || |/| ()

|| |/| ()
||

End (Rung #5) || |/| ()


Ladder Logic Concepts

Read / Conditional Write / Control


Instructions Instructions

|/| || ()

T F F
No Logical Continuity

|/| |/|
()

T T T

Logical Continuity
Logical AND Construction

IF input 4 AND input 5 have power


THEN energize output 0
On
I/4 I/5 O/0
|| || ()

T T T

Logical Continuity

33
Logical OR Construction

IF input 4 OR input 5 have power


THEN energize output 0
T On
I/4 O/0
|| ()
Logical Continuity
F I/5
||
F On
I/4 O/0
|| ()
Logical Continuity
T I/5
|| 34
Complex Construction

I/4 I/0 I/1 I/9 I/10 O/0


|| |/| || || || ()

I/5 I/1 I/7 I/8


|| |/| |/| |/|

I/2 I/3
|| ||

I/11 I/1
|/| ||
Relay Logic vs. PLC & Ladder
Logic
SOL2 Inputs Outputs
PB1 LS1

Programmable
Logic
Controller
LS1 PB2 CR3
C
R

LS3
I/4 I/6 O/0
|| || ()
I/7 I/5 B/0
|| || ()
CR3 LS4 M1
I/8
|/| ||
B/0 O/1
I/9
|/| || ()
Relay Logic to Ladder Logic
PB1 LS1 SOL2 I/4 I/6 O/0
|| || ()

LS1 PB2 CR3 I/7 I/5 B/0


|| || ()
LS3
I/8
||
CR3 LS4 M1 B/0 O/1
I/9
|/| |/| || ()

INPUT Address Assignment:


PB1- I/4 PB2- I/5
LS1- I/6 LS2- I/7
LS3- I/8 LS4- I/9

OUTPUT Address Assignment:


SOL2- O/0 M1- O/1
Relay Logic versus Ladder Logic
Relay Logic is an electrical circuit.
PB1 PB2
L1
Relay Logic

Ladder Logic is a logic circuit not an electrical circuit. It establishes an


output based on logic continuity.

Ladder Logic

Examine ON instruction: checks for ON state, does not


care about NO or NC state
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 L OTL – Output Latch

2 O:0.0/2 U OUT – Output Unlatch

3 O:0.0/3
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

41
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 Requirements


2. Inputs
3. Outputs
4. Wiring Diagram
5. Ladder Diagram

42
The End

Thank You !
43
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

44
PLC Demo

Turn your PC on and follow your instructor


throughout the demonstration.

45
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

46
PLC Control Drag Operation

Green link during a


control drag operation.

47
RSLogix Run Procedure
Summary of steps to run RSLogix:

1. Load RSLinx. Configure drivers as needed.


2. Minimize RSLinx
3. Load RSLogix
4. Load Program from disk or start new
program.
5. Verify Program
6. Download to PLC
7. Go Online 48
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”.

49
RSLogix 1500 Instruction Set Help
Start RSLogix 1500
Help | SLC Instruction Help

50
How much is your time worth?

11 participants in the
workplace can cost the
company $14.67 per
minute.

51
Lab Estimate Sheet

Estimated Time (hours)


Estimated Budget = Estimated Time * $70/hour

Actual Time (hours)


Actual Budget = Actual Budget * $70/hour

52
The End

Thank You !
53
Week #4 – Inputs & Outputs
Home Assignments:
1. Informal Lab Material
2. Read the textbook sections as stated in the syllabus

Lab Assignment:
Module 1

54
Document your Programs

1. Right-click while on the symbol


2. Left-click on “Edit Description”
3. Use meaningful titles!

55
Relay Example
Low voltage on switch causes the high voltage lamp to light.
+120V

N.O.

N.O.
+12V

120V Lamp
Relay

56
Relay Example – Sealing Circuit
Lamp is latched on even after the switch is released.
Why might we need this?
+120V

N.O.

N.O.
+12V

120V Lamp
Relay

57
Relay Example – Reset Logic
Reset switch added to shut off lamp.
+120V

N.O .

N.O .
+12V
N.C.
Reset
120V Lamp
Switch Relay

58
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:
59
Be Careful!
Four-Way Switch - First Attempt
SW1 SW2 SW3 F Enter a “1” in the F-
0 0 0 0 column wherever a
single switch is true.
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 60
First Attempt Ladder Logic

S1 S2 S3

S1 S2 S3

S1 S2 S3

61
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”. 62
Four-Way Switch - Second Attempt

SW1 SW2 SW3 F Enter a “1” in the F-


0 0 0 0 column wherever there is
a “single-bit change” to
0 0 1 1 the input switches.
0 1 0 1
Our error was created
0 1 1 0 because we made a
1 0 0 1 mistake during the
design phase.
1 0 1 0
1 1 0 0
1 1 1 1 63
Second Attempt Ladder Logic
S1 S2 S3

S1 S2 S3

S1 S2 S3

S1 S2 S3
64
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.

65
Development Process – Conveyor Demo
Requirements:
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: 66

Be Careful!
Conveyor Demo
PANIC MAINT PWR SEAT F Mode
0 0 0 0 0 Not used
0 0 0 1 0 Not used
0 0 1 0 0 Not used
0 0 1 1 1 Normal Mode
0 1 0 0 0 Maintenance
0 1 0 1 0 Maintenance
0 1 1 0 1 Maintenance
0 1 1 1 1 Maintenance
1 0 0 0 0 Panic Shutdown
1 0 0 1 0 Panic Shutdown
1 0 1 0 0 Panic Shutdown
1 0 1 1 0 Panic Shutdown
1 1 0 0 0 Panic Shutdown
1 1 0 1 0 Panic Shutdown
1 1 1 0 0 Panic Shutdown 67

1 1 1 1 0 Panic Shutdown
Conveyor Demo Ladder Logic

ABCD +

ABCD +

ABCD = F

68
Larnaugh Map Simplification

69
Simplified Ladder Logic

ACD + ABC = F
70
Simplified Ladder Logic

AC (B+D) = F
71
The End

72
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 73
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 word
There are two hex digits in a byte
1Mbyte = FFFFFh = 1048575
74
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 byte
There is one hex digit in a nibble
75
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 word
There are four hex digits in a word

76
Number Conversions
Decimal Base 10 Our own number system
Hex Base 16 The programmers’ number system
Binary Base 2 The computers’ number system
We will convert to and from each of these number systems.
Hex Binary
Hex Decimal

Decimal Binary
See the appendix in the lab book 77
MS-Windows Scientific Calculator

78
Relay Instructions

OTE – Output Enable

OTL – Output Latch L

OUT – Output Unlatch U

O:0.0/1 Output Bit 1


O:0.0/2 Output Bit 2
79
O:0.0/3 Output Bit 3
Ladder Diagram of a Sealing Circuit

80
Ladder Diagram of a Latching Circuit

81
The BIT Instruction

82
The End

Thank You !
83
Week #6 - Timers
Home Assignments:
1. Informal Lab Material
2. Read the textbook sections as stated in the syllabus.

Lab Assignment:
Module 2

84
Lessons Learned – ANDed Outputs
I:0.0/1 B3:0/3

B3:0/3 O:0.0/2
L

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

OTE
I:0.0/1 O:0.0/0

L OTL
I:0.0/2 O:0.0/0
U

Button 0 unlatches Output 0 (1rst rung), thus it negates the latch


of Output 0 on the 2nd rung. Output 0 will never latch!
Lessons Learned – Race Conditions
Overspeed SW B3:0/1

L
Overspeed Reset B3:0/1
U
Manual SW B3:0/1

B3:0/1 Alarm

Enter this program and then press the Over-speed switch. Observe
the reaction while the 3rd rung is trying to turn it off.
Lessons Learned – Race Conditions
Overspeed SW B3:0/1

L
Overspeed Reset B3:0/1
U
Manual SW

B3:0/1 Alarm

Solution: Enter this program and then press the Over-speed switch.
Lessons Learned – Dual Rung
Outputs
Left Right Material Guard

Guard Limit Guard

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 B3:0/3
What sequence of pressing
and releasing SW2 and
SW3 will unlatch Output
B3:0/3 2?

O:0.0/2 1. SW2 and SW3 together


B3:0/3
L 2. SW3 first
3. SW2 first
I:0.0/2 B3:0/3
U

I:0.0/3 O:0.0/2
U
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_Timer
This 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
91
Timer Instructions
TON
TON – Timer Delay On Timer On Delay
Timer T4:8
EN

Time Base 1.0 DN


Preset 5 <
Accum 0 <

TOF
EN
TOF – Timer Delay Off
Timer Off Delay
Timer T4:8
Time Base 1.0 DN
Preset 5
Accum 0

RTO
RTO – Retentive Delay Timer OFF Retentive Timer On
Timer T4:8
EN

Time Base 1.0 DN


Preset 5
Accum 0
The Timer On (TON) Circuit

93
The Retentive Timer (RTO) Circuit

Switch #0 must be pressed for three seconds.


94
Retentive Timer #3 stays on until Switch 1 is pressed.
Delayed Start Circuit

Switch #0 closure may be momentary.


95
Latched output stays on until Switch 1 is pressed.
MOV Instruction

MOV
Move
MOV - Move Source 10
10<
Dest C12:2.PRE
10<

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.
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.


97
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 98
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. 99
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 100
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 101
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.
102
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!

103
BiStable Timer Configuration
Start
TOF
Timer Off Delay EN
Timer T4:8
Time Base 1.0 DN
Preset 5
Accum 0

T4:9/DN

TOF
Timer Off Delay EN

T4:8/DN Timer
Time Base
T4:9
1.0 DN
Preset 5
Accum 0

T4:9/DN
Counter Instructions
CTU
CTU – Count Up Count Up CU
Counter C5:2
Preset 5 < DN
Accum 0 <

CTD – Count Down


CTD
Count Down CD
Counter C5:2
Preset 5 < DN
Accum 0 <
Counter Example

Switch 0 requires five closures to enable Output 0


106
Switch 1 resets the counter and unlatches Output 0
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

107
I/O Port Interfacing
Intel
ROM Memory RAM Memory
Microprocessor

Data Bus

Input Port Output Port Port Port Port Port

D1 D1
D2 D2
D3 D3
D4 D4 Printer Display Mouse Keyboard
D5 D5
D6 D6
D7 .

D7 D0
D0

+5V +5V +12V 120V AC

AC Drive
Motor

+5V
I/O Port Industrial Example

109
Bottle Sensors

110
Review Lecture

Review material
Exam Next Week – Take time to look at the
past material and ask questions.

111
The End

Thank You ! 112


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
113
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

114
Connection Diagram for an ADC
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 116


Analog Input Scaling
ANALOG VOLTAGE DIGITAL INPUT Base 10
INPUT (RAW A-D)
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)
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?

118
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

119
The End

Thank You !
120
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
121
“Experienced” does not mean “careful”

122
The End

123
Week #10 – Process Control
Home Assignments:
1. Informal Lab Material
2. Read the textbook section as stated in the syllabus.

Lab Assignment:
Module 3
124
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

125
Connection Diagram for an ADC
PC #1 PC #2

Digital In/Output
8-Bit A-D Chip Digital Input Port CPU
Port

Tx Tx
C C
UART Chip
Rx RS-232 O Rx O
Driver IC M M
Gnd 1 Gnd 1

Temperature
Transducer
Signal

Gnd +12 Volt


or
-12 Volt
8 Data Bits Serial Data
0 to 5 Volt Digital Data 0 Volt 50' distance
Analog Data 00000000 or 1 wire Transmit
(Sensitive to to +5 Volt 1 wire Receive
Electrical Noise) 11111111 Serial Data 1 wire ground
Connection Diagram for an ADC

Temperature A/D Converter


Transducer
Vin B1

8-bit Data Bus


0-2Volt = 0-200 degrees F GND
00 - FFh
.01V = 1deg
Vref B8

5.1V
Sign

ENB

/Enable

Clock
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 128


Analog Input Scaling - Engineering Units
Volt In ADC Binary ADC Base 10 Value * 1mV
0V 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
5V 01 0011 1000 1000 5000 5.000
8V 01 1111 0100 0000 8000 8.000
10 V 10 0111 0001 0000 10000 10.000

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 129
Analog Input Scaling – MODE = ???
Volt In ADC Binary ADC Hex ADC Base 10
0V 00 0000 0000 0000 0000h 0
1 mV 00 0000 0000 0001 00001h 1
2 mV 00 0000 0000 0010 00002h 2
5V 01 0011 1000 1000 1388h 5000
8V 01 1111 0100 0000 1F40h 8000
10 V 10 0111 0001 0000 2710h 10000

Assuming:
• The analog input is from 0 to +10 volts
• The PLC reference voltage is 16.384 volts

130
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: 200F * .01V = 2Volts
 Made by Analog Devices

131
Temperature Input
+12V

AD590
Temperature sensor

To PLC
Analog In

1K ohm
70degF = 25degC = 298uA
è 298mV @ 1K ohm load
Heater Controller
+12V
Start your tests with the 5V
supply instead of the 12V supply.
Amp
meter
2N2222
Hfe = 100 Do not exceed 1A on the 2N3055 !

PLC
47K ohm

2N3055
Hfe = 20-70
Ic = 1A max
Temperature Setpoint

+9V

Setpoint
298mV @ 70degF = 25degC
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

135
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 program
B) The PC will say you are in “Run Program” mode.
C) Comms | Mode | Run

136
The End

137
Week #11 - Sequences
Home Assignments:
1. Informal Lab Material
2. Read the textbook sections as stated in the syllabus.

Lab Assignment:
Module 3

138
The End

139
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 140
The End

Thank You !
141
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
142
Agenda

1. Safety Overview
2. Introduction to Project Phases
3. Plant Tour
4. Review
5. Closing Discussion

143
Agenda

1. Safety Overview
2. Introduction to Project Phases
3. Plant Tour
4. Review
5. Closing Discussion

144
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)


145
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 required
4. 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); 146

Requires an expensive support team. Highest safety risks.


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 147
Agenda

1. Safety Overview
2. Introduction to Project Phases
3. Plant Tour
4. Review
5. Closing Discussion

148
Agenda

1. Safety Overview
2. Introduction to Project Phases
3. Plant Tour
4. Review
5. Closing Discussion

149
Agenda

1. Safety Overview
2. Introduction to Project Phases
3. Plant Tour
4. Review
5. Closing Discussion

150
Do you want to be a millionaire?

Tonight, I will show you how.

151
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?


152
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
153
only if you contribute (early and often)!
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.

154
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.

155
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”

156
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.

157
EQ is the product of each of the above four skills.
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.
158
The End

Thank You !
159
Week #14 - Final Exam

Exam Time: 7:00 pm to 9:00 pm


All outstanding work is due.

160
Final Wrap-up

• Final Exam
• All Labs and Materials are due

161
Fill-in Material

The material that follows will be discussed


during the course when the schedule
allows.

162

Vous aimerez peut-être aussi