Computer Integrated Manufacturing
Computer Integrated Manufacturing
Computer Integrated Manufacturing
Contents
1. Computer-Integrated Manufacturing Fundamentals ................................................... 1 Overview and History of CIM .................................................................................... 3 Automation.................................................................................................................. 4 USA Automation Principle ......................................................................................... 6 Ten Strategies for Automation and Production Systems ............................................ 6 Elements of an Automated System ............................................................................. 8 Automation Processes ................................................................................................. 9 Industrial control systems ......................................................................................... 11 2. Digital (Combinatorial) Logic Control Systems ....................................................... 13 Rules and Theorems of Boolean Algebra ................................................................. 15 Examples - Boolean Algebra .................................................................................... 18 Sensors/Transducers.................................................................................................. 22 Some Laboratory Issues: Interfacing Sensors to TTL Devices ................................ 24 Examples ................................................................................................................... 27 Problems.................................................................................................................... 30 3. Relays and PLCs ...................................................................................................... 33 Types of Relays......................................................................................................... 33 Relay Characteristics: ............................................................................................... 33 Switches: ................................................................................................................... 34 Programmable Logic Controllers (PLCs) ................................................................. 39 Timers ....................................................................................................................... 42 Counters .................................................................................................................... 43 RTO and RTF Timer Characteristics ........................................................................ 47 MicroLogix 1000 Programmable Controllers........................................................... 62 4. Actuation ................................................................................................................... 65 Pneumatics ................................................................................................................ 65 Hydraulics ................................................................................................................. 66 Schematics ................................................................................................................ 67 Examples ................................................................................................................... 70 Problems.................................................................................................................... 86 5. Robotics .................................................................................................................... 93 CSU-Pueblo CIM Laboratory Manipulators............................................................. 98 Robot Coordinate Systems........................................................................................ 99 Coordinate Systems Relative Frames .................................................................. 100 Rotation ................................................................................................................... 102 Homogeneous Coordinates ..................................................................................... 103 The General Form of the Transformation Matrix ................................................... 106 Problems.................................................................................................................. 114 6. Computer Numerical Control (CNC)...................................................................... 120 Introduction ............................................................................................................. 120 Control Systems: ..................................................................................................... 121 Some Machining Terms: ......................................................................................... 122 Flow of CNC Processing ........................................................................................ 123
Basic G-Codes or Words......................................................................................... 125 Basic Miscellaneous Functions (M-Codes or Words) ............................................ 127 Examples ................................................................................................................. 129 Problems.................................................................................................................. 133 7. Automated Assembly Systems ............................................................................... 139 Parts Delivery at Workstations ............................................................................... 139 Analysis of a Parts Delivery Subsystem ................................................................. 143 Types of Automated Assembly Systems ................................................................ 145 Problems.................................................................................................................. 148 References ................................................................................................................... 150
ii
Figure 1. CIM Wheel. Reprinted courtesy of the Computer and Automated Systems Association (CASA) of the Society of Manufacturing Engineers (SME)
Production system: is the collection of people, equipment and procedures organized to accomplish manufacturing operations of a company.
The Production system can be divided into two groups: 1. Manufacturing Support System: includes procedures, quality control, business functions, inventory control, and product design; and 2. Facilities: includes plant, layout and equipment
Products are divided into two groups: 1. Continuous : (e.g. oil). This is usually realm of chemical engineers. 2. Discrete : (e.g. screws, cars, airplanes). The whole production is treated as a function of product quantity, where for medium size/complexity products: Low Volume : 1-100 Products/Year Medium Volume: 100-10000 Products/Year High Volume : >10000 Products/ Year
The following are some often used abbreviations in CIM: CAD/CAM : Computer Aided Design/Computer Aided Manufacturing CAPP: Computer Aided Process Planning MAP: Manufacturing Automation Protocol
Customer Order
Business Functions
Manufacturing Planning
Manufacturing Control
Raw Material
Finished Product
PHYSICAL ACTIVITIES
Manual Production
Mechanization / Specialization
Automation
Integration
Automation
Automation is a technology concerned with the application of mechanical, electronic and computer based systems used to operate and control production. Examples:
Transfer lines Automated assembly systems Robot based systems Material handling and storage systems Automated inspection system
Automation can be divided into three types: 1. Fixed Automation. Processing sequence is fixed due to equipment configuration. It is used in high volume production. Computers are not used. 2. Programmable Automation. Processing sequence can change. CNC and PLC (Programmable Logic Controls) programs as well as Robots are often used. 3. Flexible Automation. It is like programmable automation except there is no time loss for changeover (No down time). It works only with similar parts.
COST
Manual
Figure 4. Comparison of cost and production between manual and automated production
Simplify Eliminate steps Use appropriate technology Combine steps Simultaneous steps Automate Use of the Automation strategies
5) Increased flexibility strategy : This strategy uses the flexible automation concepts to reduce setup and programming time for the production machine. 6) Improved material handling and storage strategy : This strategy uses automated material handling and storage systems to reduce work- in-process and manufacturing lead time. 7) On-line inspection strategy: This strategy permits corrections to the process while the product is being made thus reducing scrap and increasing the overall product quality. 8) Process control and optimization strategy: This strategy relies on control principles and techniques designed to operate the individual processes and associated equipment more efficiently. 9) Plant operation control strategy deals with control at the plant level. 10) Computer-integrated manufacturing (CIM) strategy further integrates factory operations with engineering design and the business functions.
Power
Program of Instructions
Control System
Process (Plant)
Automation Processes
Safety monitoring: Protects humans/ equipment Uses a number of sensors as inputs: limit switches, photo electric, temperature, pressure, vision, etc. Performs system stops, alarms, slowing down the process, and recovery from unsafe conditions. Maintenance and Repair Diagnostics: Status monitoring Failure diagnostics Repair procedures (uses AI) Error detection and recovery: There are three types of errors: 1) Random: They occur when process is in statistical control. Example: deviations in part dimensions 2) Systematic: They are due to an assignable cause Example: change in material properties drift in machine settings 3) Abe rrations: These errors are attributed to equipment failures or human errors
LEVELS OF AUTOMATION
AUTOMATION LEVEL CONTINUOUS DISCRETE CONTROL LEVEL Corporate Info. Systems Data Flow
Corporate Level
Enterprise Level
Plant Level
Plant Level
Production System
Coordination Control
Units of Operation
Machine Level
Individual Machines
Data Flow
Procedural Control
2*
Device Level
Device Level
Signal Flow
Basic Control
1*
10
1* feedback, interrupts, exception handling polling 2* error detection & recovery, multivariable, changing set points, controller gain, work cycle programming safety Level o DEVICE: ex: one robot joint, one axis of CNC machine. o MACHINE: ex: single robot, single CNC machine, AGV o CELL or SYSTEM: a group of machines supported by a material handling system, computer ex: production line o PLANT: ex: Order processing, Purchasing, Process Planning, Inventory Control, Shop floor control, QC, Material Requirements Planning o ENTERPRISE/CORPORATE: ex: Marketing, Sales, Accounting, Design, Research, Master production scheduling, Aggregate Planning.
Controller
Control Variable
Actuator
Process (Plant)
11
+
Set Point
Error
Controller
Actuator
Process
Controlled Variable
Feedback
Sensor
Measured Variable
Controller
Motor DC Servo
Leadscrew
Computer
Digital
Analog
Analog
DAC
Actuator
Process
Digital
ADC
Sensor
12
AND
Y
Y
Y
X1 X 2
X1 X 2
n i 1
X3
X 1X 2 Y 00 0 01 0 10 0 11 1
Xi
X 1 X 2 Y
OR
Y X1
n
X2
Y
i 1
Xi
13
X 1 X 2
X X 1 2 Y 00 0 01 1 10 1 11 1
NOT (Inverter)
X
X Y Y X 01 10
Figure 13. NOT gate figure and truth table LED: Light Emitting Diode: Long lead is positive
NAND Y X1
X2
X 1 X 2 Y
X 1X 2 Y 00 1 01 1 10 1 11 0
NOR
Y X1 X2
X 1 X 2 Y
X 1X 2 Y 00 1 01 0 10 0 11 0
14
1 1
X 0 X 1 X X X X X X X
Multivariable Rules
X Y Z X (Y Z ) X Y Z X (Y Z ) X X Y X X Y Z (X Y) (X Z) X XY X Y
Demorgans Laws :
X Y X Y X Y
X Y
Design Process: 1. Word Description 2. Truth Table 3. Boolean Expression 4. Simplified Boolean Expression 5. Logic Circuit and Pinouts 6. Build & Test
15
Example: From Truth Table to Logic Circuit Design a logic circuit for a truth table given below.
A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 X 1 1 0 0 1 0 1 0
0 1 2 3 4 5 6 7
Procedure: 1. Write Boolean expression beside each 1 in the output. The expressions are formed by AND- ing input variables in each row in such manner that the input variable is written as it is if there is a 1 in the variable location, or inverted if there is a 0 in the variable location. For example, the first row has a 1 for the output variable X. Then, the Boolean expression, which has three zeros for variables A, B, and C is written as .
0 1 2 3 4 5 6 7
A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
X 1 1 0 0 1 0 1 0
2. When done with all rows, all the Boolean expressions are OR-ed into a starting Boolean expression for the output.
.
3. The equation is simplified using Rules and Theorems of Boolean algebra. 4. A logic circuit is drawn and further simplified to minimize the number of ICs. 5. IC pin connections are assigned to the circuit for wiring. Power and ground connections are added.
16
A X B C
A X B C 7404 A B C 7400 X
7404
+5
A B C
14 7
2 1 2
+5
14 3 7
7400
13 12 11
4 4
17
5) 1 C 7) RS 9) AB 11) A 13) P 15) F 17) AS 19) O P P 21) 0 B B 23) a ( L M ) ( L A) M 25) X X Y Y 27) S T V S T V 29) 0 FW 31) 1 1 0 33) P P 1
FW
0
AB
A
NP
F
CLMFXR
SA 0
MNL
18
3) M + MN
4) P N P
5) L( L
N)
6) B ( B C )
7) J
JB
8) B BJ
9) C (C
D)
10) B
BD
11) R ( R S )
12) S S TV
13) CD(CD DC )
14) FLX
CLMFXR
15) AB( AC
BA )
16) DE
DEF
DEG
17) C ( B C ) D
18) XYZ
X YZ
XZD
19) JK
AJKL
20)
AB B CDEF
19
Apply Demorgans Theorem to simplify the following expressions. In your final answer, overbars should not extend over more than one variable and there should be no more than one overbar over a variable. 1) A B 2) AB
3) A B C
4) ABC
5) A ( B C )
6) AB CD
7) AB CD
8) ( A B) (C
D)
9) AB(C
D)
10) AB (CD
EF )
11) ( A B C
D)
ABC D
12) ( A B C
D) ( ABCD)
14) ( A B) (C
D) ( E
F ) (G
H)
15) ( J
K ) (L M )
16) A ( B CD)
17) ABC
ABC
18) A B C
D)
ABC D
20
1)
Apply DeMorgans Laws to simplify the following expression. In your final answer, over bars should not extend over more than one variable and there should be no more than one over bar over a variable:
ABC DE
e) None of the above 2) The above digital logic circuit represents _____ logic expression
A B C D
a) b) c) d) e) 3)
a) AB CDE b) c)
( A B) (C D) AB (CD)
d) AB CD e) None of the above 4) The above digital logic circuit represents ______ logic expression.
A B
21
Sensors/Transducers
Transducer is a device that converts one form of energy into another (broad definition). Transducer is a device that converts any form of energy into electrical energy (narrow definition). Sensor is a device comprising a transducer and signal conditioning circuitry. Types of Transducers: 1. Analog (e.g. potentiometer) Discrete (e.g. switch, optical encoder) A number represents value of measured variable Resistive Capacitive Inductive Photo- voltaic Piezoelectric Seaback Effect Hall Effect. 3. Depending on the proximity to the measured quantity transducers can be
2. Depending on the type of the output variable transducers can be classified as:
4. Depending on the type of the measured quantity transducers can be classified as: Light transducers: photo resistor photo cell (photo- voltaic cell) photo diode (PIN, Avalanche) photo transistor sensor array CCD (charged couple device) 22
Heat transduce rs: thermistor (NTC: negative temperature coefficient) thermocouple (uses Seaback effect) RTD (Resistance temperature detector): wire
Rt
Ro
t and R
l S
bimetallic switch
Motion transducers: potentiometer limit switch optical encoder tachometer Linear Variable Differential Transformer (LVDT) Rotary Variable Differential Transformer (RVDT) ultrasonic range sensor Force trans ducers: strain gage piezoelectric transducer (also measures acceleration, pressure) Magnetic field transducers : Hall effect sensor Che mical sensors Biosensors
23
Practical Considerations when Using Sensors and Logic Gates Interfacing Sensors to TTL Devices
Example: Design and implement a digital logic controller to perform the following: 1. When the START switch is made a green LED will turn on - indicating normal operation of a machine. 2. When the STOP switch is made a red LED will turn on and the green LED will turn off - indicating that the machine is stopped. 3. When a hand is placed above the circuit, the red LED will turn on and the green LED will turn off - again, indicating that the machine is stopped. 4. When the thermistor is heated the red LED will turn on and the green LED will turn off - again, indicating that the machine is stopped.
1. Photo-resistor:
RL
Resistance decreases
+5V 5V Vin R1
24
Vout RL Vout
RL high implies no light
Vin R1 RL Vin RL R1 RL
2. Thermistor
R TH
Figure 18. Thermistor RT H = f (temperature) When Temperature increases RT H decreases ( t NTC: Negative Temperature Coefficient
+5V RTH Vin R1 Vout
RTH
As temperature increases
25
Using Gates
+5V ( if input is not used) A. B A B
A B
A B
26
Examples
Material Covered 1. Obtaining a truth table from word specifications 2. Truth table to Boolean expression 3. Proofs of identities by truth tables and Boolean algebra 4. Simplification of Boolean expressions 5. Digital logic circuits to Boolean expressions 6. Boolean expressions to digital logic circuits 7. Combinations of the above Example 1. Design a digital control circuit for an automated soft drink dispenser. When the dispenser is turned ON, and a drink selected (COKE or PEPSI) one of the two drinks (COKE-OUT or PEPSI-OUT) will be poured in a glass until the glass is FULL.
ON COKE PEPSI FULL COKE-OUT
PEPSI-OUT
27
Example 2. Simplify X XABCD X B X BCD X Solution: In the above expression , so the whole expression is equal to 1.
Example 3. Derive a Boolean expression corresponding to the digital logic circuit below. (Do not simplify.)
A B C D E F
Figure 25. Digital logic circuit for Example 3 Solution: Example 4. Prove using a truth table A( B C) BC A BC
28
Example 5. Build A B CD ( E
F)A Y
A B C D E F
A B
CD
AB Y
EF
(E F)A
(E F)A
29
Problems
Simplification of expressions 1. Simplify X XABCD X BC
X BCD
X XEFG .
2. Simplify ABCDEFGHAY XY( A B) XY ( A B) X Y . 3. Simplify LMN MNL B( B C) C L LC . 4. Simplify LMN MNL B(BD C) C L LCD . 5. Simplify X
XABCD X BC X BCDE XX EFG .
XY .
XY ( A B )
XY ( A B )
Getting Boolean expressions from circuits 1. Derive a Boolean expression corresponding to the digital logic circuit below. (Do not simplify.)
A B C D E F
Figure 27. Digital logic circuit for Problem 1
30
2. Derive a Boolean expression corresponding to the digital logic circuit below.(Do not simplify.)
A B C D E F
Figure 28. Digital logic circuit for Problem 2 Designing a digital control circuit 1. Design a digital control circuit for a two-door car warning system. When a key is in the ignition (input KI), and one of the doors is open (left door = LD, right door = RD) a door ajar (DA) LED will light and a sound warning (S) will activate. Also, if the left door is open and the car lights are left on (LO) only the sound warning will activate regardless of the position of the ignition key. 2. Design a digital control circuit with five inputs (A, B, C, D and E) and two outputs (X and Y). Draw a truth table, simplify expressions and draw the final digital logic circuit. When A is true and any one of the other inputs is true both outputs are true. Also, if B and C are true or D and C are true output Y will be true regardless of the input A. 3. Design a digital control circuit to operate an AGV. Draw a truth table, simplify expressions and draw the final digital logic circuit. The AGV controls consist of FINISH switch F, START switch S, an ultrasonic proximity sensor P, a touch sensor T, a green light G, a red warning light R and a motor M. Operation of the AGV is as follows. While S is OFF all the outputs are OFF. During normal operation, when S is switched ON the green light turns ON and the motor turns ON moving the AGV along its prescribed path. When FINISH switch is turned ON the green light turns OFF, motor stops (OFF) and the red light turns ON regardless of the sensors. FINISH switch has no effect on the outputs when START switch is OFF.
31
While traveling (S is ON and F is OFF) if an obstacle triggers the proximity sensor P (ON) the green light turns OFF and the red light turns ON. The vehicle keeps moving. Furthermore, if an obstacle triggers the touch se nsor (T is ON) or triggers both sensors (the proximity and the touch sensor) the green light turns OFF, the red light turns ON and the motor stops (turns OFF).
Proof using truth table 1. Prove using a truth table C( AB AB) BC C 2. Prove using a truth table C( AB AB) BCD C
32
Types of Relays
DC (direct current) Relay: input (DC current); output (AC/DC current) AC (Alternating current) Relay: input (AC/DC); output (AC/DC) In an AC relay, shaded pole is a conducting ring that creates a magnetic field that lags the applied flux which prohibits collapse of flux across the gap. Reed Relay (Reed Switch): input (external magnetic field); contacts comprise two ferromagnetic non-touching overlapping strips enclosed in a hermetically sealed glass bubble. Time Delay Relay (Timing Relay) includes an adjustable timer with a function to delay the relays action. There are two types: 1. On delay : When the coil is energized there is a delay before the armature is pulled and contacts made, and 2. Off delay : Contacts are made for the duration of the delay, and then they are returned to their normal state. Contactor is a relay used in power circuits for controlling currents over 40 Amperes.
Relay Characteristics:
Pull-in voltage/current is the required amount of voltage/current applied to the relays actuator to create magnetic field strong enough to pull armature down to close the gap. Drop-out voltage/curre nt is the amount remaining in the actuator after the spring has overpowered the magnetic field and pulled the armature back. Maximum voltage/curre nt is the maximum voltage/current that can be controlled.
33
Switches:
Switches are often used as discrete inputs to the automatic control systems. Switch Types 1. Momentary s witch stays activated (made) only while the pressure is applied on the switch activating mechanism (lever, push button, etc.). We will assume momentary switches for all the examples unless specifically stated otherwise. 2. Push-ON Push-Off switches activate when the pressure is applied momentarily and stay activated until the pressure is applied again. 3. NO and NC switches have different starting configurations. 4. SPST (single pole single throw) switches connect/disconnect a single line. 5. SPDT (single pole double throw) switches connect/disconnect one line (connected to the switch pole) to two (2) other lines connected to the two throws. 6. DPDT (double pole double throw) switches act as two SPST switches except that only a single switch activating mechanism is used. Various relays, switches and outputs are used in high power fixed automation assemblies. Relays and switches are used to control high power outputs. Ladde r logic presents a parallel circuit consisting of inputs and outputs. The power lines are rails and the parallel branches are rungs.
LADER LOGIC
34
PB-B CR1 RL
CR1-1
CR1-2 L
35
An Alarm Example
Design a physical ladder logic circuit for an alarm system described below: Let PS-1 represent a pressure switch, CR1 a silencing relay, H a horn and R a red warning light. When the pressure switch is triggered, the horn sounds an alarm and the red warning light turns on. When RESET switch is made, the silencing coil CR1 locks in turning off the horn. The red warning light turns off when pressure switch is deactivated
PS-1
CR1-1
HORN
R RESET CR1
CR1-2
Figure 34. Alarm example physical ladder logic
PS-1
CR1-1
HORN
36
DEVICE TYPE
PUSH BUTTON (PB) LIMIT SWITCH (LS) TEMPERATURE SWITCH (TAS) FLOW SWITCH (FLS) LEVEL SWITCH (FS) CONTROL SWITCH (CR) LATCHING RELAY (CRL) COUNTER (CTR) TIME DELAY RELAY (TR) DELAY BEGINS WHEN COIL IS ENERGIZED DELAY BEGINS WHEN COIL IS DE-ENERGIZED
37
N C N O
T oggle switch
L im it sw itc h ;N O
L im it s w itc h ;N C
Pilot light
N O T C
T im ed e la yo nc lo s in g N O T C
N C T O
T i m ed e l a y o n o p e n i n g N C T O
A
Flow sw itch; close on increase in flow
Flow sw itch; open on increase in flow
F u s e
L iq u idle v e ls w itc h ; c lo s eo nris in gle v e l;
R e s i s t o r
T h e r m a ls w i t c h ; c l o s eo n r i s i n g t e m p ;
M
T h e r m a ls w i t c h ; o p e n o n r i s i n g t e m p
M
Heater element
M otor; 1-phase
M o to r; 3 -ph ase
R e l a yo r c o n t a c t o rc o i l
M a g n e t i c o v e r l o a d N O r e l a yN C r e l a y p r o t e c t o r ( S o l e n i o d )
38
39
Laboratory Example: In a single polishing operation a polishing tool is moving via a lead screw between two limit switches. Design a SLC 100 PLC ladder logic diagram to accomplish this task given I/O addresses below. Table 4. I/O assignments for the polishing tool START (NO toggle) Left Limit Switch (NO) LLS Right Limit Switch (NO) RLS Motor Control Forward MF Motor Control Reverse MR Internal Relay
START
1 3 4 12 11 701
001
701
012
MF
001
RLS 004
LLS 003
LLS: LEFT LIMIT SWITCH 701 MF: MOTOR FORWARD (RIGHT) MR: MOTOR REVERSE (LEFT)
701
START
001
701
MR 11
Figure 36. SLC 100 PLC ladder logic for the polishing tool
40
MCR = master control reset (acts like parenthesis) -(MCR)START 1 MCR 701 MF 012
LLS 3
701
701
701
MR 11
MCR
Figure 37. PLC ladder logic polishing tool example: using an MCR ZCL = zone control last state -(ZCL)When ZCL is false the outputs remain in their last state
1
1 4 70 1 1 70 1
2 3
Z C L 7 01
1 1
Z C L
Figure 38. ZCL example Latches: -(L)- Once ON (true) it can be turned off (False, unlatched) only by a separate (U)- rung and a matching output unlatch instruction
41
Timers
Retentive Timer ON-Delay -(RTO)When the accumulator value (AC) reaches the preset value (PR) the associated timer contacts (status bit) are made. The status bit has the same address as the RTO. The timer continues with timing. To stop the timer, the Reset instruction (RST)- must be used with the same address as the timer. A Reset Accumulated value (RAC) is usually set to 0000. The timer function is retentive, thus the loss of power will not clear the current accumulator value. When the power is restored the timer will continue counting from the automatically stored accumulator value. Address: 901 ~ 932. Time base: 0.1 second. Range 0.001 to 999.9 seconds. When programming the delay, since there is no decimal point, the numbers represent tenths of seconds (e.g. PR 0400 = 40 seconds). See examples 1 and 2 in Figure 51 and Figure 52.
42
Counters
-(CTU)- Count up -(CTD)- Count down Address: 901 ~ 932. Range 1 to 9999. Counter instruction counts successive False to True transitions. Since it is a retentive instruction -(RST)- is required to reset it. Address + 50 is reserved for overflow/underflow bits Example :
1 901
CTU
PR 9000 2 901
CTD
PR 9000 901 951 15 ON when CTU reaches 9000 OFF when overflows above 9999 3 901
RST
951 16 ON when counter overflows
43
Table 5. Various PLC internal instructions and their address space Addresses Inte rnal Instruction Relay Type Instructions SLC 150 Programmable Controller 701 thru 863 plus two addresses of each I/O address block (Page 3) 901 thru 932 and 951 thru 982 901 thru 904 and 951 thru 954 (SQO instructions) 869 thru 873 874,875 100 864 865 866 867 868 876 SLC 100 Programmable Controller 701 thru 866 plus two addresses of each I/O address block (Page 3) 901 thru 932 and 951 thru 982 Not applicable 869 thru 873 874,875 100 Not applicable Not applicable Not applicable 867 868 876
Timer, Counter, Sequencer, and Reset HSI Counter Fine Time Base Long Time Base Breakpoint Programmable EEPROM Auto-Load Battery Status Triac Zero-Cross Turn-On Enable TCAT Power-Up Program Initialization Auto/Man Switch MCR and ZCL Shift Register
Addresses are not required Combines Relay Type, ZCL, and Sequencer instructions Note that these instructions apply to the SLC 150 only, although the addresses apply to instructions used in the SLC 100 as well (relay type, timer, counter, sequencer). You must be cautious when interchanging programs between the SLC 150 and SLC 100 CAUTION: Interchanging programs between controllers could ca use improper operation and damage equipment. You must be especially cautious when interchanging programs between SLC 150 and SLC 100 controllers, because of difference associated with certain internal addresses and other variations.
44
I/O Addresses I/O addresses are used in a program to represent the input and output circuits connected to the processor unit and I/O expansion units. There are 112 I/O addresses. These are divided into 7 address blocks (10 input addresses and 6 output addresses per block). The SLC 150 processor unit, having 32 I/O s, uses blocks 1 and 2. The SLC 100 processor unit, having 16 I/O s , uses block 1. One can connect various combinations of SLC 150 and SLC 100 I/O expansion units to your processor unit. Assigning addresses is simple, once there is an understanding of how processor address blocks are allocated. Table 4 identifies the address blocks and summarizes the address block requirements for the various processor and expansion units. Seven address blocks are identified.
Table 6. I/O Address Blocks Input Output Addresses (10) Addresses(6) 1-10 11-16 101-110 111-116 201-210 211-216 301-310 311-316 401-410 411-416 501-510 511-516 601-610 611-616
1 2 3 4 5 6 7
45
Table 7. Address block requirements for the various processor and expansion units ADDRESS BLOCKS REQUIRED FOR PROCESSOR AND EXPANSION UNITS Type of Unit
SLC 150 Processor Unit SLC 150 Expansion Unit SLC 150 High Speed Input Module SLC 100 Basic Expansion Unit SLC 100 Relay Output Expansion Unit SLC 100 Relay Output Expansion Unit SLC 100 Analog In/out Expansion Unit
I/O
20/12 20/12 1/0 10/6 10/6 0/12
Addresses Used
Block 1 and 2 addresses are used. Inputs: 1-10, 101-110. Outputs: 11-16, 11-116 All addresses of 2 consecutive blocks are used An internal SQO address is associated with the HSI module Block 1 addresses are used. Inputs: 1-10. Outputs: 11-16 All addresses of the block are used. Output addresses of 2 consecutive blocks are used. Input addresses of the 2 blocks are bypassed. Upper two input addresses(9, 10) are bypassed. All output addresses of the block are bypassed.
8/0
Connection Example . The following example indicate how you might interconnect expansion units with an SLC 150 processor unit and an SLC 100 processor unit. Note that example 1 includes an HSI module. All input and output addresses of all 7 address blocks are used. The configuration provides 112 I/O s (70 inputs, 42 outputs). It also provides one high speed input circuit.
46
Address: 901-932. Time base: 0.1 second. Range: 000.1 to 999.9 seconds. Time rs with long or fine time base. Special instructions can be used for time delays beyond 999.9 seconds and for timers with greater resolution than 0.1 second.
AC, PR and RAC Values The timer instruction functions as an internal clock, counting 0.1 second intervals. The number of intervals counted is called the Accumulated value (AC). Counting takes place under these TRUE/FALSE rung conditions: Table 8. RTO and RTF timer conditions
RTO Timer Conditions
TRUE Timer is counting FALS E TRUE Counting Counting stops. AC resumes value retained. AC value represents the cumulative time during which rung is TRUE.
The clock figure below represents the AC value. The time delay is set by programming a Preset value (PR). In this case, the PR value is set at 400.0 seconds. The figure also shows a Reset Accumulated value (RAC) at 0000. This is automatically set when the reset instruction is programmed. In most cases, RAC is left at 0000, but it can be changed to any value up to 9999. If an RAC value is programmed, the time delay will equal PR minus RAC.
47
The programmer display does not show a decimal point for RAC values. Thus, if PR is programmed to 30.8 and RAC to 105, the time delay will be 30.8 minus 10.5=20.3 seconds.
RA C
9 8 7 6
3 5 4 PR set to 400.0
Figure 41. Clock figure representing AC values Status and Overflow Bits. instruction:
9 0 1 9 0 1
The timer status bit has the same address as the timer
Figure 42. Status Bits The RTO status bit is set ON when the AC value reaches the PR value. Examine ON instructions at the status bit address go TRUE; Examine OFF instructions go FALSE. The RTF status bit is set ON instantaneously when the RTF instruction goes TRUE, and is set to OFF when the AC value reaches the PR value. Examine ON instructions at the status bit address go FALSE; Examine OFF instructions go TRUE. The overflow bit is given the timer address plus 50. (901+50=951):
9 5 1 9 5 1
Figure 43. Overflow Bits The overflow bit is set to ON when the AC value overflows from 999.9 to 0000. Examine ON instructions at the overflow bit address go TRUE; Examine OFF instructions go FALSE. RTO and RTF status bits are not affected when the AC value overflows.
48
Reset Instruction The reset (RST) instruction is given the same address as the timer instruction:
9 0 1
R S T
R A C 0 0 0 0
Figure 44. Reset (RST) When the RST instruction goes TRUE, status bits and overflow bits are set to OFF, and the AC value is reset to the RAC value. The RST instruction must go FALSE again before the timer can resume counting.
901
(Examine ON Instructions) RTO Status Bit RTF Status Bit Overflow Bits
PR
P R
P R
P R
P R
PR
AC < PR ON OFF ON
AC
PR
ON OFF ON
Powe r Down: the timer status is retentive. When you apply power after a power-down, the AC value and ON/OFF states of status and overflow bits will be the same as before the power-down. The status is also retained when going from the Run mode to another mode.
49
Ope ration after CPU Faults. Timer instructions and associated status bits and data values are reset to their initial conditions after a CPU fault is detected (error codes 1 thru 9, 26, and 51). Monitoring and Changing Data: PR and AC values can be monitored and changed in the Run and Test modes. The PR value can be protected from changes in the Run and Tests modes by using the UNPRT/PRT key.
50
RTO
PR xxx.x
901 Rung 2
015
901 Rung 3
016
002 Rung 4
Reset Instruction
901
RST
RAC yyyy
51
Figure 46. Timing Diagram Letters A to F at the bottom of the timing diagram indicate the following events: A. Rung 1 goes TRUE. The AC value increments, beginning at AC=RAC. Examine OFF instruction 901 in rung 3 is TRUE. B. Rung 1 goes FALSE. The AC value stops incrementing, but the existing value is retained. C. Rung 1 goes TRUE. The AC value continues to increment from the point it left off. D. The AC value has reached the PR value. Examine ON instruction 901 goes TRUE, making rung 2 TRUE. Examine OFF instruction 901 goes FALSE, making rung 3 FALSE. The AC value continues to increment. E. Rung 1 goes FALSE. The AC value stops incrementing, but the existing value is retained. Rung 2 remains TRUE. Rung 3 remains FALSE. F. Rung 4 goes TRUE. The AC value is reset to the programmed RAC value. Examine ON instruction 901 goes FALSE, making rung 2 FALSE. Examine OFF instruction 901 goes TRUE, making rung 3 TRUE.
52
While the RST instruction is TRUE, the timer is disabled. Timing can resume when rung 4 goes FALSE again.
53
001 Rung 1
901
RTF
PR xxx.x
901 Rung 2
015
901 Rung 3
016
002 Rung 4
Reset Instruction
901
RST
RAC yyyy
Figure 47 . Ladder Diagram Letters A to G at the bottom of the timing diagram indicate the following events: A. The timer is reset, with AC=RAC. Rung 1 is FALSE. Examine ON instruction 901 in rung 2 is FALSE. Examine OFF instruction 901 in rung 3 is TRUE. B. Rung 1 goes TRUE. Instantaneously, Examine ON instruction 901 goes TRUEE and Examine OFF instruction 901 goes FALSE, making rung 2 TRUE and rung 3 FALSE. C. Rung 1 goes FALSE. The AC value begins to increment. D. Rung 1 goes TRUE. The AC value stops incrementing but the existing value is retained. E. Rung 1 goes FALSE. The AC value continues to increment from the point it left off. F. The AC value has reached the PR value. Examine On instruction 901 goes FALSE, making rung 2 False. Examine OFF instruction 901 goes TRUE, making rung 3 TRUE. The AC value continues to increment. G. Rung 4 goes TRUE. The AC value is reset to the RAC value. Not that this is the same situation as event A, with the Examine ON instruction 901 FALSE and the Examine OFF instruction 901 TRUE.
54
Figure 48. Timing diagram While RST instruction is TRUE, the timer is disabled. After the RST instruction goes FALSE and rung 1 makes a TRUE or FALSE transitio n, the timing period will begin at AC=RAC.
55
RTO
PR 00000
Rung 2
Rung 3
002 Rung 4
901
RST
RAC 0000 002
RST
RAC 0000
56
Letters A to E at the bottom of the timing diagram indicate the following events: A. Examine ON instruction 001 in rungs 1 and 2 go TRUE. Rung 1 goes TRUE. AC value of timer 901 increments from 0000. B. AC value of timer 901 overflows beyond 999.9, setting the overflow bit (address 951) ON. Examine ON instruction 951 in rung 2 goes TRUE, making rung 2 TRUE. AC value of timer 902 increments from 0000.1000 seconds has elapsed. C. AC value of timer 902 reaches programmed PR value of 400.0, setting the status bit (address 902) ON. Examine ON instruction 902 in rung 3 goes TRUE, making rung 3 TRUE. D. Instructions 001 in rungs 1 and 2 go FALSE, making rungs 1 and 2 FALSE. Rung 3 remains TRUE. E. Reset rungs 4 and 5 go TRUE. Examine ON instructions 902 and 951 go FALSE. AC values are reset to 0000. While the RST instructions are TRUE, the timer is disabled. Timing can resume when rungs 4 and 5 go FALSE again.
57
58
Table 8 can be easily converted to an RTF timer keystroke example. Just change the RTO instruction in the ladder diagram to an RTF instruction. Then, instead of pressing the (RTO)- key in rung 1, press the SHIFT key and the (RTF)- key.
Timer Keystroke Example. Program this basic RTO timer. After you have
programmed it, you may want to use the NEXT and LAST keys to review your work.
59
Table 10. Keystroke example Keystroke Example RTO Instruction 901 011 RTO
Rung 1 901 Rung 2 002 Rung 3 901
PR 300.0
011
RST
RAC 10
Explanation Arbitrarily, we start with the display showing 885 words of memory( max for SLC 100)
Pro mpt for an address Address 001 is entered Pro mpt for an address Address 901 is entered Pro mpt for a preset (PR) value. PR value of 300.0 seconds is entered This completes rung 1 Pro mpt for an address Address 901 is entered Pro mpt for an address Address 011 is entered This completes rung 2 Pro mpt for an address Address 002 is entered The SHIFT key must be pressed before you press the (RST)- key. The dot to the right of the rung number indicates you have pressed the SHIFT key. Pro mpt for an address Address 901 is entered The display indicates that the RAC value is set to zero. You can override th is by entering an RAC value. The RA C value is specified as 10. for t imers, the actual RAC value is 0.1 of the value displayed( in this case it is 1.0, not 10). The time delay (PR-RA C) is set at 300.01.0=299.0 seconds End of program
-(RST)9, 0, 1 ENTER
-(RST)-(RST)-(RST)-
--90 1 --- 0
3 3 AC
1, 0
-(RST)-
---1 0
AC
ENTER
878
End
60
Example 1: Design a PLC SLC/100 ladder logic to turn ON and OFF a light (output 11) at 0.5 second intervals. When run, the light will flash ON and OFF.
901 RTO PR 5 901 902 RTO PR 5 LIGHT 11
901
902
901 RST
902
902 RST
Figure 51. PLC ladder logic for example 1 Example 2: Design a traffic light: Red (output 11) 25 seconds, Green (output 13) 32 seconds and Yellow (output 12) 3 seconds.
901 RTO PR 250 902 RTO PR 320 903 RTO PR 30 RED 11 GREEN 13 YELLOW 12 901 RST 902 RST 903 RST
901
902
901
901
902
61
Figure 53 Physical dimensions for various types of MicroLogix 1000 programmable controllers
62
63
64
4. Actuation
1. Pneumatic 2. Hydraulic 3. Electrical
Pneumatics
Pneumatics presents (linear) motion actuation by air power. Construction: 1. Cylinders: single acting vs. double acting
PISTON
PORTS
Figure 56. Double-acting cylinder symbol 2. Valves:
Figure 57. Two-position two-way valve symbol (not showing inner ways) number of compartments = number of positions Number of hoses = number of connections (ways) Examples: 2 position 2 connection
65
Figure 60. Solenoid actuated three- position four-way valve symbol 3. FRL: filter regulator lubricator 4. air supply/source usually a compressor
Hydraulics
Hydraulics presents motion actuation by fluid power. Construction: 1. Hydraulic pump: one directional or bi-directional
66
Figure 64. Bi-directional hydraulic motor symbol Table 11. Comparison of actuation types Hydraulics Electric Actuation
Advantages: Large lift capacity Moderate speed Accurate (joints can be held motionless) Precise control Advantages: Fast Accurate Sophisticated controls Available Inexpensive Easy to use Disadvantages: Need for gear trains Gear backlash limits precision Electric arcing Power limit
Pneumatics
Disadvantages: Accuracy limited by air co mpressibility Noisy Leakage of air Need for filtering system Maintenance and construction requirements
Disadvantages: Expensive Flu id pollution Noisy Not suitable for very high speed cycling
Schematics
Physical schematic includes pneumatics/hydraulics schematic and physical placement of switches and sensors. Electrical schematic includes electrical diagrams often ladder logic. A basic hydraulic system using standard symbols is presented in Figure 65.
67
Accumulator Pump
Flow-control valve
Filter
Tank
Figure 65. Basic hydraulic system A control valve / double-acting cylinder system is shown below. Figure 66 represents the system where the cylinder is not moving. In Figure 67 the piston of the cylinder is moving left, while Figure 68 shows the piston moving towards right.
68
Return to tank
From pump
Figure 67. Spool to right
Return to tank
From pump
Figure 68. Spool to left
69
Examples
Example 1. Design a two- hand electrical safe circuit for the pneumatic punch press shown below.
LS A
B SOL B LS B
A SOL A
IN
3 WAY VALVE
SOL C
70
PB1 1 CR
1 CR A
PB2 2 CR
2 CR B 1 CR B
2 CR B
SOL C
LS A
SOL A SOL B LS B
71
Example 2.
Sw C OUT Roller Conveyor Sw B 2
IN Belt Conveyor
PACKAGE Sw A
SOL B
SOL B
SOL A
SOL A
Figure 71. Package station example OPERATION: 1. When package makes Sw A, cylinder 1 extends moving the package. 2. When Sw B is made cylinder 1 retracts and cylinder 2 extends (actuates) 3. When Sw C is made cylinder 2 retracts and the system is ready for next package. START Position: Cylinders 1 and 2 are retracted, and there are no packages in the system. Switch operation: Sw A o Fires SOL A o Package pushed (supply to blind end of cylinder 1) Sw B o Fires SOL B and SOL A o Supply to blind end of cylinder 2 Sw C o Fires SOL B
72
Example 3. Explain fully the operation of this circuit. Fix it, if needed.
Sw A
2 Sw B
SOL A
SOL A
SOL B
SOL B
M
SOL A SOL B Sw A SOL B SOL A Sw B
73
L1
PB 1
L2
T R1
M2
TR2
10 secs
TR2
M3
Figure 73. Motor system Note: OL1, OL2, OL3 are overloads for motors M1, M2, M3, respectively.
74
PB 1
PB 2 CR1-1 CR1
75
Example 6. A company approached you to help them design an automatic bottle- filling station. You accepted the assignment. Here are the specs. Design a bottle- filling station that will perform as follows: a) When an empty bottle is placed on the conveyor belt, the conveyor motor (M1) will start. b) The bottle will move until it reaches the filling position. c) Then, the conveyor stops. d) The pre- fill tank is filled with liquid (pump B) until the high- level limit switch (HL) is made. e) Pump A is energized and the bottle is filled from the pre-fill tank. When the liquid level drops below the low- level limit switch (LL), pump A shuts off. f) After the bottle is filled and removed, another empty bottle is placed on the conveyor and the process repeats. Provide PLC SLC100 ladder logic diagram, I/O address mapping, and all necessary details and assumptions to fully clarify your design.
Ls1
Ls2
M1
76
Assume the bottle does not pass LS2, but sits on it while filling. LS1: bottle placed at the beginning of the conveyor LS2: bottle in position M1: conveyor motor
START CR1-1 CR1-2 CR4-1 LS1
STOP CR1
CR2-1 M1
77
Example 7. Draw a physical ladder logic diagram for timing circuit, which turns on and off two outputs alternatively (like the left and the right lights of a police car). The period for each output is 1 second.
STOP CR1
TR2-1
TR2-2
RL
STOP CR1
TR1-3 RL
78
Example 8. A conveyer belt shown below can run by a single motor in both directions. An object is placed initially at point A. when the START push button is pressed, the object is moved to the right forward and will continue to move until limit switch LS1 is activated. Then the direction will change to reverse and the object continues to move to the left until limit switch LS2 is activated. The object will change direction once more and the process is repeated. Limit switches LS1 and LS2 are normally closed. Design and draw the ladder logic diagram for this process. An emergency STOP switch should also be included in the system. Note: this scheme is used in applications with repetitive tasks such as pick and place operations by a robot arm.
Forward
LS2
LS1
79
Example 9. The process to be controlled is shown in the figure below. A tank is used to mix two liquids. The control circuit operates as follows: A. When the start button is pressed, solenoids A and B energize. This permits the two liquids to begin filling the tank. B. When the tank is filled, the float switch trips. This de-energizes solenoids A and B and starts the motor used to mix the liquids together. C. The motor is permitted to run for one minute. After one minute has elapsed, the motor turns off and solenoid C energizes to drain the tank. D. When the tank is empty, the float switch deenergizes solenoid C. E. A stop button can be used to stop the process at any point. F. If the motor becomes overloaded, the action of the entire circuit will stop. G. Once the circuit has been energized it will continue to operate until it is manually stopped.
MOTOR A B
FS
80
STOP
START CR CR-1
OL
A B
M FS CR-4 TR-3 TR
60 sec C
81
Example 10. Prepare a physical and programmed ladder diagram for the control problem shown in Figure 81. The global objective is to heat a liquid to a specified temperature and keep it there for 30 minutes. The hardware has the following characteristics: 1. START push-button is NO, STOP is NC. 2. NO and NC are available for the limit switches. The event sequence is 1. Fill the tank 2. Heat and stir the liquid to the temperature point and hold for 30 minutes. 3. Empty the tank. 4. Repeat from step 1.
H
Figure 81. Tank system example
82
START STOP
CR1-1 CR1-2 LUP VOUT-1 CR1 VIN
SOL-VIN VIN-1 VIN-2 VOUT-2 CR1-5 TR1 CR1-3 VIN-3 TR1-1 LE VIN-4 TEMP H 1800 CR1-4
TR1-2
VOUT SOL-VOUT
Figure 82. Physical ladder logic for tank system example In Figure 82, H represents the heater and M represents the stir motor. Solution: the solution is provided by first constructing the physical ladder diagram. Once this is done, addresses are assigned to all the elements and the ladder diagram program is prepared. The figure below shows the six-rung physical ladder diagram. Rung 2 opens the input valve, provided the output valve is not open, until the full level is reached. When the full level is reached, rung 3 turns on the stir provided the output valve is not open. Rung 4 starts a 30- minute timer. The heater is controlled by rung 5. The rung is energized and deenergized as the temperature goes below and above the limit. When the timer times out, the rung is de-energized and rung 6 is energized to open the output valve. The output valve remains open until the empty limit switch opens. The output valve cannot be opened as long as the input valve is open.
83
START STOP
CR1-1 CR1-2 LUP VOUT-1 VIN CR1
VIN-1 VIN-2
VOUT-2 CR1-5
CR1-4 S TR1
CR1-3 VIN-3
TR1-1
TEMP
1800 H
TR1-2
LE
VIN-4
VOUT
Figure 83. Improved physical ladder logic for tank system example
84
Example 11. A part is placed on a conveyor, which is not moving. After the part is placed on the conveyor, the conveyor starts and the part moves. In the middle of the conveyor, the part moves through a three-foot area where it is painted. The part does not stop during the time it is being painted. When the part reaches the end of the conveyor stops and the part is removed. The process then starts all over again. Draw the relay logic necessary to accomplish this tank. Use limit switches to detect the presence or absence of the part. Solution:
START Conveyor M1 1M1
Weight 1
1S3
1S2
2M1 S1
S2 Paint solenoid S3
Weight 2
STOP Conveyor
85
Problems
Material covered: 1. Design a simple physical ladder logic 2. Design an automated system including a physical ladder logic and a physical layout (pneumatic/hydraulic or other mechanical system) 3. Design an automated system using PLC ladder logic 4. Combinations of the above Designing Physical and PLC Ladder Logic Diagrams 1. Design a physical ladder logic and a PLC SLC 100 ladder logic circuit to start and stop 3 motors in the following sequence: 1. After the START pushbutton is pressed the motor M1 starts. 2. The motor M2 starts 1 minute after the motor M1. 3. The motor M3 starts 2 minutes after the motor M2. 4. 5 minutes after M3 starts all three motors stop. There is also an emergency STOP button to stop all the motors at once if needed. In addition, if any of the three motors is to stall (overloads) all running motors will stop. After the STOP pushbutton is pressed, or an overload shut down, START must be pressed to restart the sequence. Explain your design. 2. In a paper mill 3 rollers are used. Each roller requires 2 motors (one on each side of the roller). When starting this part of the paper mill, the motors are powered in succession. The first roller with the first two motors start as soon as the START palmbutton is pressed. 10 seconds after that the second set of motors is started, and the 10 seconds after the second set, the third set of motors is started. The STOP button stops the process by stopping all of the motors at once. Furthermore, there is a weight switch (W-SW) that stops the whole system when the weight of the last roller reaches a set limit. Also, if any motor is overloaded, the whole system will shut down. Implement the ON-controlling method. Draw a physical ladder logic diagram and a PLC SLC 100 ladder logic diagram for this process. 3. In a tank- filling process four solenoid-actuated valves are used: three solenoids (SOLA, SOL-B, and SOL-C) fill the tank with three different liquids and one solenoid (SOL-D) empties the tank. The operation is timed. There are three inputs: START and STOP push buttons and an overflow (O) float switch. 1) When the START push-button is pressed the first liquid pours in by energizing SOL-A. 2) 10 seconds after that the second liquid (SOL-B) starts flowing while the first liquid stops, and 5 seconds after that SOL-C energizes while SOL-B de-energizes. 3) SOL-C is energized for 2 seconds. 4) Then the liquid stays in the tank for 2 minutes. 5) The tank is emptied by energizing SOL-D for 30 seconds.
86
6) When finished, the operation is reset waits for the START push-button to be pressed. 7) The STOP button stops the process by de-energizing all of the solenoids at once. 8) Also, if an overflow is detected, the whole system will shut down. 9) Implement the OFF-controlling method. Draw a physical ladder logic diagram (20 points) and a PLC SLC 100 ladder logic diagram (15 points) for this process. 4. Design a PLC SLC 100 ladder logic program to control two sets of traffic lights used in a typical intersection where one street (main street) is busier than the other (side street). The system starts as soon as the program is activated, and operates continuously until the program is deactivated. The intersection is equipped with four inductive non-contact sensors (use as NO switches in the PLC program). 1. Initially, the GREEN light of the main street (SN) and the RED light of the side street (EW) are ON. 2. When a vehicle on the side street triggers a sensor, the light sequence changes, providing that there are no vehicles triggering a sensor(s) on the main street. Then: a) For the main street, the YELLOW light turns ON for 3 seconds, and then the RED light turns ON for 10 seconds. b) During this period, the cars driving on the side street (EW) can go through the intersection (GREEN light ON for 7 seconds and YELLOW light on for 3 seconds). c) When finished, the system returns to the state described in step 1. Provide an I/O table, SLC 100 ladder logic diagram, and state any assumptions you made.
87
Draw a Pneumatic system and design Physical Ladder logic 1. Connect the pneumatics; draw the physical ladder logic, and a PLC SLC 100 ladder logic diagram for the system below. The system is to operate as follows: 1. When START push button is pressed cylinder 1 extends until the limit switch Sw-A is made. 2. Then, the cylinder 2 extends until the limit switch Sw-B is made. 3. After that, both cylinders retract. At the beginning, both of the cylinders are at their retracted positions. (HINT: you may use NO, NC or double-throw switches as you find fit.)
Cyl 1
Sw-A
Cyl 2
Sw-B
Sol A
Sol B
Sol C
Sol D
88
2. Design an automatic paint and stamp manufacturing line consisting of one conveyor belt actuated by an electric motor, one paint valve (spring return) actuated by one solenoid (SOL A), one pneumatic cylinder for stamping operation controlled by one spring return valve actuated by one solenoid (SOL B), and various limit switches and relays. The line is to operate as follows: - A part to be painted is placed on the conveyor, which is not moving. - After the part is placed on the conveyor, the conveyor starts and the part moves. - Then, at the stamping station, the part stops and it is stamped before it is painted. - After stamping the part moves on. - In the middle of the conveyor, the part moves through a three- foot area where it is painted. The part does not stop during the time it is being painted. - When the part reaches the end of the conveyor, the conveyor stops and the part is removed. - The process then starts all over again. - If the finished part is not removed, the new part, when placed on the conveyor, will not move. Provide: a) The physical layout of the automated paint and stamp line showing the pneumatic circuit and indicating the placement of the switches and sensors used (label all the elements); b) The physical ladder logic diagram, c) The PLC SLC 100 ladder logic diagram, and d) An explanation of the operation sequence.
89
3. Connect the pneumatics and draw the physical ladder logic for the system below. The system is to operate as follows: 1. When START push button is pressed cylinder 1 (Cyl 1) extends until limit switch Sw-A is made. 2. Then, the cylinder 3 (Cyl 3) extends until switch Sw-C is made. 3. When Sw-C is made cylinder 2 (Cyl 2) extends until switch Sw-B is made. 4. After that, all cylinders retract. 5. If Sw-B is not made within 10 seconds from the time Sw-C is made, the three cylinders will retract and an alarm will sound. Use a RESET push button to reset the alarm. When finished, the operation can be started again by pressing START push button. At the beginning all of the cylinders are at their retracted positions. (HINT: you may use NO, NC or double-throw switches, relays, time delay relays etc. as you find fit.)
Cyl 1
Sw-A
Cyl 2
Sw-B
Cyl 3
Sw-C
Sol A
Sol B
Sol C
Sol D
Sol E
Sol F
90
4. As shown below, a cubic part is to be moved between 4 stations in succession (A, B, C, and D). At each station there is a sensor activated by the part. Design a pneumatic circuit (show cylinders, valves, and pneumatic connections), and draw the physical ladder logic for the above system. The system is to operate as follows: 1. When a part is placed at the first station it activates Sw-A. 2. After a 5 second delay the part is pushed to the next station where it remains for five seconds. The process repeats and the part traces a square path until an emergency STOP pushbutton is pressed retracting all the cylinders. At the beginning all of the cylinders are at their retracted positions, and a part is not present at the first location. (HINT: you may use various cylinders, valves, NO, NC or double-throw switches, relays, time delay relays etc. as you find fit.)
Sw-A
Sw-B
Sw-D
Sw-C
91
5. Design an automatic aluminum can crusher consisting of one pneumatic cylinder, one 2 position 4 way valve actuated by two solenoids, A and B, an enclosed box with a door in which to place the can, and various limit switches and relays. The can crusher is to operate as follows: - The box door is opened and a can placed inside. - After the door is closed, the system waits for 0.5 seconds, - then, the rod of the cylinder comes down and crushes the can. - After the can is crushed, the rod of the cylinder retracts, and the crushed can can be removed. If the door of the box is opened at any time, the can crusher will stop. If an operator inserts a steel can, the cylinder will not be able to crush the can and it will sound an alarm after 1 second. The alarm is reset by opening the door. If a can is not present, the cylinder will not advance. Further improvements to this design are left to you. Explain and implement them for extra credit. Provide: a) The physical layout of the can crusher, showing the pneumatic circuit and indicating where the switches are; b) the physical ladder logic diagram; and c) an explanation of the operation of the can crusher.
92
5. Robotics
1954: Cyril Kenward (UK) introduced a first robot. 1957: First robotic patent was issued. 1961: George Devol introduced robots in the U.S. 1962: Unimation the first robotics company was created. Today: Robot manufacture and sales in the U.S. is approximately $1,000,000,000.00. Industrial robot is a general purpose, programmable manipulator designed to move material, parts, tools or specialized devices through various programmable motions in the performance of a variety of tasks. Applications: In hazardous areas For uncomfortable tasks For repetitive tasks Reasons to use robots: Robots can substitute human labor Robots are more consistent Robots can be easily reprogrammed Robots can achieve CIM
Robot Configurations
Joint (axis) provides relative motion between two parts of the robot body (links). Degree-of-freedom (DOF) represents motion around / along a single axis. Links are rigid components of a robot manipulator. There are five types of joints: Translational :
Joint motion Joint motion
Input link
Output link
L: Linear joint
O: Orthogonal joint
93
Rotational:
Output link Joint motion Joint motion Input link Output link Input link
Joint motion
T: Twisting joint
V: revolving joint
94
95
Figure 92. SCARA body-and-arm assembly WRIST CONFIGURATIONS: If two DOF then roll and pitch: TR If three DOF then roll, pitch and yaw: TRR (T= twist => roll, R = rotational => pitch, R = rotational => yaw)
Figure 93. Typical configuration of a three-degree-of-freedom wrist assembly Joint notation system: Body-and-arm: wrist Example: TRL: TR
96
Work envelope (work volume) is the space within which the robot can manipulate the end of its wrist. Speed represents absolute velocity of the end-of-arm. For large robots typical value is about 2 m/s. Stability represents the amount of the robots overshoot and oscillations. Capacity (load) represents the maximum object weight the robot can manipulate (range: 1 Kg to 900 Kg). End effector is the device attached to the robots wrist. - grippers and - tools (e.g. welding torch) Robotic Control System Classification Limited sequence control is implemented with limit switches and/or mechanical stops. It is the simplest type of control used with pneumatics pick-and-place robots. Playback with point-to-point control includes a controller with memory used to record the sequence of motions, locations, etc. Playback with continuous path control is capable of controlling the position and speed of all joints. Linear and /or circular interpolation between points is possible. Implementation is often performed through servo-control with feedback. Intelligent control gives the appearance of robot intelligence. The robot can Interact with its environment, Make decisions when errors occur, Make computations during the motion cycle, and Respond to advanced sensory inputs.
97
Programming
Program defines a path in space to be followed by the manipulator and combined with actions supporting the work cycle. Types: Leadthrough: 1. Powered leadthrough uses a teach pendant/joystick. It is usually used with point-to-point robots. 2. Manual leadthrough allows an operator to physically grasp the tool and move it through the desired sequence. It is usually used with continuous path robots. Textual Programming Language 1. Uses analog/digital I/Os 2. Can control external equipment 3. Can communicate with other systems 4. Uses logic beyond the leadthrough methods 5. Performs computations and processing similar to computer languages. Simulation and Off-line Programming 1. Programs can be prepared at a remote computer. 2. Uses graphical simulations (ex. 3D model of a robotic cell)
98
ROLL
PITCH YAW
99
These independent motions are referred to as degrees of freedom , and six are required to reach an arbitrary point at an arbitrary orientation. The human arm has exactly six, two in the shoulder, one in the elbow, and three in the wrist. Consequently, even without moving the torso, people can point their hands in any direction, at any point. One comment needs to be made with regard to the statement that six degrees of freedom provide complete flexibility. Its true only if complete freedom of motion is available for each joint. In general, this is not the case. For example, the yaw capability of the human wrist is only about 60 degrees. Hence there are some orientation/position combinations that are impossible for humans. The same will be true for robots. Six degrees of freedom required six actuators, and these are generally independent motors. However, because a robot has six motors does not mean that it has six degrees of freedom. For example, finger open/close is not considered a degree of freedom since it does not help position the robot. In this chapter, we will examine a method for representing position and orientation of a point in space and relate that representation to robot motions.
100
The grasp points are specified relative to a coordinate system defined on the part. But the location of the part itself (and, hence, its coordinate system) is a variable, known at any instant in time relative to some other coordinate system. Thus, we must learn how to solve the following problem: Problem: Given a location, A, which is known in a coordinate system, B, and given that the location of the coordinate system B is known in another coordinate system C, find the location of the point A as measured in coordinate system C (Figure 95)
ZB A B XB YB
YC
Figure 95. Coordinate system B is displaced and rotated from system C. A is known in B. Where is A in C? Solution: To see this most clearly, let us temporarily ignore the complication due to rotation and consider only displacements. In this case, the coordinate axes of B are parallel to C, and A becomes a single point. Thus, A may be described by a vector
A
B
xA ,
yA,
zA
(1)
The superscript on the left is used to denote that this variable is measured with respect to the coordinate system named B. furthermore, the origin of coordinate system B is known relative to C:
B
C
xB ,
yB ,
zB
(2)
101
(The transpose notation is used since these vectors should be written as column vectors, but for typographical convenience, we use row vector notation.) Then A, relative to C, is
C
A
C
B
B
(3)
xA ,
C
xB
yB
yA,
zB
zA
(4)
Thus, vector addition provides the solution to such problems, provided there is no rotation. As we add this notation the possibility of rotation, we need to define the concept of a frame. A frame is a representation for a coordinate system so that the representation includes the possibility that the coordinate system may be displaced (translated) and/or rotated with respect to another coordinate system. It must be emphasized that the concept of a frame is not meaningful in itself, but only as it may be related to another coordinate system (frame). It is quite literally a frame of reference. That other coordinate system may be explicitly defined, as was B in the preceding example, or it may be implicit, perhaps some universe frame that acts as a global origin for all elements under consideration. Before we can relate points relative to different coordinate systems in full generality, we need to learn what happened to a point when it is both rotated and translated relative to a fixed coordinate system.
Rotation
Given a point Ax ,
Ay , Az
T
find a new point x' , y' , z' that results from rotating the point about the z axis of A through an angle , by multiplying by a rotation matrix.
cos sin 0
sin cos 0
0 0 1
Ax Ay Az
(5)
102
Example: Rotation Find the result of rotating the point [7, 2, 5]T through 90 in the positive direction about the z-axis. Solution: substitute into equation 5
2 7 5
cos sin 0
sin cos 0
0 0 1
7 2 5
We can likewise define 3 3 matrices representing rotation about the x and y-axes. However, before doing so, we introduce the following coordinate notation.
Homogeneous Coordinates
We need to describe a generalized transformation by a single matrix that combines the effects of translation and rotation. To accomplish this, we first augment the definition of a vector by adding a 1.
x V y z 1
(6)
We then redefine the rotation matrices, making them 4 4, by adding a row and a column:
1 Rot ( x, )
0 0 0 1 0 0 0 1
(7)
Rot ( y, )
0 sin 0
(8)
103
sin cos 0
0 0 0 0 1 0
(9)
0 0 0 1 Finally, we can combine the effects of translation and rotation by placing the displacement vector in the fourth column: 1 0 0 a Trans (a, b, c) 0 1 0 b 0 0 1 c 0 0 0 1
(10)
We see that matrix multiplication using Trans (a, b, c) is equivalent to addition of a 3vector:
a b c
and
a d b e c 1 f
d e f
a d b e c f
(11)
1 0 0 a 0 1 0 b 0 0 1 c 0 0 0 1
d e f 1
(12)
The combination of rotations and translations can likewise be accomplished by a matrix multiplication. Example: Combined Motions Find the result of acting on a point A=[a, b, c]T by 1. A rotation of 90 about the z-axis, followed by 2. A rotation of 90 about the x-axis, followed by 3. A translation of [d, e, f] T . Solution
104
1 0 0 d 0 1 0 0 0 1 0 0 0 e f 1
1 0 0 0 0 1 0 0 1 0
0 0 0 0 0 0
0 0 1 d f 1
0 1 0 0 b a c 1
1 0 0 0 0 0 0 0 1 0 0 1
a b c 1
1 0
0 0 0 1 0 0
1 e
b d c e a f 1 In the previous example, we made use of the fact that matrix multiplication is associative by
combining the first two matrices into a single matrix by multiplying them together. This can be done in general, allowing us to define a single matrix, which is a homogeneous transform. Again, using the previous example, the transform matrix is:
Trans (d , e, f )
Rot ( x,90)
Rot ( z,90)
1 0 0 d 0 1 0 0 0 1 0 0 0 e f 1
1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 0
0 0 1 d f 1
0 1 0 0
1 0 0 0 0 0 0 0 1 0 0 1
1 0
1 e
105
We must emphasize the right-to- left nature of the operations in this example. The rotation about z occurs before the rotation about x, which occurs before the translation. We also remind the reader that matrix multiplication is not commutative and that neither are rotations. Specifically, Rot (x, ) Rot (y, ) Rot (y, ) Rot (x, ) in general.
Roll( z) = rotate Pitch( y ) = rotate Yaw( x ) = rotate Thus, we may define a combination of these as RPY (
z, y, x)
= Rot(z,
z)
Rot(y,
y)
Rot(x,
x)
In expanding this, we abbreviate cos by c and sin by s, in order to write the result completely:
RPY ( z,
, x) c zc y c zs ys x s zc s zc y s xs ys x c zc s y c ys x
y
z x
c s
s yc zs ys c yc
z
x x x
s zc c zs
z x
0 0 0 1
(13)
Finally, we may, if we wish, replace the zeros in the fourth column with a, b, c to include the effects of translation and, therefore, have a complete transformation matrix, including three rotations and three translations.
Coordinate Frames
We will often use transformation matrices to describe the location of one coordinate system relative to another. When used in this way, we will refer to such a system as a coordinate frame. Use of a transformation to describe a coordinate system is meaningful only when it is
106
stated as relative t another frame. With such an interpretation, the origin of the second frame may be found as the transformation of the point [0 0 0 1]T . A unit vector in the x direction in the new system is the transformation of the point [1 0 0 1] T . Similarly, unit vectors in the y and z directions of the new system are transformations of [0 1 0 1] T and [0 0 1 1]T , respectively. Example: Coordinate Frames Find the origin and coordinate directions of a frame resulting from a rotation of 90 about the z axis, followed by a displacement of [1, 7, 3]T , as shown in Figure 96. Solution: the origin of the new system is found by transforming [0 0 0 1]T
1 7 3 1 0 1 0 0 1 0 1 0 0 0 0 7 1 3 0 1 0 0 0 1
the origin of the new coordinate system is thus at [1, 7, 3]T in the old system. A unit vector in the x direction in the new system is.
1 8 3 0 1 0 1 0 1 0 0 0 7 1 3 1 0 0
1 0 0 0 1 1 Similarly, we find that a unit vector in the y direction transforms to [ 0, 7, 3, 1] and that a unit
In this example the coordinate frame is defined by the transform consisting of a rotation of 90 about the z-axis. The locations of the transformed unit vectors are indicated by stars, and their directions with respect to the transformed origin define the transformed coordinate directions. Let us assume that the original frame in Figure 96 is named R. (We will often use this term to represent the coordinate system whose origin is not the base of the manipulator.) Now, given
107
P by
P=
P,
where R T H is the transformation matrix, just given, which relates frames H and R.
0
R
1 0 1 0 0 0 0 7 1 3 0 1
2 2 0 1
1 9 3 1
P=
1 0 0
Z* Y* P
X*
X
Figure 96. The coordinate frame defined by the transform consisting of a rotation of 90 about the z axis. The location of the transformed unit vectors are indicated by stars and their directions with respect to the transformed origin define the transformed coordinate directions. We can now see how the concept of coordinate frames relates to robotics. H P defines a point on the hand of the robot (perhaps the tip of a tool) which is known relative to the hand frame H. the location of the hand is known relative to the base frame R, by the transformation matrix R T H . Thus we are able to find the location of the tool tip in base coordinates. We extend this concept somewhat further now to show its full usefulness with another example. Consider the situation shown in Figure 97. The robot is holding a drill and drilling a hole in a part. This is the desired state; we must solve a problem to find the conditions, which will
108
make it true. The base of the robot is the origin of a frame named R whose location is known relative to a universe frame U. That knowledge is embedded in the transformation
U
R,
assumed to be constant. When in the proper location, the hand position will be related to R by a transform R T H . This is initially unknown and we must solve for it. The tip of the tool is related to H by a transform
H
Thus the location of the drill bit may be related to the unive rse frame by
U
TE
TR R TH
TE
U
Figure 97. Important coordinate frames in a robot application: U, universe frame; R, robot base; H, hand; E, tool tip; P, work piece. Furthermore, the location of the hole to be drilled on the part may be related by U by
TE U TP P TE And we have two descriptions for the same point. Equating them, we have TR R TH H TE U TP P TE In virtually all robot applications, it is
U U
specifies the location of the hand with respect to the base. To solve for R TH in the preceding equation, we first post multiply by H T-1 E.
U
TR R TH
TP P TE
1 R
And premultiply by U T
R
TH
TP P TE
109
nx ox ax T ny oy ay nz oz
0 0
px py pz
1
(14)
az
0
n p a o
Figure 98. Definition of approach, a , orientation, o, and normal, n, vectors in the hand frame; p determines the location of the frame, and any two of n, o, and a are sufficient to specify its orientation. The columns of the hand frame, R T H, define three orthogonal vectors, which together specify the hand orientation (see Figure 98). These are referred to as the approach vector, which points in the direction of the wrist; the orientation vector which together with the approach vector, specifies the orientation of the hand; and the normal vector, which is orthogonal to the other two. Hence the use of a, o, and n in the definition of the hand frame. In future sections, we will use these same names for the columns of transform matrices, even though we may not be specifically referring to the hand frame. It can be shown that
nx ny nz
T -1 =
p n p o p a 1
(15)
ox oy oz ax ay az 0 0 0
110
Similarly,
p o
and,
p a
Example: Inverting Homogeneous Transforms Find the inverse of the following transformation matrix. Prove it is the inverse.
0 H 0 0
0 1 1 1 0 2 0 0 1
1 0 0 3
0 0 H
1
1 0 0 0
3 2 1 1
0 1 1 0 0 0
1 0 0 3
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
111
This method of matrix inversion is much faster than is the general method; however, it is not applicable to arbitrary 4 4 matrices but results from the peculiar nature of homogeneous transformations. One other useful property of homogeneous transforms can be derived. That is,
n o a n
a o
(19)
here ,
ax ay
n y oz ox nz
o y nz nx oz .
(20)
a z nx o y n y ox The other two equations may be similarly expanded. This fact allows us to save computer time later, since it defines one column of the T matrix in terms of the others.
R
T H tells us how to position the robot hand so that it will be properly located to drill the hole
as desired. This 4 4 matrix relates only the position and orientation of the hand in Cartesian space to the position and orientation of the robot base, again in Cartesian space. It does not tell us how to move the various joints of the robot to achieve that hand location. To accomplish that, we must study the relationship between joint angles and hand location.
112
Notation
Symbol s c Rot (x, ) Trans (d, e, f ) Meaning An arbitrary angle Shorthand for sin ( ) Shorthand for cos ( ) A 4 4-transform matrix representing a rotation of about the x-axis. A 4 4-transform matrix representing a translation of d units on the x-axis, e units on y, and f units on z. Rotation about the z axis of the hand frame (roll) Rotation about the y-axis of the hand frame (pitch). Rotation about the x axis of the hand frame (yaw) A 4 4-transform matrix representing the effect of radians of roll, radians of pitch, and radians of yaw. The hand frame The universe frame (often chosen equal to R) The robot base frame. The normal vector (1st column of R T H) The orientation vector (2nd column of R T H) The approach vector (3rd column of R T H) The position vector (4th column of R T H)
RPY (
z,
y,
x)
H U R n o a p
113
Problems
Material covered: 1. Homogeneous transforms and their applications 2. Programming of robotic tasks
Homogeneous Transforms
1.Write the homogeneous transform matrix that represents a) A rotation of 90 about z axis, followed by b) A rotation of -90 about the x axis, followed by c) A translation of [3, 7, 9]. 2. Write the homogeneous transform matrix that represents a) A translation of [3,7,9], followed by b) A rotation of 90 about the z axis, followed by c) A rotation of -90 about the x axis
3.The matrix
? ? ? ? 0 0 1 0 1 0 0 0 0 1 2 1
is known to represent a homogeneous coordinate transform. Find the elements designated by the question marks. Use homogeneous transform property. 4. Use equation 15 to find the inverse of the 0 1 0 0 1 0 0 0 matrix 0 1 1 2 . 0 0 0 1
1 0
0 1 0
1 2 0
TP
1 0
114
1 0 0 1
U
TR
0 1 0 5 0 0 1 9 0 0 0 1
we wish to put the hand on the part. That is, we wish to align the hand frame and the part frame. What is the transformation R T H that makes this happen? 6. Use the matrices given in problem 5, consider only the position of the hand. a) What is the position of the part relative to the universe frame? b) What is the position of the robot relative to the universe frame? c) Perform vector addition or subtraction (which is correct?) to find the part relative to the robot. d) Now look at columns 4 of your solution to problem 5. Did you work problem 5 correctly? 7. Find the result of acting on a point A=[1, 2, 4]T by a) A rotation of 90 about the x-axis, followed by b) A rotation of 180 about the z-axis, followed by c) A translation of [2, -1, 1] T . 8. Find the result of acting on a point A=[1, 0, 4]T by a) A translation of [0, 3, -2] T , followed by b) A rotation of 180 about the x axis, followed by c) A rotation of -90 about the z axis, followed by d) A translation of [-1, -4, 3] T .
115
Robot Programming
1. A Movemaster RV-M2 robot is used to drill a hole and cut out a hexagonal piece in 2cm thick stock. Two tools are used: a drill of length 200 mm in already stored position 301 and a plasma torch of length 250 mm in a position stored as 302. The hole to be drilled is in the center of the hexagon in a position stored as 303. The sides of the hexagon are 60 mm each. Use relative coordinates. Do not write any of the BASIC commands. The operation of the robot is as follows (Hint: some steps may require more than one command): 1) Move to nest. 2) Move to a position 100 mm above 301. 3) Make sure the gripper is open. 4) Pick up the drill. 5) Position the drill 20 mm above the hole location. 6) Wait 2 seconds. 7) Drill a through hole. 8) Return the drill to its original starting position. 9) Position the gripper 100 mm above 302. 10) Pick up the plasma torch. 11) Move the plasma torch to a position 5 mm above the first corner of the hexagon 12) Wait 2 seconds for the torch to start cutting. 13) Move the torch so it traces along the edges of the hexagon 14) When done, move the torch up 100 mm above the stock 15) Wait 2 seconds. 16) Return the torch. 17) Move the gripper 200 mm above position 302.
2. Using a Movemaster RV-M2 robot equipped with a pen, write a program to draw the words EN 473. Each letter fits in a 20 x 30- mm box, with 10 mm between letters and 20 mm between words. Use medium writing speed. Assume the starting position of the pen tip to be 20 mm above the lower left corner of the letter E. Assume the gripper is already closed. Use relative coordinates. Do not write any of the BASIC commands.
116
3. An AdeptOne SCARA robot is used in a packing operation. The parts to be packed are presented to the robot via a conveyor belt delivering parts to a known location b. The parts are to be packed in a 10 cm tall box with four compartments. The locations in the center bottom of each compartment are known ( c, d, e , f). The manipulator's task is to pick a part and place it in the box, in the correct compartment, until the box is filled. Due to limitations of other equipment's cycle time, the robot is to operate at 45 % of its full speed. Write a program using VAL-II robot programming language to accomplish the following: From its initial position the robot's gripper opens, the robot moves to the part's location and picks the part. (HINT: Final approach to the part should be vertical from a position straight above the part) 3. The robot performs a series of steps necessary to place the part in the compartment c. 4. Then, the parts are picked and placed consecutively into the remaining three compartments. 5. When the last part is placed in the box, the robot moves to its initial position. HINTS: Be careful, not to damage the box by an inappropriate approach/depart path.
117
4. Using a Movemaster RV-M2 robot equipped with a pen, write a program to draw the word HELLO. Each letter fits in a 20 x 30- mm box, with 10 mm between letters. Use medium writing speed. Assume the starting position of the pen tip to be 20 mm above the lower left corner of the letter H. Assume the gripper is already closed. Use relative coordinates. 5. In a manufacturing operation, it is required to use the continuous arc welding process to join a circular plate and a square plate (100 mm x 100 mm), as shown below. A Movemaster RV-M2 is used for this operation. Write a robotic program to weld these parts continuously. The robot is to perform the following set of operations: 1. From its nesting position, the robot moves the welding tool to a position 200 mm above the first corner. 2. Robot lowers the tool to touch the two parts at position 501. 3. Robot makes a weld in a counter-clock direction 4. When done, the robot moves the tool to a position 200 mm above the first corner. 5. The robot waits 5 seconds 6. Steps 2 through 5 are repeated continuously.
x 501 y
118
6. An AdeptOne SCARA robot is used to partially populate a printed circuit board (PCB). The parts used are two different types of relays. They are presented to the robot via two magazines at known locations (a and b). The relays are 5 cm tall and must be inserted vertically into their respective positions on the PCB (positions c and d). Due to limitations of other equipment's cycle time, the robot is to operate at 85 % of its full speed. Write a program using VAL-II robot programming language to accomplish the following: 1) From its initial position the robot's gripper opens, the robot moves to the first relay's location (a) and picks it up. (HINT: Final approach to the relay should be vertical from a position straight above the relay) 2) The robot performs a series of steps necessary to place the relay in the location c on the PCB. 3) Then, the robot performs a series of steps necessary to pick and place the second relay from its position b to the position d on the PCB. 4) When done, the robot moves to its initial position. HINTS: Be careful, not to damage the relay by an inappropriate approach/depart path.
a b
c P C B
119
120
Components :
Part Program Mahine Control Unit
Processing Equipment
Figure 102. CNC machine components TARGET point is the point to which the tool is manually moved. Origin represents zero point.
Control Systems:
Point-to-point: drilling (move the worktable to a programmed location disregarding the path Continuous path: These systems are capable of continuous simultaneous control of two or more axes: Contouring (all 3 axes) Straight-cut: parallel to only one of the axis of the worktable Inte rpolation Methods : Linear: programmer specifies beginning / end points of the straight line and feed rate (interpolator computes feed rates for each axis) Circular: Programmer specifies - start point - end point - radius (or center) - direction of cutter Interpolator generates a series of small straight line segments. Limitation: path is in a plane defined by two axes of the CNC system. Helical: Like circular but one more axis is added (e.g. threads) Parabolic (Cubic): Provides approximations of free form curves using higher order equations. CNC Software: Operating System (ROM or MCU): Interprets NC part programs, generates control signals driving the machine tool axis; -Consists of 3 parts: 1. Editor 2. Control program: decodes part program 3. Executive program: manages execution of CNC software and performs I/O operations
121
Machine Interface Software: Operates communication link between the CPU and the machine tool for CNC auxiliary functions. It is sometimes implemented via PLC interfaced to MCU (often ladder logic diagram) Application Software: NC Part Programs: - G & M Codes - APT (Automated Programming Tool) - CAD/CAM (e.g. MASTERCAM) (Uses preprocessors to generate G&M codes)
fr
Depth of cut represents the distance the tool penetrates below the original surface of the work (mm).
122
Manual (G & M Code) Program 1. Program setup phase contains all the instructions that prepare the machine for operation. % program start flag xxxx program number Nxxxx line (block) number ex: (N1 G90 G20 where G90 = absolute coordinates, and G20 = dimensions in inches) N2 M03 S1200 2. Material removal phase contains the actual cutting feed moves, rapid moves, canned cycles etc. 3. System shutdown phase contains all the G- and M-codes that turn off all the options that were turned on in the setup phase. Example: N20 M05 Turns the spindle off N21 M30 End of program Block order:
NGXYZFTSM
123
Block Format
Block format is often more important than program format. It is vital that each block of CNC code be entered into the CPU correctly. Each block comprises different components, which can produce tool moves on the machine. Following is an example block of CNC code. N135 G01 X1.0 N135 G01 Y1.0 Z0.125 F5
F5
Table 12. Example CNC code explanation Block number Shows the current CNC block number G-Code Tells the machine what it is to do, in this case, a Linear Feed move Coordinate Gives the machine an end point for its move. X designates an X-axis coordinate, Y a Y-axis coordinate, and Z a Z-axis coordinate. Special function Contains any special function or related parameter. In this case, a feed rate of 5 in/min is programmed.
There are some simple restrictions on CNC blocks, as follows: Each may contain only one tool move. Each may contain any number of non-tool move G-codes, provided they do not conflict between each other (e.g., G42 and G43). Each may contain only one feedrate per block. The block numbers should be sequential. Both the program start flag and the program number must be independent of all other commands. The data within a block should follow the sequence shown in the above sample block.
124
G41 R Compensation offset left. Cutter radius must be specified G42 G43 G44 G49 Compensation offset right. Cutter radius must be specified Tool length compensation (Plus) Tool length compensation (Minus) Tool length compensation cancel
G50 c Specify location of coordinate axis system origin with respect to starting location of cutting tool 125
Inch Units Metric Units Cancel canned cycles Drilling cycle Counter boring cycle Deep Hole Drilling cycle Absolute positioning Incremental positioning
G92 c Specify location of coordinate axis system origin with respect to starting location of cutting tool. Some machines use G50. G94 G95 G98 G99 Specify feed per minute in milling and drilling Specify feed per revolution in milling and drilling Set initial plane default / Specify feed per minute in turning Return to retract (rapid) plane / Specify feed per revolution in turning
Note: The lower case "c" to the right of the codes are the coordinates needed and are as follows: Table devices such as milling machines EDM machines: Xn Yn In Jn G90 X0.0 Y0.0 G01 X0.0 Y0.125 G03 X-0.375 Y0.5 I-0.375 J0.0 G01 X-0.75 Y0.5 M02 % Cylindrical devices such as lathes and cylindrical grinders: Xn Zn In Kn G90 X0.0 Z0.0 G01 X0.25 Z0.0 G03 X1.0 Z-0.375 I0.0 K-0.375 G01 X1.0 Z-0.75 M02 %
126
M14
127
Fn
Sn
Tn
Dn
R Px
Note: The lower case "n" to the right of the codes is a number value. Some codes are not used or are handled differently because of the varied applications and uses of the machine.
128
Examples
1. CNC Example: Drilling This example presents the CNC part program in word address format for drilling the three holes in the sample part shown in Figure 103. We assume that the outside edges of the starting workpart have been rough cut (by jig sawing) and are slightly oversized for subsequent profile milling. The three holes to be drilled in this example will be used to locate and fixture the part for profile milling in the following example. For the present drilling sequence, the part is gripped in place so that its top surface is 40 mm above the surface of the machine tool table to provide ample clearance beneath the part for hole frilling. We will define x, y-, and z- axes as shown in Figure 104. A 7.0-mm diameter drill, corresponding to the specified hole size, has been chucked in the CNC drill press. The drill will be operated at a feed of 0.05 mm/rev and a spindle speed of 1000 rev/min (corresponding to a surface speed of about 0.37 m/sec, which is slow for the aluminum work material). At the beginning of the job, the drill point will be positioned at a target point located at x=0, y=-50, and z= +10 (axis units are millimeters). The program begins with the tool positioned at this target point.
10
Figure 103. Sample part to illustrate CNC part programming. Dimensions are in millimeters general tolerance = 0.1 mm. Work material is a machinable grade of aluminum. 129
NC Part Program Code N001 G21 G90 G92 X0 Y-050.0 Z010.0; N002 G00 X070.0 Y030.0; N003 G01 G95 Z-15.0 F0.05 S1000 M03; N004 G01 Z010; N005 G00 Y060.0; N006 G01 G95 Z-015.0 F0.05; N007 G01 Z010.0; N008 G00 Z120.0 Y030.0; N009 G01 G95 Z-015.0 F0.05; N010 G01 Z010.0; N011 G00 X0 Y-050.0 M05; N012 M30;
Comments Define origin of axes Rapid move to first hole location. Drill first hole. Retract drill from hole. Rapid move to second hole location. Drill second hole. Retract drill from hole. Rapid move to third hole location. Drill third hole. Retract drill from hole. Rapid move to target point. End of program, stop machine.
2. CNC Example: Milling The three holes drilled in the previous example can be used for locating and holding the workpart to completely mill the outside edges without re- fixturing. The axis coordinates are shown in Figure 103 (same coordinates as in the previous drilling example). The part is fixtured so that its top surface is 40 mm above the surface of the machine tool table. Thus, the origin of the axis system will be 40 mm above the table s urface. A 20- mm diameter end mil with four teeth will be used. The cutter has a side tooth engagement length of 40 mm. Throughout the machining sequence, the bottom tip of the cutter will be positioned 25 mm below the part top surface, which corresponds to z = -25 mm. Since the part is 10 mm thick, this z-position will allow the side cutting edges of the milling cutter to cut the full thickness of the part during profile milling. The cutter will be operated at a spindle speed = 1000 rev/min (which corresponds to a surface speed of
130
about 1.0 m/sec) and a fed rate = 50 mm/min (which corresponds to 0.20 mm/tooth). The tool path to be followed by the cutter is shown in Figure 105, with numbering that corresponds to the sequence number in the program. Cutter diameter data has been manually entered into offset register 05. At the beginning of the job, the cutter will be positioned so that its center tip is at a target point located at x = 0, y = -50, and z = +10. the program begins with the tool positioned at this location.
50
X (B)
Figure 104. Sample part aligned relative to (A) x- and y-axes and (B) z-axis. Coordinates are given for significant part features in (A)
131
Y N007
N006
N005
N008
N010
N001,N002
Figure 105. Miller cutter path NC Part Program Code N001 G21 G90 G92 X0 Y-050.0 Z010.0; N002 G00 Z-025.0 S1000 M03; N003 G01 G94 G42 Y0 D05 F50; N004 G01 X160.0; N005 G01 Y060.0; N006 G17 G03 X130.0 Y090.0 R030.0; N007 G01 X035.0; N008 G01 X0 Y0; N009 G40 G00 X-040.0 M05; N010 G00 X0 Y-050.0; N011 M30; Comments Define origin of axes Rapid to cutter depth, turn spindle on Engage part, start cutter offset. Mill lower part edge. Mill right straight edge. Circular interpolation around arc. Mill upper part edge. Mill left part edge. Rapid exit from part, cancel offset. Rapid move to target point. End of program, stop machine.
132
Problems
1. The part in Figure 106 is to be drilled on a turret-type drill press. The part is 15.0 mm thick. There are three drill sizes to be used: 8 mm, 10 mm and 12 mm. These drills are to be specified in the part program by tool turret positions T01, T02, and T03. all tooling is high speed steel. Cutting speed = 75 m/min and feed = 0.08 mm/rev. Use the lower left corner of the part as the origin in the x- y axis system. Write the part program in the Word address format with TAB separation and variable word order (G- and M- codes). Use absolute positioning. The program style should be similar to the previous drilling example.
125 25 12 dia., 1 hole 10 dia., 2 holes
133
2. Perform necessary calculations and write the complete part program (G- and Mcodes) to perform the drilling operations for the part drawing given below. All dimensions are in millimeters. The part is 10 mm thick. All three holes are 8 mm in diameter. Cutting speed = 0.5 m/sec, feed = 0.20 mm/rev, and table travel speed between holes = 500 mm/min. Use the lower left corner of the part as the origin in the x-y axis system. State the assumptions you make.
15
10
10
60
20
10 R
8 dia., 3 holes
40
20
40 60
10 R
134
3. The outline of the part given in the previous problem is to be profile milled, using a 16-mm diameter end mill with four teeth. The part is 10 mm thick. Cutting speed = 100 m/min and feed = 0.10 mm/tooth. Use the lower left corner of the part as the origin in the x-y axis system. The three holes in the part have been drilled in previous problem and will be used for clamping the part during milling. Perform necessary calculations and write the part program in the word address format with TAB separation and variable work order (G- and M-codes). Use absolute positioning. State the assumptions you make.
135
4. Perform all necessary calculations and write a complete part program (G- and Mcodes) to perform only the drilling operations for the part drawing given below. All dimensions are in millimeters. The part is 3 mm thick. All four holes are 10 mm in diameter. Cutting speed = 0.5 m/sec, feed = 0.10 mm/rev, and the table travel speed between holes = 600 mm/min. Use the lower left corner of the part (as indicated in figure below) as the origin in the x-y axis system. State the assumptions you make.
10 dia., 4 holes
20 R
100
28 R 20 32 40 20 R (0,0) 20
160
136
22
24
5. The outline of the part given in the previous problem is to be profile milled, using an 8-mm diameter end mill with two teeth. Also, the internal feature is to be milled. The part is 3 mm thick. Cutting speed = 110 m/min and feed = 0.10 mm/tooth. Use the lower left corner of the part (indicated in the drawing from previous problem) as the origin in the x-y axis system. The four holes in the part have been drilled in previous problem. Two of them will be used for clamping the part during milling. Perform all necessary calculations and write the part program in the word address format (G- and M-codes) with TAB separation and variable work order. Use absolute positioning. State the assumptions you make. 6. Perform all necessary calculations and write the part program in the word address format with TAB separation and variable work order (G- and M-codes) to perform the drilling operations for the part drawing given below. All dimensions are in millimeters. The part is 3 mm thick. The four outer holes are 10 mm in diameter, while the center hole is 12 mm in diameter. Cutting speed = 0.5 m/sec, feed = 0.10 mm/rev, and the table travel speed between holes = 800 mm/min. Use the lower left corner of the part (as indicated in figure below) as the origin in the x-y axis system. State the assumptions you make.
20
120
20
(0,0)
20 140
137
10
7. The outline of the part given in the previous problem is to be profile milled, using an 8-mm diameter end mill with two teeth. The part is 3 mm thick. Cutting speed = 110 m/min and feed = 0.10 mm/tooth. Use the lower left corner of the part (indicated in the drawing from previous problem) as the origin in the x-y axis system. The five holes in the part have been drilled in previous problem. Two of them will be used for clamping the part during the milling operation. Perform all necessary calculations and write the part program in the word address format with TAB separation and variable work order (G- and M-codes). Use absolute positioning. State the assumptions you make.
138
139
Figure 110. Vibratory bowl feeder 3. Selector (passive tooling) is a device acting as a filter permits only parts in the correct orientation to pass through. and/or Orientor (active tooling) is a device allowing properly oriented parts to pass through, while the others are re-oriented into the proper orientation. Figure 95 depicts some typical examples of selectors used with VBFs. 4. Feed track is a device used to move the correctly oriented components from feeder to the location of the assembly workhead. Types: Gravity fed feeder elevated with respect to the workhead. Powered vibration, air pressure etc. forces the parts to travel along the feed track 5. Escapement device : removes components from the feed track according to the cycle time of the assembly workhead or Place ment device: places the component in the correct location at the workstation for the assembly operation (See Figure 96)
140
Wiper
Pressure Break
141
WIPER
BOWL TRACK
142
selector
Lf1 escapement and placement unit work carrier Figure 113. Parts delivery subsystem
For the system shown in Figure 113 the following variables are defined: f = hopper rate [parts/min] = proportion of components correctly oriented that pass through the selector/orientor (probability of a part to be in a correct orientation) 1 = proportion of parts returned to hopper Rc = cycle rate of the assembly machine = rate at which the parts leave the feed track Tc = cycle time for the assembly machine
Rc 1 Tc
f f
Rc to make sure that the delivery system is not the bottleneck of the operation Rc
Lc = length of parts in the feed track Lf1 = location of low level sensor Lf2 = location of high level sensor
nf 2
Lf 2
where nf2 is the number of parts that can be held in the feed track (capacity of Lc the feed track) where nf1 is the minimum number of parts in the feed track.
nf1
Lf1 Lc
143
Example : Given cycle time of 6 seconds, hopper rate 50 parts/min, proportion of correctly oriented parts passing through the selector 0.25, the minimum number of parts in the feed track 6 parts and the capacity of the feed track of 18 parts find: a) How long will it take for the supply of parts to go from 18 to 6 parts if the feeder is turned off? b) How long will it take in an average for the supply of parts to go from 6 to 18 after turning the feeder on? Solution: a) Tc
0.1 min Rc
1 / Tc 10 parts Tn f 2 min
nf 2
nf1
nf1 Rc
18 6 10
1.2min
b) Tn f 1
nf 2
nf 2
nf1 Rc
18 6 50 0.25 10
18 6 2.5
4.8 min
144
Asby Aut
Asby Aut
Asby Aut
Asby Aut
Asby Aut
Asby Aut
Completed Assemblies
Sta 1
Sta 2
Sta 3
Sta n-1
Sta n-2
Sta n
A A sb y ut
Asby Aut
Asby Aut
Asby Aut
Completed assemblies
145
A Au sby t
Components added at stations Starting base parts Asby Aut Asby Aut Asby Aut Asby Aut Asby Aut
A Au sby t
Asby Aut
Asby Aut
Asby Aut
Asby Aut
y sb A ut A
Asby Aut
Starting base parts
Figure 117. Single station assembly system
Completed assemblies
146
Parts
Vertical delivery
Feed track
Horizontal delivery
Figure 118. (a)Horizontal Escapement Device and (b) Vertical Placement Device
Feed track
Work carriers
(c )
Figure 119. Escapement of Rivet-shaped Parts
147
Problems
1. A feeder-selector device at one of the stations of an automated assembly machine has a feed rate f = 32 parts/min and provides a throughput of one part in four ( = 0.25). The ideal cycle time of the assembly machine is 10 sec. The low level sensor on the feed track is set at 10 parts, and the high level sensor is set at 20 parts. (a) How long will it take for the supply of parts to be depleted from the high level sensor to the low level sensor once the feeder-selector device is turned off? (b) How long will it take for the parts to be re-supplied from the low level sensor to the high level sensor, on average, after the feeder-selector device is turned on? (c) What proportion of the time that the assembly machine is operating will the feeder-selector device be turned on? (d) What proportion of the time that the assembly machine is operating will the feeder-selector device be turned off?
2.
A feeder-selector device at one of the stations of an automated assembly machine has a feed rate f = 60 parts/min and provides a throughput of one part in five. The ideal cycle time of the assembly machine is 10 sec. The low level sensor on the feed track is set at 15 parts, and the high level sensor is set at 35 parts. (e) How long will it take for the supply of parts to be depleted from the high level sensor to the low level sensor once the feeder-selector device is turned off? (f) How long will it take for the parts to be re-supplied from the low level sensor to the high level sensor, on average, after the feeder-selector device is turned on? (g) What proportion of the time that the assembly machine is operating will the feeder-selector device be turned on? (h) What proportion of the time that the assembly machine is operating will the feeder-selector device be turned off?
148
CIM. See computer- integrated manufacturing Computer Aided Design/Computer Aided Manufacturing. See Computer
149
References
1 Groover, M . P., Automation, Production Systems, and Computer-Integrated Manufacturing, 2nd Edition , Prentice Hall, 2001. 2 Kapp , K., M., The USA Princip le, APICS The Performance Advantage, pp 62-66, June 1997. 3 Users Manual, Bulleting 1745 SLC Programmable Controllers , Allen-Bradley Co., Publication 1745800, November 1987. 4 Snyder, W. E., Industrial Robots: Computer Interfacing and Control , Prentice-Hall, 1985.
150