Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
CHAPTER 3 :
PLC & ROBOT PROGRAMMING
By
Aziz Mamat
Aspalila Awang
Mechanical Department
Politeknik Kota Bharu
INTRODUCTION
PLC & ROBOT PROGRAMMING
Number System
Binary Number
Octal Number
Decimal Number
Hexidecimal Number
Binary Coded Decimal (BCD) Number
NUMBER EXAMPLES
Bil Binary
(Asas 2)
Octal
(Asas 8)
Decimal
(Asas 10)
Hexidecimal
(Asas 16)
BCD
0 0 0 0 0 0000
1 1 1 1 1 0001
2 10 2 2 2 0010
3 11 3 3 3 0011
4 100 4 4 4 0100
5 101 5 5 5 0101
6 110 6 6 6 0110
7 111 7 7 7 0111
8 1000 10 8 8 1000
9 1001 11 9 9 1001
10 1010 12 10 A 0001 0000
11 1011 13 11 B 0001 0001
12 1100 14 12 C 0001 0010
13 1101 15 13 D 0001 0011
14 1110 16 14 E 0001 0100
15 1111 17 15 F 0001 0101
16 10000 20 16 10 0001 0110
17 10001 21 17 11 0001 0111
18 10010 22 18 12 0001 1000
19 10011 23 19 13 0001 1001
20 10100 24 20 14 0010 0000
BINARY NUMBER
25 24 23 22 21 20
32 16 8 4 2 1
25 24 23 22 21 20
Example :
110102 = (1 x 24) + (1 x 23) + (0 x 22) + (1 x 21) + (0 x 20)
= 16 + 8 + 0 + 2 + 0
= 2610
Convert Binary number to Decimal number
BINARY NUMBER
Convert Decimal number to Binary number
2610
OCTAL NUMBER
Convert Octal number to Decimal number
85 84 83 82 81 80
85 84 83 82 81 80
32768 4096 512 64 8 1
Example :
110508 =(1 x 84) + (1 x 83) + (0 x 82) + (5 x 81) + (0 x 80)
= 4096 + 512 + 0 + 40 + 0
= 464810
BCD NUMBER (BINARY CODED DECIMAL)
Decimal BCD
D C B A
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
BCD Base number 8 4 2 1
EXAMPLES OF BCD & DECIMAL CONVERSION
Examples:-
a) Decimal 16010 = BCD Number ?
Decimal 1 6 0
BCD 0001 0110 0000
b) Convert BCD 0100 0101 0000 to decimal number.
BCD 0100 0101 0000
Decimal 4 5 0
HEXADECIMAL NUMBER
165 164 163 162 161 160
No Hexadecimal Decimal BCD Binary
0000 0 0000 0
000A 10 0001 0000 1010
0022 34 0011 0100 100010
002A 672 0110 0111 0010 1010100000
FFFF 65535 0110 0101 0101 0011 0101 1111111111111111
Conversion Hexadecimal Number to Decimal, BCD and Binary Numbers
Hexadecimal Number Base
DIGITAL AND ANALOG SYSTEM
Digital System
Digital signal is a pulse or a series of voltage levels varying discret (separated or not continuous), stepped or increased. Two-speed switching characteristics of the level of 'on-off' or top-down, give the impression all digital signal.
EXAMPLES OF DIGITAL SIGNAL
+V
- V
Time
Voltan
0
+ V
- V
TimeVolt a
n
0
Diagram C1 (a) Square Wave.
Diagram C1 (b) Positive Rectangular Wave
EXAMPLES OF DIGITAL SIGNAL
-
V
+V
TimeVo
lta
ge
0
-
V
Voltage
+ V
Time
0
Diagram C1 (c) Negative Square Wave signal
Diagram C1 (d) Digited analog signal.
Analog System
Analog signal is AC or DC currents that vary smoothly and continuously for a certain time. It does not change significantly or stairs. Electronic circuits that produce these signals are called analog circuit.
ANALOG SIGNAL EXAMPLES
+ V
- V
TimeVoltage
0
- V
+ V
TimeVoltage
0
Diagram C2 (a) Sine Wave
Diagram C2 (b) Positive D.C. Voltage
ANALOG SIGNAL EXAMPLES
Diagram C2 (c) Negative Variable D.C. Voltage
+ V
Time
Voltage 0
-V
Diagram C2 (d) Random A.C. Voltage
+ V
Time
Vo
lta
ge
0
-V
COMPARISON
ANALOG AND DIGITAL SYSTEMNo Digital Signal Analog System
1. Processing data or information by calculating or counting. Processing information or data by measuring and
measuring.
2. The data obtained in the form of discrete data or unit volume. The data obtained are constantly changing and
continuously as signal noise and movement.
3. Discrete data are represented by numbers, letters, alphabet,
symbols, and the reading is constant. As an example of discrete
data is a set of binary digits using the number zero (0) or one (1).
If the graph is drawn in a rectangular wave shape of the graph.
Digital data is in the form of graphs or signal patterns
often change in a row. If the graph is drawn in the form of
sine wave graph.
4. The main circuit is the logic gates. The main circuit is operating amplifier (Op-amp).
5. It has a higher accuracy. It has a lower accuracy.
6. Digital signal is less affected by interference effects. For
example, the effect of noise in the sound recording can be
reduced with digitally re-recorded on compact disc (CD).
Analog signals tend to be influenced by interference
effects.
7. Digital systems require analog signal processing requires analog
to digital converter (ADC).
Digital signal can be converted back to analog signals
using digital to analog converter (DAC).
8.
Suitable for use in business and commerce for handling a
number of efficient and discrete data.
Control processes that depend on physical conditions such
as temperature, pressure, level and flow rate. Very suitable
to be used to analyze the system requires continuous
measurement and control.
Examples of digital systems is the calculator. Examples of devices that use an analog system is a 'Virtual
Reality’ and analog computers used in processing
petroleum.
CONVENSIONAL CONTROL SYSTEM, ELECTRONIC AND LOGIC COMMAND SET
CONVENSIONAL CONTROL SYSTEM - Hardwired
control
ELECTRONIC CONTROL SYSTEM - minicomputer
control
LOGIC COMMAND SET CONTROL SYSTEM -
Micro processing control
COMPARISON OF METHODS OF HARDWIRED, MINICOMPUTERS AND MICRO -
PROCESSING CONTROL TO COST, FLEXIBILITY AND RELIABILITY.
Control Method Cost Flexibility Reliability
Hard Wire high
Large size and its
design is not
economically
Low compared to other
methods.
Requires a mechanical stop
to control the robot
movement
Need more cable to run
Low-depending on the design and
method of making the
Lower reliability because they can not
detect its own damage
No resistance to high temperatures
programmed
Mini Computer Highest because it
involves complex
equipment
Best Higher
Micro-Processing High but lower than the
minicomputers
Good Moderate compared with
minicomputers
INTEREST IN THE SYSTEM AUTOMATED
REPEATABILITY
Improve the quality of a product. - high repeatability will allow the installation of components on the right products and installation errors can be reduced. Quality of products is easily controlled and maintained.
Accuracy is very important for repeatability and large quantity of work. Repeatability would be tiring the operator - will affect the quality of the product. With the characteristics of repeatability, operators do not need to repeat the work and only control the machine can operate automatically.
Increase the productivity rate (units / time) because of the repeatability feature, the robot can work automatically and continuously without precise control.
Perform the critical work such as wire bonding process and die attach process. Technicians only teach the robot to work once and the robot can be taught to repeat the work exactly.
The number of operators can be reduced because an operator can control several machines simultaneously, thereby reducing overhead costs such as wages and management costs.
Reduce waste due to high repeatability will reduce the reject rate. With this raw material costs can be reduced.
QUIZ
State three methods of control in agriculture
automation systems.
List five the importance of repeatability in
automated systems.
BASIC IN ROBOT PROGRAMMING
Teach pendant programming
Direct (ON-Line) programming
Computer programming
On-line programming
Off-line programming
TEACH PENDANT PROGRAMMING
COMPUTER PROGRAMMING
Bil Program
1 Operation HOME position
2 GOTO P2 SPEED 80%
3 GOTO P3
4 GRIPPER OPEN
5 GOTO P4 SPEED 20%
6 GRIPPER CLOSED
7 GOTO P3
8 GOTO P5 SPEED 60%
9 GOTO P6 SPEED 20%
10 GRIPPER OPEN
11 GOTO P5
12 GRIPPER CLOSED
13 GOTO P7
14 GOTO P1 SPEED 80%
15 END
Figure 3c Robot motion path and coordinates
Operation HOME position
(P1) (70,70,70)
P2 (50,46,50) P3 (45,30,50)
P4 (45,30,15)
P5 (40,42,50)
P7 (45,47,60)
P6(40,42,20)
BASIC IN PLC PROGRAMMING
Definition of Programmable Logic Controller (PLC)
According to NEMA (National Electrical Manufacturer Association, U.S.), Programmable Logic Controller (PLC) is defined as a system operating on digital electronics, designed in an industrial environment, using the 'Memory' program for internal storage of instructions specified by the user to operate specific functions such as logic, sequencing, timer, counter 'counter' and arithmetic. It is used to control various types of machine or process through the 'input' and 'output' digital. PLC is easy to be integrated into the industrial control system and easy to use for the desired functions.
PLC COMPONENTSProgramming Device
Input / Output Module
Output DeviceInput Device
Power Supply CPU Memory
PLC DEVICES AND FUNCTION
Device Function
Peranti pengaturcaraan
(Programming device)
Equipment used to enter the PLC program
Modul masukan
(Input module)
Convert the input signal from the input module to signal that can be
processed by the PLC and send to the central control unit.
Modul keluaran
(Output module)
Otherwise perform the duties of the PLC to change the appropriate signal to
'output device' such as driving.
Peranti masukan
(Input device)
Equipment used in the system from outside eg receiving signal at various
types of switches and other sensors, external sensors and sends it to the
input module to translate.
Peranti keluaran
(Output device)
Equipment that receive signals from the 'output module' and then carry out
the instructions made by the programs 'PLC' to the system. It consists of
various types of motors, solenoids, lamps, heaters and so on.
Unit pemperosesan pusat
Central Processing Unit
(CPU)
Equipment that receive signals from the 'output module' and then carry out
the instructions made by the programs 'PLC' to the system. It consists of
various types of motors, solenoids, lamps, heaters and so on.
PLC CONTROL UNIT COMPONENTS
Arithmetic logic unit (ALU) - perform arithmetic and logical operations with data
delivered.
Accumulator (AC) – special register is assigned directly to the ALU. It stores data
to be processed and the results of an operation.
Register (Pendaftar) - store instructions called a program memory until it dies in
decoded and implemented (Executed)
Command ( arahan ) – have the operation and the address. the operational
determine the logical operation which will be implemented. part
address defines the operation (input signal, flag etc.) in
which logic operations are performed.
Program counter – register containing the address of the next instruction
be processed.
Control Unit – determining and controlling the entire sequence of logic operations
required to run the command
PLC PROGRAMMING LANGUAGES
• IL - Instructions command in the form mnemonic program called ‘instruction / statement list'.
• ST - Problem-oriented language, such as structured text (structured text)
• LAD - Ladder Diagram to create a program mnemonic.
• FBD - Block diagram as represented by function block diagram.
• SFC - Flow chart as represented by the sequential function chart (sequential function chart) as
function block diagram.
CONCEPT OF LADDER DIAGRAMBekalan Kuasa Bekalan Kuasa
Motor
Relay
Coil
Relay Contact
Relay Coil
Motor
Appearance of a ladder
Simple Electric Circuit
Bekalan Kuasa Bekalan Kuasa
MotorRelay A
Coil
Relay B
Coil CA
RA
Motor
Simplified to LAD
RB
CB
Suis B
Suis A
CA
RA
Motor
Appearance of a ladder
RB
CB
Suis B
Suis A
LADDER DIAGRAM (LAD) & INSTRUCTION LIST (IL)
10000
END
1000000
01
NL
LD 00
OR 10000
AND NOT 01
OUT 10000
END
LADInstruction List
LD LOAD
LD.NOT LOAD.NOT
AND AND
AND.NOT AND.NOT
OR OR
OR.NOT OR.NOT
OUT OUTPUT
INSTRUCTION LIST & LADDER SYMBOL
20
21
00
00
END
PROGRAM LINE COMMAND INSTRUCTION LIST
INPUT/OUTPUT
000 LD 00
001 OUT 20
002 LD 00
003 OUT 21
004 END
FBD LANGUAGE
& =I0.2
I0.1
Q0.0
>
_
=I0.2
I0.1
Q0.0
&
=
I0.2
I0.1
Q0.0
S
RI0.0
>
_
=
I0.2
I0.1
Q0.0
S
RI0.0
Bit Logic
Bit Logic &
SR Flip-flop
SFC LANGUAGE
START
1N1
1N2
Transition
Action
Action
Initial Step
STRUCTURE TEXT LANGUAGE
THE END