- •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 serial - 27.9
To write to other serial ports the message function in Figure 27.7 must be used. In this example the message block will become active when A goes true. It will use the message parameters stored in message memory MG9:0. The parameters set indicate that the message is to Write data stored at N7:50, N7:51 and N7:52. This will write the ASCII string ABC to the serial port.
A
MSG
Control Block MG9:0
Memory Values: |
Read/Write |
Write |
|
||
|
Data Table |
N7:50 |
|
Size |
3 |
setup stored |
Local/Remote |
Local |
Remote Station |
N/A |
|
in MG9:0 |
Link ID |
N/A |
|
Remote Link type |
N/A |
|
Local Node Addr. |
20 |
|
Processor Type |
ASCII |
|
Dest. Addr. |
N/A |
Data Stored in memory |
N7:50 |
65 |
|
N7:51 |
66 |
|
N7:52 |
67 |
Figure 27.7 Message Function for Serial Communication
27.2.1.1 - ASCII Functions
ASCII functions allow programs to manipulate strings in the memory of the PLC. The basic functions are listed in Figure 27.8.
plc serial - 27.10
ABL(channel, control)- reports the number of ASCII characters including line endings ACB(channel, control) - reports the numbers of ASCII characters in buffer ACI(string, dest) - convert ASCII string to integer
ACN(string, string,dest) - concatenate strings
AEX(string, start, length, dest) - this will cut a segment of a string out of a larger string AIC(integer, string) - convert an integer to a string
AHL(channel, mask, mask, control) - does data handshaking
ARD(channel, dest, control, length) - will get characters from the ASCII buffer ARL(channel, dest, control, length) - will get characters from an ASCII buffer ASC(string, start, string, result) - this will look for one string inside another ASR(string, string) - compares two strings
AWT(channel, string, control, length) - will write characters to an ASCII output
Figure 27.8 PLC-5 ASCII Functions
In the example in Figure 27.9, the characters "Hi " are placed into string memory ST10:1. The ACB function checks to see how many characters have been received, and are waiting in channel 0. When the number of characters equals 2, the ARD (Ascii ReaD) function will then copy those characters into memory ST10:0, and bit R6:0/DN will be set. This done bit will cause the two characters to be concatenated to the "Hi ", and the result written back to the serial port. So, if I typed in my initial "HJ", I would get the response "HI HJ".
plc serial - 27.11
R6:1/EN
GEQ
Source A R6:1.POS
Source B 2
R6:0/DN
ST10:1 = "HI "
Figure 27.9 An ASCII String Example
ACB
Channel 0
Control R6:1
ARL
Channel 0
Dest ST10:0
Control R6:0
Length 2
ACN
StringA ST10:1
StringB ST10:0
Dest ST10:2
AWT
Channel 0
String ST10:2
Length 7
The ASCII functions can also be used to support simple number conversions. The example in Figure 27.10 will convert the strings in ST9:10 and ST9:11 to integers, add the numbers, and store the result as a string in ST9:12.
plc serial - 27.12
AIC
String ST9:10
Dest N7:0
AIC
String ST9:11
Dest N7:1
ADD
SourceA N7:0
SourceB N7:1
Dest N7:2
ACI
Source N7:2
String ST9:12
Figure 27.10 A String to Integer Conversion Example
Many of the remaining string functions are illustrated in Figure 27.11. When A is true the ABL and ACB functions will check for characters that have arrived on channel 1, but have not been retrieved with an ARD function. If the characters "ABC<CR>" have arrived (<CR> is an ASCII carriage return) the ACB would count the three characters, and store the value in R6:0.POS. The ABL function would also count the <CR> and store a value of four in R6:1.POS. If B is true, and the string in ST9:0 is "ABCDEFGHIJKL", then "EF" will be stored in ST9:1. The last function will compare the strings in ST9:2 and ST9:3, and if they are equal, output O:001/2 will be turned on.