Welcome!: Instructor: Dan Wolf 1/20/2014
Welcome!: Instructor: Dan Wolf 1/20/2014
Welcome!: Instructor: Dan Wolf 1/20/2014
RBT-235-SC61
WELCOME!
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
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
6
RBT-235: Course Introduction
Prerequisites: None
7
Maximize Your Lab Time
You will need the entire scheduled lab time each week
8
Budgeting Your Time
10
What is a PLC?
As defined by the National Electrical Manufacturers Association
(NEMA), a Programmable Logic Controller is:
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
+5V
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
24
Logicals – Conventional Definitions
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
29
Relay Logic versus Ladder Logic
Relay Logic is an electrical circuit.
PB1 PB2
L1
Relay Logic
Ladder Logic
|| |/| ()
|| || |/| ()
|| |/| ()
||
|/| || ()
T F F
No Logical Continuity
|/| |/|
()
T T T
Logical Continuity
Logical AND Construction
T T T
Logical Continuity
33
Logical OR Construction
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
|| || ()
Ladder Logic
3 O:0.0/3
Helpful Hints on the PLC Syntax
41
The Project Planning Sheet
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
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
47
RSLogix Run Procedure
Summary of steps to run RSLogix:
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
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
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
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
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
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
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
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?
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.
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
93
The Retentive Timer (RTO) Circuit
MOV
Move
MOV - Move Source 10
10<
Dest C12:2.PRE
10<
The title page should include your name, chapter# and lab title.
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 Assignment:
Module 2 101
Comments on Section 2.3.4 PPS
The different class teams each implemented variations of the
requirements.
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 <
107
I/O Port Interfacing
Intel
ROM Memory RAM Memory
Microprocessor
Data Bus
D1 D1
D2 D2
D3 D3
D4 D4 Printer Display Mouse Keyboard
D5 D5
D6 D6
D7 .
D7 D0
D0
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
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
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
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:
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
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
5.1V
Sign
ENB
/Enable
Clock
ADC Resolution
ADC Resolution is the smallest change in voltage that the
ADC can measure.
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
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
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?
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
154
EQ versus IQ
155
EQ – Top-Level Notes
2. EQ can be learned.
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
160
Final Wrap-up
• Final Exam
• All Labs and Materials are due
161
Fill-in Material
162