Download - Li354 plc lects 2011a
I.LI354 Programmable Logic Controller
Докторант . Д. Пүрэвмагнай
. Д Пүрэвмагнай
Шинжлэх Ухаан Технологийн Их Сургууль
Үйлдвэрлэлийн Технологи, Дизайны Сургууль
Add. Монгол, Улаанбаатар, БагатойрууTel: +976-96638295
E-mail: [email protected], [email protected]
1. Удирдатгал2. Түүх3. PLCийн шинж чанар4. PLC ийн ерөнхий фунцүүп5. PLCийн ажиллах зарчим6. PLCийн ангилал7. PLCийн программчлал 8. Advantages and Disadvantages9. PLCийн хэрэглээ PLCs’ Applications 10. PLCийн техник хангамж PLC hardwares 11. Жишээ
Сэдэв:
Process Control & Automation
MANUALCONTROL
HARD WIRED CONTROL
ELECTRONIC CONTROL
PLC CONTROL
Технологийн процессын автоматжуулалтын үе шат
MANUAL CONTROLMANUAL CONTROL БУЮУ ГАР БУЮУ ГАР УДИРДЛАГА УДИРДЛАГА
Энэ үед удирдлага болон тохируулгын бүхий л Энэ үед удирдлага болон тохируулгын бүхий л
үйл явц хүний үйлдлээр хийгддэг.үйл явц хүний үйлдлээр хийгддэг.
Гар удирдлагатай тохиолдолд хүнээс шалтгаалах Гар удирдлагатай тохиолдолд хүнээс шалтгаалах
алдаанаас хамааран бүтээгдэхүүний чанар алдаанаас хамааран бүтээгдэхүүний чанар
харилцан адилгүй байх ба бүтээгдэхүүний өртөг харилцан адилгүй байх ба бүтээгдэхүүний өртөг
өндөр байдаг өндөр байдаг
HARD WIREDHARD WIRED БУЮУ РЕЛЕЙН ЛОГИК БУЮУ РЕЛЕЙН ЛОГИК УДИРЛАГАУДИРЛАГА
Автоматжуулалтын хөгжилийн эхний Автоматжуулалтын хөгжилийн эхний үед тоолууртай релей ашилагдаж үед тоолууртай релей ашилагдаж байсан. байсан. Удирдлагын программыг өөрчлөх Удирдлагын программыг өөрчлөх тохилдолд тохилдолд Програмп тохируулан релей Програмп тохируулан релей тоолууруудын холболтыг өөрчлөх тоолууруудын холболтыг өөрчлөх шаардлага үүсдэг байсан.шаардлага үүсдэг байсан.Энэ бүх үйлд ажиллагааг өнөө үеп Энэ бүх үйлд ажиллагааг өнөө үеп PLCPLC хийх болсонхийх болсон
ELECTRONICS CONTROLELECTRONICS CONTROL БУЮУ БУЮУ ЭЛЭКТРОН УДИРДЛАГАЭЛЭКТРОН УДИРДЛАГА
Энэ үед удирдлагын хэлхээнд логик үйлдэлүүд Энэ үед удирдлагын хэлхээнд логик үйлдэлүүд гүйцэтгэдэг элементүүдийг хэрэглэж эхэлсэн.гүйцэтгэдэг элементүүдийг хэрэглэж эхэлсэн.
Хуучиг биметал мотоын таймер ашигладаг байсан Хуучиг биметал мотоын таймер ашигладаг байсан бол түүнийг электрон тоолуураар сольсонбол түүнийг электрон тоолуураар сольсонИнгэснээрИнгэснээр::
• Îðîí çàéã õýìíýñýíÎðîí çàéã õýìíýñýí• Ýíåðãè õýìíýñýíÝíåðãè õýìíýñýí• Çàñâàð ¿éë÷èëãýý áàãàññàíÇàñâàð ¿éë÷èëãýý áàãàññàí
PROGRAMMABLE LOGIC CONTROLLERPROGRAMMABLE LOGIC CONTROLLER БУЮУ БУЮУ ПРОГРАММЧЛАГДАХ ЛОГИК УДИРДЛАГАПРОГРАММЧЛАГДАХ ЛОГИК УДИРДЛАГА
PLC PLC бол микропроцессор дээр бол микропроцессор дээр суурилсан логик зарчимаар суурилсан логик зарчимаар ажилладаг автомат удирдлага юм.ажилладаг автомат удирдлага юм.
Programmable logic controller (PLC) буюу программчлагдах логик контроллер нь төрөл бүрийн технологийн процессыг автоматжуулахад ашиглагддаг дижитал компьютер юм.
Энэхүү автомат систем нь хуучин зуу эсвэл мянган релей болон таймер ашигладаг байсныг ганц PLC-ээр сольж программчилах боломжийг бүрдүүлж байгаа юм.
PLC-ийн тухай
•1960-аад оноос үүсэж жхжлсжн бөгөөд
•PLC нь 1970 оноос эхлэн үйлдвэрлэлийн удирдлагад өргөнөөр ашиглаж эхэлсэн.
• PLC нь анх Америкийн машин үйлдвэрлэгчийн (General motors) захиалгаар зохиогдсон.
•1980-аад оноос үнэ нь бууж эхэлсэн
• Одоо маш олон үйлдвэрлэлд өргөнөөр ашиглаж байна.
Түүх :
Уламжлалт төхөөрөмжүүд Devices
Релей Relays Контактор Contactors Мотор асаагуур Motor Starters Гар үйлдэлт унтраалга Manually operated
switches Механик үйлдэлт унтраалга Mechanically
operated switches Цахилгаан үйлдэлт унтраалга Electrically
operated switches
CR1
CR1-1
Релей Relays Удирдлагын үндсэн элемент Original
control elements Одоо бол туслах элементээр ашиглаж
. байна Now used as auxiliary devicesThe PLC is not designed to switch high
currents or voltages
Manually Operated Switches Даралтат товчлуур Pushbuttons
Хэвийн нээлттэй Normally open Хэвийн хаалттай Normally closed
Selector switchesMaintained or spring return
Механик үйлдэлтэй Унтраалга Mechanically Operated Switches
Хязгаарын унтраалга
Limit Switches Температурын унтраалга
Temperature Switches Даралтын унтраалга Pressure Switches Түвшиний унтраалга Level Switches
Цахилгаан үйлдэлтэй унтраалга Electrically Operated Switches Фотоэлектрик унтраалга Photoelectric
Switches Орон зайн унтраалга Proximity Switches
PLC-ийн шинж чанар Characteristics of PLC
(1) Универсал байдал, уян хатан ба энгийнмонтажтай Versatility, flexibility and simple wiring
(2) Хүчтэй функцүүдтэй Strong function and expanpsion
(3) Өндөр найдвартай High reliability and strong anti-interference
(4) Программчлагддаг ба Programming and wiring can synchronously
(1)Универсал байдал, уян хатан ба цахилгааны энгийн монтажтай
PLC ийг удирдлагын системд төрөл бүрийн байдлаар ашиглаж болдог. Тухайн PLC –г өөр төрлийн удирдлагад ашиглахыг тулд техникийн өөрчлөл хийх шаардлагагүй бөгөөд зөвхөн программчлалын хувьд өөрчлөлт хийх шаардлагатай
"soft wiring"
PLC-ийн шинж чанар Characteristics of PLC
(2) Хүчтэй функцүүдтэй Strong function and expanpsion
Удирдлагын программчлалАналоги-Тоон болон Тоон-Аналоги
хувиргалтӨгөгдөл дамжуулах процесс буюу сүлжээ
PLC-ийн шинж чанар Characteristics of PLC
(3) Өндөр найдвартай High reliability and strong anti-interference
Hardware:Цахилгаан соронзон хамгаалалт, щүүлтүүр, оптик
холболт, хөндлөнгийн нөлөөлөлөөс хамгаалах. Software:Мэдээлэл хамгаалах, программчлалыг шалгах
систем
PLC-ийн шинж чанар Characteristics of PLC
PLC-ийн үндсэн функц
PLC
Логик удирдлага Аналоги удирдлага
Closed-loop удирдлага Тооцоолуур Network Сүлжээ
(1) Логик удирдлага. Энэ бол хамгийн үндсэн функц. : , , Үүнд ба эсвэл үгүйсгэх хэлбэр гэсэн
, функцүүд ашигладаг ба унтраалга релейн зарчимийг авч явдаг
(2) Аналоги удирдлага Үйлдвэрлэлийн процест маш олон
төрлийн хэмжигдэхүүнүүдийн : өөрчлөлтүүдийг ашигладаг жишээлбэл
, , температур даралт хурд гэх мэт Эдгээр хэмжигдэхүүнүүд нь бүгд
. аналоги сигнал юм RTD , аналоги гаралт . оролтын модулуудыг ашигладаг Энд
PLC .ийг өргөн ашигладаг
(3) Closed-loop удирдлагаPLC зөвхөн запгай удирдлага хийхээс
. гадна битүү хэлхээний удирдлага хийдэг Битүү хэлхээний удирдлага хийснээр PID
хуулиар удирдах боломжтой болж байгаа.юм
(4) , Хугацаа байрлал болон тоолуурын удирдлага
PLC ийн хугацааны удирдлагын функцүүдийг ашигладаг эндээ
импульсийн гаралтын тохируулгууд хийжөгдөг
Network сүлжээ(5) Network CommunicationsPLC ийг сүлжээнд холбосноор
технологийн процессийг хүссэн , газраасаа хянах удирдах боломж бий
.болж байгаа юм
PLC-ийн ажиллах зарчим
PLC-ийн ангилал
(1) Оролт гаралтын байдлаар I/O points
(2) Бүтэцээр ньBy construction
(1) Оролт гаралтын тоогоор By I/O points Оролт гаралтын портуудын тоогоор
нь: Micro: 32 I/O Small: 256 I/O Medium: 1024 I/O Large: 4096 I/O
PLC-ийн ангилал
(2) Бүтцийн хувьдBy construction
Compact PLCs Modular PLCs
PLC-ийн ангилал
Monolithic constructionMonoprocessorFieldbus connection
Fixed casing
Fixed number of I/O (most of them binary)No process computer capabilities (no MMC)
Modular construction (backplane)One- or multiprocessor systemFieldbus and LAN connection
DIN-rail
Large variety of input/output boards
Connection to serial bus
(2)
Modular PLC
Compact(1)
PLC-ийн ангилал
Compact эсвэл modular ?
€
# I/O modules
Limit of local I/O
compact PLC (fixed number of I/Os)
modular PLC (variable number of I/Os
field busextension
Programming languagesPLC программчлал
(1) Ladder logic диаграмм(2) Statement list (3) Функцийн блок диаграмм Function
block diagram
PLC программчлал
Statement listFunction block
Ladder diagram
The instructions are represented by graphic symbols:
Contacts, Coils & Boxes
ladder diagram нь хамгийн түгээмэл программчлалын хэл
PLC нь бусад компьютерийг бодвол төрөл бүрийн орчин ажиллах боломжтой оролт гаралт ихтэй
Давуу тал
Siemens PLC
Давуу талууд:
Flexibility: Correcting Errors: Space efficient: Low cost: Testing: Visual observation: Number of contacts many: Resistant character test : Simplifies the control system components Security : Documentation: Can make changes by reprogramming in seconds.
PLC-ийн хэрэглээ
PLC:Location in the control architectureEnterprise Network
directly connectedI/O
Control Bus(e.g. Ethernet)
Engineerstation
I/O I/O I/O I/OCP
U
Sensor Bus (e.g. ASI)
Field Bus
gateway
Field Stations
Control Station with Field Bus
direct I/O
I/O
Field DevicesFB
gateway
gateway
I/OI/OI/OI/OCP
U
CO
M
I/OI/OI/OCO
M
CP
UC
OM
CO
M
CO
M
I/O
Field Bus
CP
U
CO
M 2
I/O I/O I/OCP
UC
OM
1
CO
M 2
I/OCP
U
Operatorstation
largePLCs
small PLC
PLCPLC
CO
M1
CO
M1
SupervisorStation
data concentrators,not programmable,but configurable
PLC-ийн бүрэлдэхүүн:
PLC-ийн үндсэн бүтэц
Arithmetic unit
Control unit
Input module
Output module
Power
MEMORYEPROM RAM
CPU
Өргөтгөл Extension I / O Interfaces
Нэмэлт Peripheral I / O Interfaces
InputDevices
OutputDevices
• CPU: дотоод төв процессороор микропроцессор ашигладаг
• Power supply unit: Тэжээлийн эх үүсвэрийн хувьд ерөнхий хувьсах A.C. хүчдэлийг тогтмол бага хүчдэл D.C. болгон хувиргаж ашигладаг.
• Оролт гараотын хэсэг Input-output sections:
Энд процессор гадаад
төхөөрөмжөөс мэдээлэл хүлээн авах ба холбогдсон гадаад төхөөрөмжүүдэд мэдээлэл дамжуулна.
The S7-200 PLCs are expandable. Нэмэлт модуль нь оролт гаралтын портуудыг өргөтгөх зориулалттай.Энэ модуль нь үндсэн төхөөрөмжтэйгээ туузан холбогч /ribbon connector/ ашиглан холбогддог.
• Нэмэлт модуль Expansion Modules:
• Программчлах төхөөрөмж Programming device: энэ төхөөрөмжийг ашиглан программыг компьютороос санах ойд бичнэ.
• Санах ойн байгууламж Memory unit: төхөөрөмжийн удирдлагад зориулагдсан программыг хадгалахад зориулагдсан.
•PLCs invented to Replace Relays and HARD WIRING: Prior to PLCs, many of these control tasks were solved with contactor or relay controls.
PLC системийг маш олон компаниуд:гаргадаг
Siemens, Allen Bradley, Omron, Schneider, гэх мэт
S7-200 configuration
S7 200 family
S7-200 configuration inputs
S7-200 configurationoutputs
S7-200 configurationI/O numbering
Analogue I/O
=Typical analogue signals from 0-10 VDC or 4-20 mA
=They are used to represent changing values such as speed, temperature, weight and level
Instructions
Standard instructions:
They are used in most programs.
Examples: timer, counter, math, logical, incr., decr. and move
High speed instructions:
They allow for events and interrupts to occur independently of the PLC scan time.
Examples: High speed counters and interrupts
Special instructions:
They are used to manipulate data
Shift, table, conversion, real time instruction.
Bit Logic instructionNormally Open contact
Normally Open Immediate contact
Normally Closed contact
Not contact
Normally Closed Immediate contact
Positive Transition contact
Negative Transition contact
Input Instructions
Input contacts example
Output instructions
Output Instruction
No Operation instruction
Output Immediate instruction
Set (N bits) instruction
Reset (N bits) instruction
Set Immediate (N bits) instruction
Reset Immediate (N bits) instruction
Output, Set & Reset example
Starting a motor
Hard-wired DOL(direct-on-line ) starting
Induction Motor
Circuit Breaker
Contactor
Thermal Overload
Induction Motor
Aux. contact
Contact coil
Stop
O.L. contact
Start
Using PLC
Before start
Starting
After start
Stopping
Input & Output connections
Timer instructions
On-Delay Timer
Retentive On-Delay Timer
Off-Delay Timer
On-Delay & Retentive On-Delay timers
They count time when the enabling input (IN) is ON. When the current value (Txxx) is > the preset time (PT), the timer bit is ON.
The On-Delay timer current value is cleared when (IN) is OFF, while the current value of the Retentive On-Delay Timer is maintained.
You can use the Retentive On-Delay Timer to accumulate time for multiple periods of the input ON .
Off-Delay timer
The Off-Delay Timer is used to delay turning an output OFF for a fixed period of time after the input turns OFF.
When (IN) turns ON, the timer bit turns ON immediately, and the current value is set to 0 .
When (IN) turns OFF, the timer counts till PT and the timer bit turns OFF and the current value stops counting.
If the input is OFF for a time shorter than PT, the timer bit remains ON.
Timers numbers & resolutions
Timer examples
On-Delay
Off-Delay
RetentiveOn-Delay
Hard-wired on-delay timer
Timer example
TONR example
Timer example
Memory types
You can access data in many CPU memory areas - process image input register (I) - process image output register (Q) - variable memory area (V) - Bit memory area (M) - sequence control relay memory area (S) - special memory bits (SM) - local memory area (L) - Timer memory area (T) - counter memory area (C) - Analog inputs (AI)
Accessing a Bit of Data in the CPU Memory (Byte.bit Addressing)
Memory addressing
Memory addressing
You can access data in many CPU memory areas (V, I, Q, M, S, L, and SM) as:bytes, words, or double words by using the byte-address format.
Memory typesProcess-image input register (I)
Format: Bit I[byte address].[bit address] I0.1 Byte, Word, Double Word I[size][starting byte address] IB4
Process-image output register (Q)
Format:Bit Q[byte address].[bit address] Q1.1Byte, Word, Double Word Q[size][starting byte address] QB5
Variable memory area (V)
You can use V memory to:•store intermediate results of the control logic operations .
•store other data pertaining to your process or task .Format:
Bit V[byte address].[bit address] V10.2Byte, Word, Double Word V[size][starting byte address] VW100
Memory typesSequence control relay area (S)
They are used to organize machine operations or steps into equivalent program segments. SCRs allow logical segmentation of the controlFormat:
Bit S[byte address].[bit address] S3.1Byte, Word, Double Word S[size][starting byte address] SB4
Special memory bits (SM)
The SM bits provide a means for communicating information between the CPU and your program. You can use these bits to select and control some of the special functions of the S7-200 CPU, such as:
•A bit that turns on for the first scan cycle •Bits that toggle at fixed rates
•Bits that show the status of math or operational instructionsFormat:
Bit SM[byte address].[bit address] SM0.1Byte, Word, Double Word SM[size][starting byte address] SMB86
Memory types
Local memory area (L)
The S7-200 PLCs provide 64 bytes of local (L) memory of which 60 can be used as scratchpad memory or for passing formal parameters to subroutines. Format:Bit L [byte address].[bit address] L0.0Byte, Word, Double Word L [size] [starting byte address] LB33
Memory types
Analog inputs (AI)The S7-200 converts a real-world, analog value (such as temperature or voltage) into a word-length (16-bit) digital value. You access these values by the area identifier (AI), size of the data (W), and the starting byte address. Since analog inputs are words and always start on even-number bytes (such as 0, 2, or 4), you access them with even-number byte addresses (such as AIW0, AIW2, or AIW4),as shown in Figure Analog input values are read-only values.Format: AIW [starting byte address] AIW4
Memory types
The S7-200 converts a word-length (16-bit) digital value into a current or voltage, proportional to the digital value (such as for a current or voltage). You write these values by the area identifier (AQ), size of the data (W), and the starting by address. Since analog outputs are words and always start on even-number bytes (such as 0, 2, or 4), you write them with even-number byte addresses (AQW0, AQW2, AQW4) ,
Format: AQW [starting byte address] AQW4
•Analog outputs (AQ)
Replacing Relay by PLC
First step- We have to translate all of the items we're using into symbols the plc understands
A contact symbol
A coil symbol
Second step- We must tell the plc where everything is located. In other words we have to give all the devices an address.
Final step- We have to convert the schematic into a logical sequence of events.
Ladder Diagram and Programming:
Load: The load (LD) instruction is a normally open contact
A Load (contact) symbol
LoadBar: The LoadBar instruction is a normally closed contact.
A LoadBar (normally closed contact) symbol
Out :The Out instruction is sometimes also called an Output Energize instruction. The output instruction is like a relay coil
An OUT (coil) symbol
OutBar: The outbar instruction is like a normally closed relay coil
An OUTBar (normally closed coil) symbol
Logic elements
Programming a PLC :
In order to create or change a program, the following items are needed:
PLC Programming Device Programming Software Connector Cable
You can use a personal computer as a programming device
Testing a program
The program is first downloaded from the PC to the CPU. The selector switch is placed in the RUN position. The simulator switches are operated and the resulting indication is observed on the output
Once a program has been written it needs to be tested and debugged. One way this can be done is to simulate the field inputs with an input simulator.
Examples of Ladder diagram(Example One):
We can simulate this same circuit with a ladder diagram:
SIEMENS PLCs
• SIEMENS S7-200, CPU 222.
• 8 Inputs, 6 Outputs.
• 256 Counters & Timers.
Examples of Ladder:
Siemens PLC
Examples of Ladder diagram(Example two)::
Examples two
This Exam gives a complete understanding of input, output, OR and AND commands in ladder diagram, and Timer. Here it is shown that if input I0.0 and I0.1 are on then output Q0.0 will turn on and this part explains the AND command. Output Q0.0 can also be activated if input I0.2 is on, which shows the OR command. In network two it is shown that when input I0.3 is activated a timer will count 3 seconds (300ms×10ms=3 s) and then this timer will activate the output Q0.1 .
Example three
In this assignment you are asked to imagine a parking lot. These are one entrance and one exit in this parking garage. You are asked to draw the ladder diagram of this system by considering the requirements mentioned here. Both the entrance and exit gates are open with remote control and you can assume that there is a infrared sensor to get the signal from the remote control and since this sensor is connected to PLC, as it gets the signal it is processed in PLC and entrance or exit gate will open. There are two infrared sensors one is placed toward the entrance and the other one is placed toward the exit so they will not interfere. Since you need the system to keep the gate open after someone presses the remote control button, you may need a latching switch for both entrance and exit. In addition you need the gates to be open only for 20 second and the timing increment of your PLC is 10ms. Moreover since you do not want the gate to damage your car if it takes more than 20 seconds to pass the gates, there are 2 sensor placed at entrance and exit gate (one for entrance and one for exit) to keep the gate open when a car is passing through.
Examples Continued
I0.0
Q0.1
SET
I0.1 Q0.1
Reset
I0.0
T33
2000 10ms
T33 M0.1
I02 Q0.1
Example Solution
Solution Description
In this example as I mentioned there should be a latching system to keep the gate open and close it after a car passes through. Here I00 is the infrared sensor that takes the command from the remote control. As it get the command it opens the gate Q01 and at the same time it will activated the 20 second timer T33
I0.0 I0.0Q0.1T33
SET 2000 10ms
Solution Description Continued
After 20 second the timer activate the switch I01 which will reset the output Q01, in other words it will close the gate. But this example does not finish here. A sensor is required to keep the gate open if a car is still in the gate way. So an other infrared sensor I02 is used here to keep the gate open and it is connected to Q01.
I0.1
T33 I0.2
Q0.1
M0.1
Reset
Q0.1
Example fourAutomatic water sprinkler system of a garden
This example is based on Automatic water sprinkler system of a garden. It delivers water to grass, flowers and trees. Watering of whole garden depends upon humidity and temperature conditions which are adjustable.
Example Picture
Example Continued
This example is one of the most complicated examples in this presentation. Here the water sprinkler system (Q0.0) starts to work when either temperature sensor(I0.0) or humidity sensor (I0.1) send a signal to it. In this scenario grass will be water first (water the grass Q0.1) fro 4 second (it is assumed very small for simplicity) and then flowers will be water (water the flowers Q0.2) for 10 second and at last trees will be watered (water the trees Q0.3) for 18 seconds. Since it is required to avoid pressure drop in the water line ,each section is separated and here the order to water this garden is given: First grass, second flowers and third trees.
Example ContinuedHere you can see that either temperature sensor I0.0 or humidity sensor I0.1 can turn on the sprinkler system (Q0.0). If the humidity or temperature falls below a specific point the system will start working.
Example Continued
Example Continued
In this Example it is needed to water the grass for 4 seconds. Since the increment is 10 ms, it is written 400ms in the timer. The input is assume to be the Q0.0 which was the switch for sprinkler system. Here it is assumed that if the sprinkler is on, the output Q0.1 will also become on and it will remain on for 4 seconds. If you take a look at the ladder diagram you will see that the input Q0.0 turn the timer on and it will count 4 seconds until it breaks the second line.
Example Continued
Since the input switch Q0.0 turn on all the timers in this ladder diagram at the same time it is required to add the time for watering of each section with the time elapsed in the previous sequence. For example although it is required to water the flowers for only 10 second but in the timer it is written 1400ms with the increment 10 ms which will eventually be equal to 14 second. Now if you subtract 14 seconds from 4 second (the time required for the first section) you will get the required time which is 10 seconds. There is one more important parameter here. In the ladder diagram it is written if the first section is done start the second section. You can see this in the second line of the ladder diagram. The output here is Q0.2 which is assumed for watering flowers.
Example Continued
Example Continued
This part is like the second part. Watering the trees is started when previous section are finished. The time for this section is 18 second which is added to 14 seconds counted before and now it is written as 3200 ms with 10ms increment. You can see when both Q0.1 and Q0.2 are off the third part (Q0.3) is started.
Example five
This example is based on a parking lot with a PLC which counts the number of cars that enter and exit and if the parking lot is about to be full, PLC sends a signal to a electronic board to say that the parking is full. The system is also utilizing a infrared sensor to open the gates with remote control.(The capacity of this parking lot is assumed to be 5 cars.)
Solution
Example Continued
In this example input I0.0 open the entrance gate and input I0.1 opens the exit gate. I0.0 and I0.1 are both infrared sensors which will be activated by remote control. In addition sensor I0.2 count the number of cars entering the parking lot and sensor I0.3 counts the cars leaving . The switch I0.4 is used to reset the system. If a total number of 5 cars enter this parking lot, counter C1 send a signal to the electronic board Q0.2 to show that the parking is full.
Programmable logic controlA PLC has many "input" terminals, through
which it interprets "high" and "low" logical states from sensors and switches.
It also has many output terminals, through which it outputs "high" and "low" signals to power lights, solenoids, contactors, small motors, and other devices lending themselves to on/off control.
In an effort to make PLCs easy to program, their programming language was designed to resemble ladder logic diagrams.
Thus, an industrial electrician or electrical engineer accustomed to reading ladder logic schematics would feel comfortable programming a PLC to perform the same control functions.
Program design of PLC
Design objectivePLC selection and resource allocationI/O address assignment Wiring Programming
Layout of Intersection Trafic Lights
G Y R
R Y G
G Y R
North
South
West East
R Y G
I/O address assignment
Serial number address Notes
1 I0.0 Start swich
2 I0.1 Stop
3 I0.2 emergency stop button
4 Q0.0 North-South Green
5 Q0.1 North-South Yellow
6 Q0.2 North-South Red
7 Q0.3 East-west Green
8 Q0.4 East-west Yellow
9 Q0.5 East-west Red
PLCCPU224
AC/DC/ RLY
I0.0
N L
24V(L+)
1M
M
Q0.0
Q0.1
Q0.3
AC220
I0.1
Q0.2
Q0.5
Q0.4
1L AC220
2L AC220
I0.2
Hardware Wiring