- •24.3 HYDRAULICS
- •24.4 OTHER SYSTEMS
- •24.5 SUMMARY
- •24.6 PRACTICE PROBLEMS
- •24.7 PRACTICE PROBLEM SOLUTIONS
- •24.8 ASSIGNMENT PROBLEMS
- •25. CONTINUOUS CONTROL
- •25.1 INTRODUCTION
- •25.2 CONTROL OF LOGICAL ACTUATOR SYSTEMS
- •25.3 CONTROL OF CONTINUOUS ACTUATOR SYSTEMS
- •25.3.1 Block Diagrams
- •25.3.2 Feedback Control Systems
- •25.3.3 Proportional Controllers
- •25.3.4 PID Control Systems
- •25.4 DESIGN CASES
- •25.4.1 Oven Temperature Control
- •25.4.2 Water Tank Level Control
- •25.5 SUMMARY
- •25.6 PRACTICE PROBLEMS
- •25.7 PRACTICE PROBLEM SOLUTIONS
- •25.8 ASSIGNMENT PROBLEMS
- •26. FUZZY LOGIC
- •26.1 INTRODUCTION
- •26.2 COMMERCIAL CONTROLLERS
- •26.3 REFERENCES
- •26.4 SUMMARY
- •26.5 PRACTICE PROBLEMS
- •26.6 PRACTICE PROBLEM SOLUTIONS
- •26.7 ASSIGNMENT PROBLEMS
- •27. SERIAL COMMUNICATION
- •27.1 INTRODUCTION
- •27.2 SERIAL COMMUNICATIONS
- •27.2.1.1 - ASCII Functions
- •27.3 PARALLEL COMMUNICATIONS
- •27.4 DESIGN CASES
- •27.4.1 PLC Interface To a Robot
- •27.5 SUMMARY
- •27.6 PRACTICE PROBLEMS
- •27.7 PRACTICE PROBLEM SOLUTIONS
- •27.8 ASSIGNMENT PROBLEMS
- •28. NETWORKING
- •28.1 INTRODUCTION
- •28.1.1 Topology
- •28.1.2 OSI Network Model
- •28.1.3 Networking Hardware
- •28.1.4 Control Network Issues
- •28.2 NETWORK STANDARDS
- •28.2.1 Devicenet
- •28.2.2 CANbus
- •28.2.3 Controlnet
- •28.2.4 Ethernet
- •28.2.5 Profibus
- •28.2.6 Sercos
- •28.3 PROPRIETARY NETWORKS
- •28.3.1 Data Highway
- •28.4 NETWORK COMPARISONS
- •28.5 DESIGN CASES
- •28.5.1 Devicenet
- •28.6 SUMMARY
- •28.7 PRACTICE PROBLEMS
- •28.8 PRACTICE PROBLEM SOLUTIONS
- •28.9 ASSIGNMENT PROBLEMS
- •29. INTERNET
- •29.1 INTRODUCTION
- •29.1.1 Computer Addresses
- •29.1.2 Phone Lines
- •29.1.3 Mail Transfer Protocols
- •29.1.4 FTP - File Transfer Protocol
- •29.1.5 HTTP - Hypertext Transfer Protocol
- •29.1.6 Novell
- •29.1.7 Security
- •29.1.7.1 - Firewall
- •29.1.7.2 - IP Masquerading
- •29.1.8 HTML - Hyper Text Markup Language
- •29.1.9 URLs
- •29.1.10 Encryption
- •29.1.11 Compression
- •29.1.12 Clients and Servers
- •29.1.13 Java
- •29.1.14 Javascript
- •29.1.16 ActiveX
- •29.1.17 Graphics
- •29.2 DESIGN CASES
- •29.2.1 Remote Monitoring System
- •29.3 SUMMARY
- •29.4 PRACTICE PROBLEMS
- •29.5 PRACTICE PROBLEM SOLUTIONS
- •29.6 ASSIGNMENT PROBLEMS
- •30. HUMAN MACHINE INTERFACES (HMI)
- •30.1 INTRODUCTION
- •30.2 HMI/MMI DESIGN
- •30.3 DESIGN CASES
- •30.4 SUMMARY
- •30.5 PRACTICE PROBLEMS
- •30.6 PRACTICE PROBLEM SOLUTIONS
- •30.7 ASSIGNMENT PROBLEMS
- •31. ELECTRICAL DESIGN AND CONSTRUCTION
- •31.1 INTRODUCTION
- •31.2 ELECTRICAL WIRING DIAGRAMS
- •31.2.1 Selecting Voltages
- •31.2.2 Grounding
- •31.2.3 Wiring
- •31.2.4 Suppressors
- •31.2.5 PLC Enclosures
- •31.2.6 Wire and Cable Grouping
- •31.3 FAIL-SAFE DESIGN
- •31.4 SAFETY RULES SUMMARY
- •31.5 REFERENCES
- •31.6 SUMMARY
- •31.7 PRACTICE PROBLEMS
- •31.8 PRACTICE PROBLEM SOLUTIONS
- •31.9 ASSIGNMENT PROBLEMS
- •32. SOFTWARE ENGINEERING
- •32.1 INTRODUCTION
- •32.1.1 Fail Safe Design
- •32.2 DEBUGGING
- •32.2.1 Troubleshooting
- •32.2.2 Forcing
- •32.3 PROCESS MODELLING
- •32.4 PROGRAMMING FOR LARGE SYSTEMS
- •32.4.1 Developing a Program Structure
- •32.4.2 Program Verification and Simulation
- •32.5 DOCUMENTATION
- •32.6 COMMISIONING
- •32.7 REFERENCES
- •32.8 SUMMARY
- •32.9 PRACTICE PROBLEMS
- •32.10 PRACTICE PROBLEM SOLUTIONS
- •32.11 ASSIGNMENT PROBLEMS
- •33. SELECTING A PLC
- •33.1 INTRODUCTION
- •33.2 SPECIAL I/O MODULES
- •33.3 SUMMARY
- •33.4 PRACTICE PROBLEMS
- •33.5 PRACTICE PROBLEM SOLUTIONS
- •33.6 ASSIGNMENT PROBLEMS
- •34. FUNCTION REFERENCE
- •34.1 FUNCTION DESCRIPTIONS
- •34.1.1 General Functions
- •34.1.2 Program Control
- •34.1.3 Timers and Counters
- •34.1.4 Compare
- •34.1.5 Calculation and Conversion
- •34.1.6 Logical
- •34.1.7 Move
- •34.1.8 File
- •34.1.10 Program Control
- •34.1.11 Advanced Input/Output
- •34.1.12 String
- •34.2 DATA TYPES
plc network - 28.16
implemented separately and then connected using the SERCOS network. Many vendors offer cards that allow PLCs to act as clients and/or motion controllers.
•Deterministic with response times as small as a few nanoseconds
•Data rates of 2, 4, 8 and 16 Mbaud
•Documented with IEC 61491 in 1995 and 2002
•Uses a fiber optic rings, RS-485 and buses
28.3PROPRIETARY NETWORKS
28.3.1Data Highway
Allen-Bradley has developed the Data Highway II (DH+) network for passing data and programs between PLCs and to computers. This bus network allows up to 64 PLCs to be connected with a single twisted pair in a shielded cable. Token passing is used to control traffic on the network. Computers can also be connected to the DH+ network, with a network card to download programs and monitor the PLC. The network will support data rates of 57.6Kbps and 230 Kbps
The DH+ basic data frame is shown in Figure 28.12. The frame is byte oriented. The first byte is the DLE or delimiter byte, which is always $10. When this byte is received the PLC will interpret the next byte as a command. The SOH identifies the message as a DH+ message. The next byte indicates the destination station - each node one the network must have a unique number. This is followed by the DLE and STX bytes that identify the start of the data. The data follows, and its’ length is determined by the command type - this will be discussed later. This is then followed by a DLE and ETX pair that mark the end of the message. The last byte transmitted is a checksum to determine the correctness of the message.
plc network - 28.17
1 byte |
DLE = 10H |
|
header fields |
|
|
1 byte |
SOH = 01H |
|
|
1 byte |
STN - the destination number |
|
|
1 byte |
DLE = 10H |
|
start fields |
|
|
1 byte |
STX = 02H |
|
data |
|
|
|
|
1 byte |
DLE = 10H |
|
termination fields |
|
|
1 byte |
ETX = 03H |
|
|
1 byte |
block check - a 2s compliment checksum of the DATA and STN values |
|
|
Figure 28.12 The Basic DH+ Data Frame
The general structure for the data is shown in Figure 28.13. This packet will change for different commands. The first two bytes indicate the destination, DST, and source, SRC, for the message. The next byte is the command, CMD, which will determine the action to be taken. Sometimes, the function, FNC, will be needed to modify the command. The transaction, TNS, field is a unique message identifier. The two address, ADDR, bytes identify a target memory location. The DATA fields contain the information to be passed. Finally, the SIZE of the data field is transmitted.
plc network - 28.18
|
1 byte |
DST - destination node for the message |
|
|
|
|
1 byte |
SRC - the node that sent the message |
|
|
|
|
1 byte |
CMD - network command - sometime FNC is required |
|
|
|
|
1 byte |
STS - message send/receive status |
|
|
|
|
2 byte |
TNS - transaction field (a unique message ID) |
|
|
|
optional |
1 byte |
FNC may be required with some CMD values |
|
|
|
optional |
2 byte |
ADDR - a memory location |
|
|
|
optional |
variable |
DATA - a variable length set of data |
|
|
|
optional |
1 byte |
SIZE - size of a data field |
|
|
|
Figure 28.13 Data Filed Values
Examples of commands are shown in Figure 28.14. These focus on moving memory and status information between the PLC, and remote programming software, and other PLCs. More details can be found in the Allen-Bradley DH+ manuals.
plc network - 28.19
CMD |
FNC |
Description |
|
|
|
|
|
00 |
|
Protected write |
|
01 |
|
Unprotected read |
|
02 |
|
Protected bit write |
|
05 |
|
Unprotected bit write |
|
06 |
00 |
Echo |
|
06 |
01 |
Read diagnostic counters |
|
06 |
02 |
Set variables |
|
06 |
03 |
Diagnostic status |
|
06 |
04 |
Set timeout |
|
06 |
05 |
Set NAKs |
|
06 |
06 |
Set ENQs |
|
06 |
07 |
Read diagnostic counters |
|
08 |
|
Unprotected write |
|
0F |
00 |
Word range write |
|
0F |
01 |
Word range read |
|
0F |
02 |
Bit write |
|
0F |
11 |
Get edit resource |
|
0F |
17 |
Read bytes physical |
|
0F |
18 |
Write bits physical |
|
0F |
26 |
Read-modify-write |
|
0F |
29 |
Read section size |
|
0F |
3A |
Set CPU mode |
|
0F |
41 |
Disable forces |
|
0F |
50 |
Download all request |
|
0F |
52 |
Download completed |
|
0F |
53 |
Upload all request |
|
0F |
55 |
Upload completed |
|
0F |
57 |
Initialize memory |
|
0F |
5E |
Modify PLC-2 compatibility file |
|
0F |
67 |
typed write |
|
0F |
68 |
typed read |
|
0F |
A2 |
Protected logical read - 3 address fields |
|
0F |
AA |
Protected logical write - 3 addr. fields |
|
|
|
|
|
Figure 28.14 DH+ Commands for a PLC-5 (all numbers are hexadecimal)
The ladder logic in Figure 28.15 can be used to copy data from the memory of one PLC to another. Unlike other networking schemes, there are no login procedures. In this example the first MSG instruction will write the message from the local memory N7:20 - N7:39 to the remote PLC-5 (node 2) into its memory from N7:40 to N7:59. The second