Bài giảng Các hệ thống tin học công nghiệp - Chương 5: Programmable controllers
Ch. 5 Programmable Controllers
PLC/PC Overview
Siemens SIMATIC S7-x00 seri PLCs
STEP 7 – 300/400 Programming
Language
WinCC
Ch4 ProgControllers
1
5.1. Khái niệm PLCs
Lịch sử:
1960 – 1970s: Hard wire
1980 – 1990: Programmable Logic Controller
1990 – nay: Programmable Controller,
Process Controller
Các hãng sản xuất:
USA: Allen Bradley, GE-Fanuc
EC: Siemens, ABB, Schneider
As-Au: Omron, Hitachi, Misubishi…
Ch4 ProgControllers
2
1
Cấu trúc: chia thành các modules:
CPU, Power supply Module có cổng nối bộ
lập trình (PG)
[Expansion Memory Module (Flash, SRAM,
DRAM, BBRAM)]
Digital Input Module (mức áp dc/ac, cách ly
quang...)
Digital Output Module (relay, transistor,
triac..., Relay/Opto Isolated)
Analog Input Module (u, i, cá ch ly...)
Ch4 ProgControllers
3
Analog Output Module (u, i)
Timer/ Counter Module (kHz, đếm xung, đo
tốc độ, chiều dài)
Communication Module: (RS232/485;
Ethernet IEEE 802.x)
2/3 D Positioner Module (định vị 2/ 3 chiều)
Interface Module - dùng để mở rộng thêm
cá c Module khá c
Function Modules: các chức năng điều khiển
PID, Servo/ Step Motors,...
Ch4 ProgControllers
4
2
Hoạt động của PLC:
Hoạt động theo chu kỳ các vòng quét:
. Đọc các thông tin từ các lối vào: DI, AI, Counter,
Communication…
. Xử lý, tính toán, Update data base, update các cờ
trạng thái
. Gửi ra các port: DO, AO, Positioner,
Communication…
Ngôn ngữ lập trình:
. Ladder
. Statement List
. Flow control
Ch4 ProgControllers
5
5.2. Siemens SIMATIC S7-x00 PLC:
5.2.1. S7-200:
Hì nh 402.
PLC S7-200
Ch4 ProgControllers
6
3
Micro type, high-speed, compact, low-cost solution for
automation tasks within the low-end performance
range.
Có nhiều loại CPU: 212 (214…)
RAM for Program & data:
. 212 CPU: 1Kbyte – 512 statement, 2048 word data
. 214 CPU: 4Kbyte – 2048 statement, 2048 word data
Execution time of 1024Statements: 1,3ms (212CPU) và
0.8ms (214 CPU)
Bit memory: 128 (256)
Counters, Timer: 46 (128)
DI/DO max/onboard: 30/14 (64/24)
AI/AO max: 8 (16)
Communication: PPI
Real time clock: CPU 214.
Ch4 ProgControllers
7
5.2.2. S7-300
Hì nh 403a – PLC S7-300
Ch4 ProgControllers
8
4
Mini PLC system, the custom solution for
extremely fast processes/ automation tasks
requiring additional data processing
capabilities
Spec.:
High computing performance,
Complete instruction set,
Multi Point Interface – MPI
5 CPUs for a wide variety of requirement
Expandability: up to 3 Expansion Racks (ERs)
Ch4 ProgControllers
9
5
5.2.3. S7-400:
Hì nh 404a.
S7-400
Ch4 ProgControllers
11
Power PLC for automation tasks within
mid & upper range:
High Speed, 1K statement – 200 us
Rugged: full enclosed, for industrial
environment
Module can be hot pluggible
Communications power house:
. Connection to SINEC L2 or SINEC H1 or Point-to-
Point
. Fast data exchange to the distributed I/Os
Ch4 ProgControllers
12
6
Ch4 ProgControllers
13
5.2.4. Programming Devices
Hì nh 405a.
Ch4 ProgControllers
14
7
Hì nh 405b.
Ch4 ProgControllers
15
5.2.5. Distributed IOs
Fig. 406. Distributed IO Modules
Ch4 ProgControllers
16
8
In conventionally automated Plants, IO are
plugged directly into PLC. Frequently this
leads to extensive wiring with
High cabling cost
Reduced flexibility in the case of modifications
and expansions
A distributed configuration means:
The PLCs, IO Modules and Field Devices are
connected over a single cable known as a field
bus,
The IO Modules can be installed in the
immediate vicinity of sensors and actuators
The process signals can be converted and
processed locally
Ch4 ProgControllers
17
Fig. 406a. SINEC L2-DP with Distributed IO Modules
Ch4 ProgControllers
18
9
The following can be connected to the
ProFiBus-DP:
Active Stations:
. S/M7 300 – 400 automation systems …as well as
from other manufacturers
. Programming devices and AT compatible PCs
. COROS Operator Panels
Passive Stations:
. ET200M/L/B/C/U distributed IO Stations, S5 Seri
PLCs, DP/AS-I link transceiver
. MMI
. Additional field Devices as well as third party devices
with slave interface Modules…
Ch4 ProgControllers
19
5.3. SIMATIC SOFTWARE
STEP 7 Mini programming software
STEP 7 Micro/DOS/Win programming
software
Ch4 ProgControllers
20
10
5.3.1. Introdution
Application:
SIMATIC software are array of tools based on
standard for PLCs S7
It provides all software functions required for:
. Configuring
. Programming
. Testing
. Starting up and
. Servicing PLCs
Ch4 ProgControllers
21
Design:
Feature:
.Comprehensive:
–Shared data management; All data of a
project are filled in a single central database.
–Comprehensive series of tools; for every
phase of an automation project there are user-
friendly functions: configuration,
parameterization of the hardware, creation
and documentation of programs, as well as
testing, startup and servicing.
–Openness: Imp/Exp interface ensure
connection with the PC world
Ch4 ProgControllers
22
11
.User-friendly:
–Individual programming languages, Help
and doc. Functions
–Extensive set of command and detailed
information functions (Err that may occur
and their causes…)
. Standard: based on Windows OS,
satisfy the standard DIN EN 6.1131-3
Ch4 ProgControllers
23
Package:
.STEP7 Micro/DOS/WIN: for programming
S7-200
.STEP7 Mini: for programming stand-alone
S7-300
.STEP7: the universal software for S7-300,
-400
.High level programming languages S7-
SCL: similar to PASCAL
Ch4 ProgControllers
24
12
Technology-Oriented Software Package (w/o
knowledge of PLC, computer or programming):
S7 Graph: describing event driven processes w
sequential Operation.
S7 HiGraph: describing event driven processes
w non-sequential Operation.
Software for special applications:
COROS for parameterization of the MMI
SIMATIC S7 standard control system
Fuzzy control
….
Ch4 ProgControllers
25
Fig 407a. STEP7 software package
Ch4 ProgControllers
26
13
Fig 407c. PLC S7 seri software tools
Ch4 ProgControllers
27
5.3.2. Micro/DOS/Win for s7-200
Configuring
Programming
Debugging
Testing
Ch4 ProgControllers
28
14
5.3.3. S7-300/400
Configuring
Instruction Set
Ch4 ProgControllers
29
5.3.3.1. The modules of S7-300
CPU Modules:
CPU, Mem/OS, Timer, Comm 485, onboard
I/O ports (Option)
CPU Module: CPU 312, 314, 315,
CPU31x IMF (Integrated Function Module -
Onboard I/O & OS)
2 Comm ports CPU - CPU 31x - DP
(Ditributed Port): the second for networking.
Ch4 ProgControllers
30
15
Expanded Modules:
PS - Power Supply: 2, 5, 10 Amp
SM - Signal Module: In/Out signal modules:
. DI: Digital Input, 8, 16, 32
. DO: Digital Output, 8, 16, 32
. DI/DO 8/8 or 16/16
. AI: 12 bit ADC, 2/4/8 channel
. AO: 8/12 bit DAC, 2/4 channel
IM: Interface Modules: For expanding more
rack. Each rack for 8 modules max (Not
including CPU & PS). 1 CPU S7-300 can
connect to 4 racks max via IMs.
Ch4 ProgControllers
31
FM: Function modules: PID controller, Step
motor, servo... modules.
CP: Communication Modules: to
communicate between PLCs and Computers
Ch4 ProgControllers
32
16
5.3.3.2. DATA & MEMORY MAPPING:
Data types:
Elementary data types:
Ch4 ProgControllers
33
. Bool
. Byte: 8 bit or ASCII character: L B#16#14 // load
byte 14h into Accu1
. word:
L W#16#32A
. Int: -32768 .. +32767:
. DInt: 4 byte
L DW#16#234F
. Real: Floating Point 4 byte
. S5T (S5TIME): interval (hh/mm/ss/ms) L
S5T#2h_1m_7s_13ms.
. TOD - Time of day: hh/mm/ss
L
TOD#12:34:40.
. DATE:
. CHAR: max 4 char
L
DATE#2004-12-31.
'HE_6'
L
Ch4 ProgControllers
34
17
Complex data types
Ch4 ProgControllers
35
Parameter data types
Ch4 ProgControllers
36
18
Memory: 3 parts
Ch4 ProgControllers
37
Application Program memory Part - 3 sections:
. OB: Organization Block
. FC: Function - Sub module with dummy parameters of main program
. FB: Function Block: Sub module with data exchange to/from other
modules. The data must be DB (data block)
Data Area of OS and Application - 7 sub areas:
. I (Process Image Input): data input buffer for DI ports. CPU just read this
buffer, not ports
. Q (Process Image Output): data output buffer for DO ports. CPU just
writes this buffer, not ports
. M: Status/Conditional: bit (M), byte (MB), word (MW), double word (MD)
. T: Time buffer: preset/current time value and logic output.
. C: Counter: preset/current counter value and logic output.
. PI: I/O External Input Address for analog inputs: PIB, PIW, PID
. PQ: I/O External Output Address for analog outputs: PQB, PQW, PQD
Data Blocks - 2 blocks:
. DB: data block, accessible by: DBX (bit), DBB, DBW, DBD
. L (Local data blocks) local data memory of OB, FC, FB. Accessible: L
(bit), LB, LW, LD.
Ch4 ProgControllers
38
19
5.3.3.3. SCAN LOOP:
4 phases
Scan time not fix - tùy
nhiều hay ít lệnh
Interrupt Service block:
OB40, OB80... được thực
hiện tại bất kỳ thời điểm
nào - không cần trật tự.
Ch4 ProgControllers
39
5.3.3.4. PROGRAM STRUCTURES:
Linear Programming
Structured Programming: OB
(Organization Blocks), FC (Program
Blocks), FB (Function Blocks), DB (Data
Blocks)
Số các module gọi lồng nhau: CPU 314: là
8, nếu quá thì STOP
Ch4 ProgControllers
40
20
Tải về để xem bản đầy đủ
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Các hệ thống tin học công nghiệp - Chương 5: Programmable controllers", để tải tài liệu gốc về máy hãy click vào nút Download ở trên
File đính kèm:
- bai_giang_cac_he_thong_tin_hoc_cong_nghiep_chuong_5_programm.pdf