
Chapter 4. Basic instructions
4-41
A control circuit for motor operation (example of CTUD instruction)
1. Operation
There are 4 motors controlled by PLC. Whenever the push- button PB1 is pressed, the numbers of
operating motor is increased by 1. The PB2 decreases the numbers of operating motor whenever it is
pressed. If the PB1 is pushed when 4 motors are operating, all motors will stop their operation.
2. System diagram
3. Program
0
1
2
3
.
.
.
.
.
Program
Input
module P03
Input
module P06
0
1
2
3
.
.
.
.
.
M3
M2
M1
PB1
PB2
M4
0006
( P060 )
P030
P031
U CTUD C001
R <S> 00001
C005
D
P030
P031
U CTUD C001
R <S> 00002
C005
D
P030
P031
U CTUD C003
R <S> 00001
C005
D
P030
P031
U CTUD C0004
R <S> 00004
C005
D
P030
P031
U CTUD C005
R <S> 00005
C005
D
C001
( P061 )
C002
( P062 )
C003
( P063 )
C004
[
END
]
0000
0012
0018
0024
0030
0032
0036
0034
0038
C001 : operate 1
st
motor
C002 : operate 2
nd
motor
C003 : operate 3
rd
motor
C004 : operate 4
th
motor
C005 : reset signal