Professional Documents
Culture Documents
SWITCHES
~
Single pole single throw (SPST)
~
Single pole double throw SPDT switches
DPDT
Hand Switches
3PST
Rotary
Swtich
Normally open
NO
Normally close
NC
Push-Push Switch
This looks like a momentary action push switch but
it is a standard on-off switch:
push once to switch on,
push again to switch off.
Microswitch
usually SPDT
Microswitches are designed
to switch fully open or
closed in response to small
movements.
They are available with
levers and rollers attached.
Keyswitch
A key operated
switch.
The example shown
is SPST.
Reed Switch
Usually SPST
The contacts of a reed switch
are closed by bringing a small
magnet near the switch.
They are used in security
circuits, for example to check
that doors are closed.
Standard reed switches are
SPST (simple on-off) but SPDT
(changeover) versions are also
available.
reed switches have a glass
body which is easily broken!
DIP Switch
DIP = Dual In-line Parallel
This is a set of miniature
SPST on-off switches, the
example shown has 8
switches.
The package is the same
size as a standard DIL
(Dual In-Line) integrated
circuit.
This type of switch is
used to set up circuits,
e.g. setting the code of a
remote control.
Multi-pole Switch
The picture shows a 6pole double throw switch,
also known as a 6-pole
changeover switch.
It can be set to have
momentary or latching
action.
Latching action means it
behaves as a push-push
switch, push once for the
first position, push again
for the second position
etc.
Multi-way Switch
Multi-way switches have 3 or more conducting positions.
They may have several poles (contact sets). A popular
type has a rotary action and it is available with a range of
contact arrangements from 1-pole 12-way to 4-pole 3
way.
The number of ways (switch positions) may be reduced
by adjusting a stop under the fixing nut. For example if
you need a 2-pole 5-way switch you can buy the 2-pole
6-way version and adjust the stop.
Limit switch
Proximity switch
Pressure switch
Level switch
Temperature switch
Flow switch
etc
SWITCH CAPACITY
On a switch usually there is a label informing the voltage
and current capacity, e.g.:
250 V
5A
It means that:
the maximum current allowed to pass the switch is 5 A.
The maximum voltage across its terminal allowed is 250 volt
I<5 A
~V<250 V
RELAY
Relay
NC contact
NO contact
coil
RELAY
A relay is an electrically
operated switch.
Current flowing through the coil
of the relay creates a magnetic
field which attracts a lever and
changes the switch contacts.
The coil current can be on or off
so relays have two switch
positions and they are double
throw (changeover) switches.
Relay consist of coil and contact
Usually a relay has 1 coil and
many contacts both NO and NC
Relay
Relay
NO
NO
NO
NO
NC
NC
NC
NC
Relay
30 mA
R11
R1
12 V
R12
5A
~ 220V
Ladder diagram
Ladder Diagram
To make such as previous diagram easier
to read a ladder diagram is used
+
S
R1
R11
Basic logic
+
AND LOGIC
s1
s2
L
s1
0
s2
0
L
0
Mathematically written as
L = S1 AND S2
Basic logic
+
OR LOGIC
s1
L
s2
s1
0
s2
0
L
0
Mathematically written as
L = S1 OR S2
Basic logic
NOT LOGIC
s1
R1
R11
L
R1
0
L
1
Mathematically written as
L = NOT(R1)
Combinational logic
Suppose you want to design a safe car with the following criteria:
The gear box (GB) will not engage unless:
1. The safety belt (SB) is fastened and the doors (D1-D4) are locked or
2. The safety system is disable by switching on override switch (OS) for
maintenance purpose
Mathematically the above logic is written as
GB = (SB AND D1 AND D2 AND D3 AND D4) OR OS
SB
D1
D2
D3
D4
GB
OS
S2
R1
start
stop
R11
R12
R13
motor
Latching action
R14
LS
S2
S1
R1
start
stop
motor
R11
LS
Permissive circuits
Often it is desired that a piece of equipment is
allowed to start if several conditions are met.
For example overload switch and over
temperature switch must be closed in order the
motor can be started
Each process condition is called a permissive,
and each permissive switch contact is wired in
series, so that if any one of them detects an
unsafe condition, the circuit will be opened.
S2
S1
Permissive
circuits
R1
start
stop
OL
R11
LS
motor
OT
Interlock circuits
Often it is desired that only one piece of
equipment is allowed to start if all other
equipments are in off condition.
For example push button circuit used in Quiz
show program where several contestant have to
answer a question.
The first one who pushes the push button will
disable the others push button switch
This circuit is called interlock since acting one
circuit will lock the others to function
R12
R22
R13
R23
R21
R11
R1
R2
LA
LB
R21
R31
R11
R31
R14
R24
R12
R22
R32
R13
R23
R33
R1
R2
R3
LA
LB
LC
Reset
R21
R11
R1
R12
R2
R22
R13
R23
R14
R23
LA
LB
Interlock
Another example of interlock is the forward circuit of motor
must prevent the reverse circuit, otherwise the motor will
damage
Note:
Motor contactor (or "starter") coils are typically designated by the letter "M"
in ladder logic diagrams.
PLC
A
S1
S2
B
C
A
S1
S2
X3
X4
Y1
LA=X3 AND X4
Y3
LB =X3 OR X4
X3
X4
A
S1
S2
X3
X4
Y5
X4
X3
LC=X3 EXOR X4
Processors Structure
Display block
Proc
RAM
memory
Digital
Processing
Flash
EPROM
COMM
IO MODULES
RU
N
TER
I/O
ER
R
Terminal port TER
BAT
RESET button
Power Supply
Optional Battery
BASE
Standard
format
module
Half format
module
Protected
Internal RAM
Data
Constants
Backup copy
of Program
and
Constants
Internal
Flash
EPROM
Program
PCMCI
A card
Constants
TSX Micro
Discrete I/O
12 I
8I
ter. blk. HE10
64 I/O
HE10
28 I/O 28 I/O
ter. blk. HE10
8O
8O
ter. blk. HE10
8I
ter. blk.
4O
ter. blk.
TSX Micro
Remote discrete I/O on TSX 07 link
Exchanges between Applications
%IW,
%QW
addr. 1
ATS05
ATS05
%I
%Q
remote I/O
200 m. max.
ATS05
ATS05
TSX Micro
"TELEFAST" I/O Interface
TELEFAST I/O
TSX Micro
Analog I/O
Analog I/O in
module
8 Inp
12 bits
0-10 V 4-20 mA
or
+ 10 V 0-20 mA
4 Inp
4 Outp
2 Outp
16 bits
11 bits + sign
11 bits + sign
differential
+ 10 V
+ 10 V
multirange
0-20 mA or 4-20 mA
TSX
Premium
FIELDBUS
MACHINE
Standard sensors
Man-machine interface
Interfaces
7 8 9
4 5 6
1 2 3
+ 0
Interfaces
ENCLOSURE
1
2
3
4
Intelligent sensors
Motor starters
Power
supply
Software
SAVE FILE
Periodic Execution
Period time
I.P
I.P
I.P
%I
%I
%I
Program
Processing
Program
Processing
%Q
%Q
Program
Processing
I.P
I.P
Elapsed
time
Scan n
Elapsed
time
Scan n+1
Elapsed time
Scan n+2
%Q
%S19 set
I.P
I.P
I.P
%I
%I
%I
Program
Processing
Program
Processing
%Q
%Q
I.P
I.P
Program
Processing
Elapsed
time
Scan n
Elapsed
time
Scan n+1
PLC STOP
IMMEDIATELY
OVERRUN
OCCURED
Master task
Fast task
priority
MAST
FAST
Event-triggered
task
EVTi
MAST
SYSTEM
%I
I.P
Program
Processing
%Q
%I
I.P
Program
Processing
%Q
Event
detecte
d 20 ms
20 ms
20 ms
EVTi
FAST
MAST
SYSTEM
I
I
%I05.1
RACK 0
%Q15.1
RACK 1
Information on fault in
the module in position
3 in rack at address 0
RACK 0
%I105.1.ERR
Information on fault in
channel 1 of the module in
position 5 in rack at address
1
RACK 1
I or Q
Symbo Type of
l
object
I = Input
Q=
Output
X, W, or D
Format
X=
Boolean
W = Word
D = Double
Word
Rack
Module
Addres Position
s
(00 to
(0 to 7)
10)
Channel
Number
(0 to
127)
I or Q
Symbo Type of
l
object
I = Input
Q=
Output
X, W, or D
Format
X=
Boolean
W = Word
D = Double
Word
Rack
Module
Addres Position
s
(00 to
(0 to 7)
10)
Channel
Number
(0 to
127)
Memory Addressing
Words objects can be addressed by PL7
Software using four different formats :
Byte (B)
Floating Point (F)
Words (W)
Double Words (D)
Memory Addressing
Byte (B) is used exclusively or operations on
character strings.
Example : B, c, , $, etc.
Floating Point (F) format used is that of IEEE
Std 754-1985 (equivalent to IEC 559). Words
are 32 bits long, which corresponds to single
length floating point numbers.
Example : 1285.28
12.8528E2.
Memory Addressing
Words single length (W), these 16-bit
words can contain an algebraic value
between
-32.768 and 32.767
W (WORD) are stored in the memory on two consecutive single length
bytes.
16-bit word
15
14
13
12
11
10
Memory Addressing
Words double length (D), these 32-bit
words can contain an algebraic value
between
-2.147.483.648 and 2.147.483.647
D (DOUBLE WORD) are stored in the memory on two consecutive
single length words
15
14
13
12
11
10
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
32-bit word
Symbolization Example
If %I001.0 has Tacho_meter as its symbol
Then
%I001.0
Tacho_meter
%Q002.1
Can be symbolized
by
%Q002.1
Symbolization
All PL7 objects can be symbolized, but
there are an exception for table type
structured objects and indexed objects.
EXAMPLE :
If %MW0 has Temperature as its symbol
Then %MW0:10 can be symbolized by :
Temperature:10
Animation Tables
All variables of the application to be
monitored or modified can be done by
creating animation tables.
EXAMPLE :
The value of %MW0 want to be monitored.
%MW0
A Structured text language which is a data processing type language enabling the
structured writing of logical and numerical.
Graphic Elements
Power Rails
LABELS
COMMENTS
NORMALLY OPEN
NORMALLY CLOSED
Transitional Contacts
POSITIVE
TRANSITIONAL
CONTACTS
NEGATIVE
TRANSITIONAL
CONTACTS
OFF
OFF
ON
ON
one scan time
ON
OFF
ON
OFF
ON
OFF
N
OFF
ON
one scan time
ON
OFF
ON
OFF
S
R
NORMALLY-OPEN COIL
Power Flow
Normally Open
Coils
OFF
OFF
ON
ON
OFF
OFF
ON
OFF
ON
OFF
NORMALLY-CLOSE COIL
Power Flow
Normally Close
Coils
OFF
ON
ON
OFF
OFF
ON
ON
OFF
ON
OFF
Latch Coils
LATCH COIL
Power Flow
Normally Open
Coils
OFF
OFF
ON
OFF
ON
Coils Set
ON
OFF
ON
OFF
Unlatch Coils
UNLATCH COIL
Power Flow
Normally Open
Coils
OFF
ON
ON
OFF
OFF
Coils Reset
ON
OFF
ON
OFF
PHYSICAL OUTPUT
%I001.0
%I001.1
%I003.0
%Q002.0
%Q102.0
%I103.0
%I003.0
%I001.0
%I003.0
%Q002.0
%M1
%M1
%Q002.1
%Q002.1
15
14
13
12
%Q002.0
%MW10:X5
11
10
%MW10
Stop
%I101.0
%I101.1
%Q102.0
%Q102.0
%Q102.0
%Q102.0
%Q102.2
End of
Cycle
Cycle
Stop
%I101.0
%Q102.1
%I101.1
%Q102.0
%Q102.0
Auto Single
Cycle
End of
Cycle
Cycle
Stop
%I101.0
%Q102.1
%I101.1
%Q102.0
%Q102.0
Auto Single
Cycle
INPUT
MODE OF
TIMERS
IN
Q
Timers
%TM0
TM
MODE : TON
TB : 1s
OUTPUT
TIME BASE
PRESET TIME
TIME
ACCUMULATED
TM.P : 15
MODIF : Y
TM.V : 13
MODIFICATION
TM
Q
MODE : TON
TB : 1s
TM.P : 15
MODIF : Y
TM.V : 13
Input Timer
Output Timer
OFF
ON
OFF
OFF
ON
preset time
OFF
ON
OFF
ON
OFF
TM
Q
MODE : TP
TB : 1s
TM.P : 15
MODIF : Y
TM.V : 13
Input Timer
Output Timer
OFF
OFF
ON
ON
ON
preset time
OFF
OFF
ON
OFF
ON
OFF
TM
Q
MODE : TOF
TB : 1s
TM.P : 15
MODIF : Y
TM.V : 13
Preset time
Input Timer
Output Timer
OFF
OFF
ON
ON
ON
OFF
OFF
ON
OFF
ON
OFF
%Q002.0
%TM0
IN
TM
Q
MODE : TON
TB : 1s
TM.P : 15
MODIF : Y
TM.V : 0
%I100.0
OFF
ON
OFF
15 s
%Q200.0
OFF
ON
OFF
%Q002.0
%TM0
IN
TM
Q
MODE : TOF
TB : 1s
TM.P : 15
MODIF : Y
TM.V : 0
%I100.0
OFF
%Q200.0
OFF
15 s
ON
ON
OFF
OFF
COUNTER
RESET
COUNTER
SET
COUNTER
UP-COUNTER
DOWN-COUNTER
%C0
C
C.P : 15
CU
MODIF : Y
C.V : 13
CD
COUNTER EMPTY
COUNTER DONE
COUNTER PRESET
COUNTER FULL
MODIFICATION
COUNTS
ACCUMULATED
%C0
R
C
E
Up-Counter
%I001.0
S
D
C.P : 15
CU
F
MODIF : Y
C.V : 0
CD
Indicator Lamp
%Q002.0
%C0
Counter
%I001.1
Set
C
E
S
D
Down%I001.0
Counter
P
C.P : 15
CU
F
MODIF : Y
C.V : 0
CD
Indicator
%Q002.0
Lamp
Auto Reset
%I001.0%Q002.1
%TM0
IN
TM
%TM1
IN
%Q002.0
TM
MODE : TON
TB : 1min
TM.P : 24
MODIF : Y
TM.V : 0
MODE : TP
TB : 1min
TM.P : 6
MODIF : Y
TM.V : 0
Reset
%Q002.1
%C0
R
End
Auto
Of
%I001.0%Q100.0
Cycle
P
Lube Pump
%TM0
IN
S
D
C.P : 100
CU
F
MODIF : Y
C.V : 0
CD
%Q002.0
TM
Q
MODE : TP
TB : 1s
TM.P : 60
MODIF : Y
TM.V : 0
Reset
%Q002.1
%M1
R
S
%M0
P
%M2
%M1
%M0
%TM0
IN TM
Q
MODE : TON
TB : 1s
TM.P : 60
CU
CD
R
S
CU
CD
%C0
C
C.P : 60
Minute
E
D
F
%C1
C
C.P : 24
%M1
Hour
%M2
E
D
F
day
OP1
OPERATORS
<,<=,>,>=,<>,=
OP2
OPERANDS 1
OPERANDS 2
OPERATORS
<
<=
>
>=
=
<>
COMPARE
%MW10>%MW20
%Q004.0
COMPARE
%IW300.0<=24
%Q004.0
COMPARE
%IW300.0<21
%Q004.1
COMPARE
%IW300.0>=21
%Q004.1
Cooler
On
Cooler
Off
Heater
On
Heater
Off
Timer-Counter-Comparison Example
Time Interval Driven Lube Program
Reset
Auto Reset
%I001.0%Q002.1
%Q002.1
%TM1
IN
TM
Q
MODE : TON
TB : 1min
TM.P : 30
MODIF : Y
TM.V : 0
COMPARE
%TM1.V>=24
COMPARE
%TM1.V<=30
Lube Pump
%Q002.0
Timer-Counter-Comparison Example
Event Driven and Time Interval Driven Lube Program
%TM1
%I001.0 %Q002.1
%C0
%Q002.2
IN MODE : TON Q
TB : 1min
TM.P : 30
R
C
E
S C.P : 100 D
%I001.0 %Q100.0
P
%Q002.1
%Q002.2
CU
F
CD C.V : 0
Auto
%Q002.2
P
COMPARE
%TM1.V>=24
%TM0
IN MODE : TP Q
TB : 1s
TM.P : 60
COMPARE
%TM1.V<=30
%Q002.0
EN
>
OP1
OP2
<
<>
OP1
OP2
OPERANDS 1
OPERANDS 2
COMPARE
%MW10
%MW20
<
%Q002.0
>
%Q002.1
<>
Drum Controller
RESET
STEP UP
TIME
ACCUMULATED
%DR0
R
DR
TB : 1mn
U
LEN : 6
DR.V : 4
DR.S : 2
FULL
TIME BASE
DRUM
LENGTH
STEP
ACCUMULATED
bit
Example :
0
1
2
3
4
5
6
7
8
A
B
C
D
E
F
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
steps
2 3 4
0 0 0
0 0 0
1 0 1
0 1 0
1 0 1
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
5
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
6
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
address
%Q002.0
%Q002.2
%M1
%M2
%M3
%Q002.3
%Q002.1
DR
F
TB : 1s
U
LEN : 4
DR.V : 4
DR.S : 0
%I001.0
steps
address
0 1 2 3
0 1 0 0 0 %Q002.0
1 0 1 0 0 %Q002.1
2 0 0 1 0 %Q002.2
3 0 0 0 0
4 0 0 0 0
5 0 0 0 0
6 0 0 0 0
Step 0 Step 1 Step 2
bit
%DR0
%Q002.0%Q002.1%Q002.2
DR
F
TB : 1s
U
LEN : 4
DR.V : 4
DR.S : 0
%I001.0
steps
address
0 1 2 3
0 1 0 1 0 %Q002.0
1 0 1 1 0 %Q002.1
2 1 0 1 0 %Q002.2
3 0 0 0 0
4 0 0 0 0
5 0 0 0 0
6 0 0 0 0
Step 0 Step 1 Step 2
bit
%DR0
%Q002.0%Q002.1%Q002.2
%DR0
DR
F
TB : 1s
Step Up
%M1
U
LEN : 4
DR.V : 4
DR.S : 2
COMPARE
%DR0.V>=6
Step Up
%M1
Assignment Instructions
OP2
OP1
OPERATE
%MW10:=%IW003.0
Example :
OPERATE
%Q002.0:8:=%M1:8
OPERATE
%MW10:=%I003.0:16
OPERATE
%M20:16:=%IW003.0
+
*
/
SQRT
INC
DEC
ABS
REM
Example :
%M0
OPERATE
%MW0:=%MW10+100
%I001.0
OPERATE
%MW0:=SQRT(%MW10)
%I001.1
OPERATE
INC(%MW100)
Logic Instructions
AND
OR
XOR
NOT
Logic Instructions
Example :
%M0
OPERATE
%MW0:=%MW10 AND
16#FF00
%I001.0
OPERATE
%MW0:=%KW5 OR %MW10
%I001.1
OPERATE
%MW0:=NOT %MW100
*
/
REM
XO
R
+
-
AN
D
<,>
<=,>=
=
<>
Example :
SQRT(%MW3)+%MW5*7 AND %MW8 OR %MW5 XOR %MW10
5
1
3
4
Shift Instruction
16 bit (single word) or
32 bit (double word)
Shift Left
Last bit
stored in
%S17
result:=SHL(OP1,i)
Shift Right
result:=SHR(OP1,i)
Shift Instruction
Example of Shift Left :
OPERATE
%MW3:=SHL(%MW0,3)
%MW0
15
14
13
12
11
10
Store in bit
%S17
4
3
2
1
15
14
13
12
11
10
%MW3
Rotate Left
Last bit
stored in
%S17
result:=ROL(OP1,i)
Rotate Right
result:=ROR(OP1,i)
%MW3:=ROL(%MW0,1)
%MW0
15
14
13
12
11
10
Store in bit
%S17
4
3
2
1
15
14
13
12
11
10
%MW3
Subroutine
Subroutine
Subroutine
SRi
SRi
Subroutine
SR1
Subroutine
SR0
Subroutine Call
C
SRi : subroutine module number (0 to 253)
Subroutine Call
Call SR 10
Subroutine module
SR 10
Call SR 12
Subroutine module
SR 12
Subroutine Return
RETURN
Program Jumps
Jumps Example
%I001.0
%L20
%I001.1
%Q002.0
%L20
%I001.0
%Q002.1
Stop Program
HALT
End of
Cycle
Cycle
Stop
%I101.0
%Q102.1
%I101.1
%Q102.0
P
%Q102.0
%Q102.1
P
%TM0
IN MODE : TOF
Q
TB : 1min
TM.P : 30
HALT