Design of Programmable Logic Controller and I/O Expansions
Design of Programmable Logic Controller and I/O Expansions
Design of Programmable Logic Controller and I/O Expansions
1. INTRODUCTION
Programmable Logic Controller in Thailand has been
applied commonly around year 1985 King Mongkut's Institute
of Technology, Chaokhuntaharn Ladkrabang (KMITL),
Instrumentation Engineering Department get some supports
from UNDP. (UNITED NATIONS DEVELOPMENT
PROGRAM) for 2 years in sponsoring Thai lecturers aboard
to learn technology in Europe and sending consultants to the
institute. During the beginning period, PLC laboratory is one
the laboratory that get funding from UNDP. in this project.
Most equipments, especially PLC, were imported. The
department realized this importance, so this research was
initiated. The development has been continued, sometimes has
some difficulty the causes delayed project. However, the
attempt make this project success in 1990, from that period,
there are some improvements, tests continuously until now.
The development will focus on the research that can serve
local needs for small industries and study test kits. So the
HARD WARE will be designed to served industries objectives
ICCAS2005
Address Range(Hex)
0000-7FFFh
8000-9C00h
9C01-F100h
F101-FF00h
Size
32 K
7K
21K
3.9K
FF01-FFFFh
256byte
ICCAS2005
Range(word)
000-001
007
00-15
00-15
00-15
008-0078
HR00-HR99
LR00-LR63
T000-T511
C000-C511
B3
ROR(28)
Statement1
ADD(30)
SUB(31)
MUL(32)
DIV(33)
Word
--
--
Statement3
Add
Su
Mu
Dv
Statement4
Result
Result
Result
Result
Statement1
RDI(70)
WRO(71)
Statement2
#Unit No.
#Unit No.
Statement3
Source
Destination
Statement4
---
0001
Code1
Statement A
0002
Code2
Statement B
0003
Code3
Statement C
End record
Code
Statement..
LD
LD HR
LD LR
AND
AND HR
AND LR
81
83
85
87
89
8B
Procedure LD command
Subroutine LD_SUB;
Begin
Result:=Datatable (IOassign);
IF Result>0 then
Result:=$FF else
Result:=$00;
Push result to stack;
End;
Procedure OUT command
Subroutine OUT_SUB;
Begin
Pop result from stack;
Data table(IOassign) :=
Result;
Push result to stack;
End;
5. HARDWARE CONFIGULATION
Hardware configuration are consisted of CPU
Unit(84PROsf) ,RTU1(RTI16) 16 bits digital input / station
#00 and RTU2(RTO16) 16 bits digital output /station #01 as
depicted in fig. 5
In one scan time of PLC, starting from reading input status
from RTI16, manipulate data or condition according to user
program, then update output data to RTO16, the end of scan
time depicted in fig. 6
LD NOT
LD NOT HR
LD NOT LR
AND NOT
AND NOT HR
AND NOT LR
Statement1
MOV(21)
MVN(22)
MOVD(83)
Statement2
Source
Source
Source
Statement1
ASL(25)
ASR(26)
ROL(27)
Statement3
Destination
Destination
Designation
Statement4
--Destination
Statement2
Word
Word
Word
Statement3
----
Statement4
----
ICCAS2005
3 5 2 VI
3URJUDP H[ FXW
LRQ
7UDQVIHUW
R&3 8
578
,QSXW
5 7 8 UHIUHVK
,QSXW
7UDQVIHU
W
R5 78
578
RXW
SXW
2 XW
SXW
Program1
Ladder program I/P and O/P
Program2
Ladder program logic 20 INS.
Ch.1
Ch.2
Input signal output signal
delay time
4 msec.
? msec.
Fig. 7 Operation flow chart in one scan time of PLC
6. IMPLEMENTATION
Response to system in term of PLC scan time is very
important. The PLC that have fast scan time can response to
the system effectively. This test can measure scan time by
using oscilloscope. Testing procedure can be done by pulse
signal input at PLC from pulse generator. Range of pulse
generator is 1to10 KHz in order to be input signal simulator,
then ladder programming to operate test program and write
data to output. The oscilloscope has 2 channels, channel 1 and
2, measuring signal from input and output of PLC respectively,
as depicted in fig.8
Ch.1
Input signal
4 msec.
Ch.2
output signal
delay time
? msec.
ICCAS2005
Case Test 3
CPU +RTI16+RTO16 Unit
Ch.1
Input signal
Program3
Ladder program and
RDI&WRO command
100msec.
Ch.2
output signal
delay time
10 msec.
CONCLUSION
Even result of PLC research can response to scanned time
speed not as fast as imported PLC, its meet the departments
objective that to depend on our own local technology in order
to serve local need in small and medium industries.
In
testing, the department cooperates with private organization to
research and testing by installing with various machines e.g.
Screen painting machine of plastic can filling color and oil,
small paper cutting machine, KFC. sauce pack filling machine,
Reverse Osmosis water production rate 5,000 lits/day for ice
industry etc. The testing result is good at one level and will
be developed to higher efficacy and better capacity in the
future
REFERENCES
(1) Alan J.Crispin, Programmable Logic Controller and
their Engineering Application, Second Edition, the
McGraw-Hill Companies.1997.
(2) Robert E.Wilhelm,JR. Programmable Controller
Handbook , Copyright.1985
(3) SYSMAC CQM1/CPM1Programmable Controllers
Programming Manual , OMRON,Revised June 1998