Tải bản đầy đủ (.pdf) (349 trang)

modern industrial automation software design feb 2006

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (19.97 MB, 349 trang )

Modern Industrial Automation
Sofhvare Design
Principles and Real- World Applications
Lingfeng Wang
Kay Chen Tan
IEEE
IEEE PRESS
A JOHN WILEY
&
SONS,
INC., PUBLICATION
This Page Intentionally Left Blank
Modern Industrial Automation
Sofiare Design
IEEE Press
445 Hoes Lane
Piscataway, NJ 08854
IEEE Press Editorial Board
Mohamed E. El-Hawary,
Editor in Chief
M. Akay
T.
G.
Croda M.
S.
Newman
J. B. Anderson
R.J.
Herrick
F.


M. B. Pereira
R.
J. Baker
S.
V.
Kartalopoulos
C. Singh
J.
E.
Brewer M. Montrose
G.
Zobrist
Kenneth Moore,
Director
of
IEEE
Book
and Information Services
(BIS)
Catherine Faduska,
Acquisitions Editor, IEEE Press
Jeanne Audino,
Project Editor, IEEE Press
Modern Industrial Automation
Sofhvare Design
Principles and Real- World Applications
Lingfeng Wang
Kay Chen Tan
IEEE
IEEE PRESS

A JOHN WILEY
&
SONS,
INC., PUBLICATION
Copyright
0
2006 by The Institute of Electrical and Electronics Engineers, Inc. All rights reserved.
Published by John Wiley
&
Sons, Inc., Hoboken, New Jersey
Published simultaneously in Canada.
No
part of this publication may be reproduced, stored in a retrieval system,
or
transmitted in any form
or
by any means, electronic, mechanical, photocopying, recording, scanning,
or
otherwise, except as
permitted under Section 107
or
108 of the 1976 United States Copyright Act, without either the prior
written permission of the Publisher,
or
authorization through payment of the appropriate per-copy fee to
the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax
(978) 750-4470,
or
on the web at www.copyright.com. Requests to the Publisher for permission should
he addressed to the Permissions Department, John Wiley

&
Sons, Inc.,
1
11
River Street, Hoboken, NJ
07030, (201) 748-601
I,
fax (201) 748-6008,
or
online at

Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in
preparing this book, they make no representations
or
warranties with respect to the accuracy
or
completeness of the contents of this
book
and specifically disclaim any implied warranties of
merchantability
or
fitness for a particular purpose. No warranty may be created
or
extended by sales
representatives
or
written sales materials. The advice and strategies contained herein may not be
suitable for your situation. You should consult with a professional where appropriate. Neither the
publisher
nor

author shall be liable for any loss of profit
or
any other commercial damages, including
but not limited to special, incidental, consequential,
or
other damages.
For
general information on
our
other products and services
or
for technical support, please contact
our
Customer Care Department within the United States at (800) 762-2974, outside the United States at
(317) 572-3993
or
fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may
not be available in electronic format.
For
information about Wiley products, visit
our
web site at
www.wiley.com.
Library
of
Congress
Catuloging-in-Publication
Data
is

avuilable.
ISBN-I3
978-0-471-68373-5
ISBN-
10
0-47 1-68373-6
Printed in the United States of America.
10987654321
Contents
Preface xxi
Aclcnow ledgments xxiii
Acronyms xxv
Part I Design Principles
of
Modern Industrial Automation
Systems
1
Introduction
1
1.1
Developmental Trends 2
1.2 Classifications and Existing Products
3
1.3 Functionality
of
Industrial Automation Systems
5
1.4
About the
Book

7
2 Virtual Instrumentation
9
2.1 Introduction
9
2.3 VXI Plug&Play (VPP) Specification
14
2.2 Characteristics
of
VXI Instruments 13
2.4 Virtual Instrument Software Architecture (VISA) 16
V
v;
CONTENTS
2.4.1 VISA
model
structure
2.4.2 VISA characteristics
2.5.1 Textual programming
2.5.2 Visual programming
2.5.3 Graphical programming
Liquefied Petroleum Gas Network (PLPGN)
Monitoring
2.6.1 Overall structure design
2.7 Hardware and Software Design
2.7.1 Development requirements
2.7.2 Development environment
2.7.3
2.8 Summary
2.5 Programming platforms

2.6
Configurations
of
system hardware and
software
3
Component-Based Measurement Systems
3.1
Introduction
3.2 Component Technology
3.3
Component-Based Industrial Automation
Software
3.4
Writing
Component
3.5 Case Study 1
3.6 Case Study 2
3.6.1
3.6.2
3.7
Summary
Definition
of
base class
of
instruments
UI
base class
of

VIs
4
Object- Oriented Software Engineering
4.1 Software Development Models
4.2
0
bject Orientation
4.2.1 OOA/OOD
4.2.2 Advantages
5 Graphical User Interface Design
6 Database Management
6.1 Database Systems
6.2 Relational Database
17
18
19
20
20
21
23
24
26
26
27
27
29
31
31
32
35

36
36
38
39
40
41
43
44
48
48
51
53
59
60
61
CONTENTS
vii
6.3
Structured Query Language
(SQL)
6.4
Open Database Connectivity (ODBC)
7
Software Testing
7.1
Software and Industrial Automation
7.2
Software Testing Strategies
7.2.1
Black- box testing

7.2.2
White-box testing
Software Testing Processes and Steps
7.3.1
Unit testing
7.3.2
Integration testing
7.3.3
Verification testing
7.3.4
System testing
7.3.5
Validation
7.4
Software Performance Testing
7.4.1
Availability testing
7.4.2
Reliability testing
7.4.3
Survivability testing
7.4.4
Flexibility testing
7.4.5
Stress testing
7.4.6
Security testing
74.7
Usability testing
7.4.8

Maintainability testing
7.3
7.5
Software Maintenance
7.6
Summary
Part
11
Real- World Applications
8
Overview
9
An
Object-Oriented Reconfigurable Software
9.1
Introduction
9.2
Design Requirements, Development Environments,
9.1.1
Evolution
of
reconfigurable software
and Methodologies
9.2.1
Design requirements
9.2.2
Development environments
9.2.3
Development methodologies
64

66
69
69
71
72
73
73
75
76
78
78
79
79
80
81
81
81
82
82
82
83
85
84
91
93
94
94
105
105
106

107
viii
CON
TENTS
9.3
IMC
System Structure and Software Design
9.3.1 Overall structure
of
IMC systems
9.3.2 Configuration- based IMC software
9.3.3 Reconfigurable IMC software design
9.3.4 Development tool selection
9.3.5 Object-oriented methodology
9.3.6 Windows programming
9.3.7 Database technologies
9.3.8 Relational database model
9.3.9 Database management system (DBMS)
9.3.10 Database application
9.3.1 1 Delphi database functionality
9.4.1 Data acquisition module
9.4.2 Data processing module
9.4.3 Data browsing module
9.5.1 User configuration
9.5.2 Running status indications
9.5.3 Alarm management
9.5.4 Data exchange
9.5.5 Visual database query
9.5.6 Remote communication
9.4 RSFIMC Architecture

9.5 RSFIMC Functions
9.6 Summary
10 Flexible Measurement Point Management
10.1 Introduction
10.2 System Architecture
10.2.1 Overall architecture
10.2.2 Interfaces with other modules
10.3 Development Platform
and
Environment
10.4 Measurement Point Management
10.4.1 MP configuration
10.4.2 Task eonfiguration
10.4.3 Dynamic configuration
of
MPs and tasks
10.4.4 System
running
10.5
An
Illustrative Example on a Serial Port Driver
10.5.1 Serial
port
hardware driver
108
108
111
112
113
115

118
118
119
119
120
122
122
124
1
24
125
126
126
133
135
1
34
140
142
144
151
152
153
157
157
158
158
159
160
161

167
168
1 54
CONTENTS
ix
10.5.2 Serial port system driver
170
10.5.3 DIT maintenance for serial port system
driver 171
10.5.4 Hardware simulation terminal 172
10.6 Summary 172
11
A
Blending
System Using Multithreaded Programming
11.1 Introduction
11.2 Overall
Blending
System Configuration
11.2.1 Hardware configuration
11.2.2 Software configuration
11.2.3 Multithread- based communication
11.3 The Overall Software Design
11.3.1 Design requirements
11.3.2 Software structure
11.3.3 VxD
11.3.4 Front-end software
11.3.5 Device management module
11.3.6 User management
11.3.

7
Database management
11.4 Field Experience
and
Summary
11.4.1 Field experience
11.4.2 Summary
179
179
181
181
183
183
185
186
188
189
189
190
190
190
190
191
191
12 A Flexible Automatic Test System for Rotating Turbine
Machinery 197
12.2 Design Goals
of
FATSFTM 199
12.3 Design Strategies

of
FATSFTM 201
12.3.1 Hardware design strategy 201
12.3.2 Software design strategy 202
12.1 Introduction 198
12.4 Test Software Development Process 206
12.4.1 Requirements capture 207
12.4.2 Analysis 207
12.4.4 Programming 21 9
12.4.3 Design 21 2
12.4.5 Testing 220
12.5 Function of FATSFTM 221
12.5.1 Initialization and self-examination 221
x
CONTENTS
12.5.2
Data acquisition
12.5.3
User configuration
12.5.4
Running
status indication and real-
time/historical data analysis
12.5.5
Alarm management and post-fault
diagnosis
12.5.6
Remote test
12.5.7
Other system functions

12.6.1
On-site implementation and field
12.6.2
System benefits
12.6
Implementation and Field Experience
experience
12.7
Summary
222
222
223
224
227
228
229
229
230
232
System
13.1
Introduction
13.2
Problem Description
13.2.1
Field data acquisition devices
13.2.2
Field data acquisition workstation
13.2.3
System servers

13.2.4
Remote browsers
13.3.1
Data acquisition workstation software
13.3.2
Analysis (diagnosis) and management
13.3
Requirements Capture and Elicitation
workstation software
13.4
Analysis
13.4.1
Data-flow model
13.4.2
Entity-relationship model
13.4.3
Event-response model
13.5.1
Choice of development strategies
13.5.2
Choice
of
development environment and
13.5
Transition to Design
programming tool
13.6
Overall Design
13.6.1
Database design

13.6.2
Overall design of DAQ workstation
software
13.6.3
Overall design of the A&M workstation
software
13
An
Internet-Based Online Real- Time Condition Monitoring
239
239
241
24
1
24 2
24 3
24
3
244
24 5
24 5
246
246
24 9
250
251
252
254
259
260

263
2 79
CONTENTS
xi
13.6.4 Design
of
Web server
CGI
application
13.7 Detailed System Design and Implementation
13.7.1 Implementation
of
DAQ module
13.7.2 Implementation
of
data management
13.7.3 Communication module
13.7.4 Multitasking coordination
13.7.5 Implementation
of
Web server
module
13.8 Field Experience
13.9 Summary
14 Epilog
14.1 Middlware
14.2 Unified Modeling Language
(UML)
14.3 Agent- based software development
14.4 Agile methodologies

14.5 Summary
282
282
282
285
287
291
293
295
298
303
303
305
308
309
304
Index
31
0
This Page Intentionally Left Blank
1.1
2.1
2.2
2.3
2.4
3.1
3.2
4.1
4.2
6.1

7.1
7.2
7.3
List
of
Figures
A
typical industrial automation system.
Basic framework
of
automated measurement
system based on virtual instruments.
The structure
of
PLPGN
monitoring system.
Hardware configuration
of
the
PLPGN
monitoring system.
Software functions
of
the PLPGN monitoring
system.
Delphi’s
VCL
object hierarchy.
Virtual instrument object.
Phase tasks

in
the software life cycle.
Incremental software development model.
The generic ODBC architecture.
Software testing stages.
Software testing steps.
Test sequence
in
top-down integration testing.
2
24
25
28
29
36
38
45
47
74
75
77
67
xiii
xiv
LIST
OF
FIGURES
7.4
Test sequence
in

bottom-up testing.
78
7.5
Real-tame monitoring and control system.
80
7.6
Software maintenance.
84
9.2 Basic architecture of IMC system. 109
9.3 Database software system constitution. 120
9.1 Reconfigurable software
in
IMC system. 103
9.4
Delphi database system structure. 123
9.5 Overall structure
of
the
RSFIMC.
123
9.6
Data processing
in
RSFIMC. 1 24
9.7
MP configuration interface. 127
9.8
Task configuration interface. 127
9.9 Structure of the data processing module. 128
9.10 New variable calculation process. 131

9.11 New variable calculation data Bow. 132
9.12 Screenshot of new variable calculation interface. 133
9.13 Screenshot of status indication interface. 1
34
9.14 Message handling
an
Windows applications. 135
9.15 Information
Bow
of the real-time alarm system. 136
9.16
API
interfaces
in
MS
Excel. 137
9.1
7
Screenshot of
OLE
Automation interface. 1-41
143
9.19 Screenshot of visual database query interface. 143
supervision software. 1 54
9.18
Process of visual database query.
10.1 Overall structure of industrial reconfigurable
10.2 The architecture of
MP
management module. 156

10.3
Running
module architecture for MP management. 163
10.4 Driver loading process
in
the
MP
management
module. 165
LIST
OF
FIGURES
xv
10.5 Task scanning mechanism. 166
10.6 Task priority management mechanism. 166
10.7 Snapshot
of
the
G
UI- based operational panel. 168
10.8 Schematic diagram
of
the serial driver testing. 172
10.9 Communication mechanism
in
RS232Dru.
173
10.1
0
Communication mechanism

in
the hardware
11
.l
Flowchart
of
the automated blending system. 182
11.2 The hardware setup. 182
11.3 The overall software structure. 183
11.4 Package formats for communication between
11.5 PLC communication mechanism. 186
11.6 Data flowchart
of
the communication sub-thread. 187
11.7 The data flow between VxD and front-end software. 188
11.8 Snapshot
of
working status for the blending system.188
simulation terminal. 1
74
ICPC and PLC. 184
12.1 The framework
of
FATSFTM. 199
12.2 Hardware architecture
of
FATSFTM. 201
12.3 OOA model structure.
204
12.4 OOD model structure.

12.5 Software structure
of
FATSFTM.
205
206
12.6 Data-flow diagram.
208
12.7 Entity-relationship diagram
(ERD).
209
12.8
State transition diagram
(STD).
209
12.9 Whole-part relationship based on physical
containment. 21
3
12.10 Whole-part relationship based on physical
association. 21
3
12.11 Generalization-specialization relationship. 21
3
xvi
LIST
OF
FIGURES
12.12Subject layer
in
the OOA model.
12.13 Class structure

in
DAQ.
12.14 Directory structure
of
FATSFTM.
12.15
An
overview
of
FATSFTM functions.
12.16
IMP
for distributed data acquisition.
12.17Screen capture of Bode chart
in
the
running
12.18 Mechanism of alarm management module.
12.19 Architecture
of
fault diagnosis module.
12.20 Plant layout.
12.21 Number of machine defects detected
in
test
process at diflerent stages.
12.22 Average monthly test cost at diflerent project
stages.
13.1 Configuration
of

the Internet-based online
condition monitoring system.
13.2 Data-flow diagram
of
overall distributed condition
monitoring software.
13.3 Data-flow diagram
of
data acquisition workstation
module 1.
FATSFTM.
214
21 6
21
8
221
222
225
226
228
229
231
232
241
24
7
248
13.4 Data-flow diagram
of
data processing module 1.1.

248
13.5 Data-flow diagram of data acquisition module 1.2. 249
13.6 System entity-relationship diagram. 250
13.7 Module structure of the data acquisition
workstation. 270
13.8 Module structure of the
A&M
workstation software.280
13.9 Data flowchart
of
the in-house developed DAQ
driver. 285
13.10 Basic ODBC architecture. 286
13.11 Datagram-socket- based communication. 290
13.12 Stream-socket- based communication. 290
13.13
CGI-
based communication mechanism.
13.14 Screen capture
of
real-time waveforms
in
spectral
294
analysis. 298
List
of
Tables
3.1
9.1

Language evolution
9.2
9.3
9.4
9.5
9.6
9.7
9.8
Formula database structure
10.1
Performance comparison between the earlier
manual system and the automatic supervision
system
11.1
Event-response relationships for the automatic
blending system
11.2
User management for the automatic blending
system
Main properties and methods
in
VI
base class
Structure
of
the real-time database
Structure
of
the original historical database
Structure

of
the medium-term database
Structure
of
the processed database
Structure
of
the alarm configuration database
Structure
of
the alarm record database
39
121
128
129
129
130
130
130
133
175
1
94
195
xvii
xviii
LIST
OF
TABLES
11.3

Database management for the automatic blending
12.1
System state list
12.2
Event-response model
12.3
Partial OOA/OOD working table
12.4
OOA
Model
12.5
Databases
in
FATSFTM
13.1
System event-response model
13.2
System database
13.3
Workstation configuration table
13.4
Machine configuration table
13.5
MP configuration table
13.6
Historical data record strategy selection table
13.7
Vibration variable channel configuration table
13.8
Process variable channel configuration table

13.9
Report format selection table
13.10
Record strategy definition table
13.11
Server and A&M workstation properties table
13.12
Vibration variable real-time data table
13.13
Process variable real-time data table
13.14
Switch variable real-time data table
13.15
Medium-term historical database table for
13.16
Detailed composition
of
variables
13.17
Record configuration (cluster)
13.18
Report configuration
13.19
Current machine alarm channel table
13.20
Back-end processing software status
system
vibration variables
195
21

0
21 1
21 2
236
237
251
261
262
263
264
264
265
265
266
266
267
267
268
268
269
2 70
2 71
271
272
2 72
LISTOF
TABLES
xix
13.21
Startup/shutdown status

13.22
Server properties
13.23
Server properties
13.24
Workstation communication properties (array)
13.25
Major modules
of
A&M
workstation software
13.26
Measurement range
13.27
Frequency response
13.28
A/D
resolution
13.29
Input impedance
13.30
Measurement accuracy
13.31
Priorities
of
some major system modules
272
272
280
281

281
283
283
284
284
284
298
This Page Intentionally Left Blank
Preface
This book contains significant results from our research on industrial automa-
tion software conducted in previous years. Industrial automation software
can be used in
a
wide variety of industrial fields such
as
condition monitor-
ing and fault diagnosis for rotating machinery, public utilities monitoring,
plant process supervision, intelligent building management, and many others.
With the
fast
development of computer technology in recent years, a number
of emerging software technologies can be adopted
to
build more powerful in-
dustrial automation software. These innovative technologies include modern
software engineering, object-oriented methodology, visual/graphical program-
ming platform, graphical user interface, virtual instrumentation, component-
based system, systematic database management, dynamic data exchange, and
so
forth. All these technologies provide new opportunities to develop more

comprehensive and reliable software artifacts than before. Thus the demand
for new books in this field arises
as
the field continues to keep evolving, and
both practicing engineers and academic people are simultaneously challenged
by how to develop industrial automation software in a more effective and
efficient manner.
This book is intended to address how the industrial automation software
can be developed in a purposeful and disciplined fashion. Broadly speaking,
the whole book is divided into two parts. The first part provides the reader
with an overview of this field and a variety of fundamental design principles.
Chapter
1
introduces the modern industrial automation systems, virtual in-
strumentation technology is discussed in Chapter
2,
and the development of
xxii
PREFACE
component-based measurement systems is addressed in Chapter
3.
Chapter
4
introduces the object-oriented software engineering. User interface design
is discussed in Chapter
5.
Database management is presented in Chapter
6.
Software testing is fleshed out in Chapter
7.

In the second part
of
this
book, first an overview on the five typical applications in real-world industrial
automation software design is given in Chapter
8.
All
of
these case studies
are highly representative
so
that they can serve
as
useful references when the
reader wants to construct their own software systems. Chapter
9
represents an
ob ject-oriented reconfigurable software for industrial measurement and con-
trol. Because the reconfiguration concept is used throughout the software de-
velopment process, the obtained software turns out to be highly flexible and
able to accommodate different industrial application requirements. Chapter
10
focuses on the flexible measurement point management in the industrial
measurement and control system. It provides the basis for building industrial
automation systems with high configuration capability. A VxD-based auto-
matic blending system is discussed in Chapter
11.
To
meet the communication
speed in the presence of

a
large volume of data, multithreaded programming
technique is used
to
avoid the data transmission bottleneck. Rotating turbine
machinery is widely used in various industrial environments, and its design
quality
is
of particular importance. Thus in Chapter
12,
an automatic test
system for turbine machinery is discussed, which is developed for ensuring
the machine quality by automatic testing. Networked industrial systems are
the development trend for different industry applications. In Chapter
13,
an
Internet-based online real-time condition monitoring system
is
discussed. It is
developed based on the concept of modular design and functional decomposi-
tion. In the final chapter, the emerging technologies for building more power-
ful industrial automation software are introduced, which include middleware,
Unified Modeling Language (UML), agent-based software development, and
agile methodologies.
The authors welcome all the comments and suggestions regarding this book.
All the correspondence may be addressed to the first author
at
1.f.wangQieee.org.
Thank you for reading the book, and
I

look forward
to
hearing from you.
L.
F.
WANG
College Station, Tezas
K.
C.
TAN
NUS,
Singapore

×