- •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.15
part waiting |
box full |
feed part
part waiting
ONS |
|
AWT |
|
Bit B3:0 |
|
|
Channel 0 |
|
|
||
|
|
|
String ST10:0 |
|
|
|
Length 6 |
ST10:0 = "pickup"
Figure 27.13 A Box Loading System
27.5SUMMARY
•Serial communications pass data one bit at a time.
•RS-232 communications use voltage levels for short distances. A variety of communications cables and settings were discussed.
•ASCII functions are available of PLCs making serial communications possible.
27.6PRACTICE PROBLEMS
1.Describe what the bits would be when an A (ASCII 65) is transmitted in an RS-232 interface with 8 data bits, even parity and 1 stop bit.
2.Divide the string in ST10:0 by the string in ST10:1 and store the results in ST10:2. Check for a divide by zero error.
ST10:0 “100”
ST10:1 “10”
ST10:2
3.How long would it take to transmit an ASCII file over a serial line with 8 data bits, no parity, 1 stop bit? What if the data were 7 bits long?
4.Write a number guessing program that will allow a user to enter a number on a terminal that transmits it to a PLC where it is compared to a value in N7:0. If the guess is above "Hi" will be returned. If below "Lo" will be returned. When it matches "ON" will be returned.
plc serial - 27.16
5.Write a program that will convert a numerical value stored in F8:0 and write it out the RS-232 output on a PLC-5 processor.
27.7 PRACTICE PROBLEM SOLUTIONS
1.
before |
start |
data |
parity |
stop |
2.
NEQ
Source A 0
Source B N7:1
ACI
Source ST10:0
Dest N7:0
ACI
Source ST10:1
Dest N7:1
DIV
Source A N7:0
Source B N7:1
Dest N7:2
AIC
Source N7:2
Dest ST10:2
3.If we assume 9600 baud, for (1start+8data+0parity+1stop)=10 bits/byte we get 960 bytes per second. If there are only 7 data bits per byte this becomes 9600/9 = 1067 bytes per second.
plc serial - 27.17
4.
|
|
R6:4/EN |
|
|
ACB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Channel 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
Control R6:4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARL |
|
|
EQU |
|
|
||
|
|
|
|
Channel 0 |
||
|
|
SourceA R6:4.POS |
|
|
||
|
|
|
|
Dest ST9:0 |
||
|
|
Source B 2 |
|
|
||
|
|
|
|
Control R6:0 |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
Length 3 |
R6:0/DN |
|
|
||||
|
|
|
||||
|
|
|
||||
|
|
ACI |
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
Source ST9:0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
Dest N7:1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LES |
|
AWT |
|
|
|
|
Source A N7:1 |
|
Channel 0 |
|
|
|
|
|
||
|
|
|
|
Source B N7:0 |
|
Source ST9:1 |
|
|
|
|
|
|
Control R6:1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
Length 2 |
|
|
|
|
|
|
|
|
|
|
|
EQ |
|
AWT |
ST9:1="Lo" |
|
Source A N7:1 |
|
Channel 0 |
||
|
|
|||||
|
Source B N7:0 |
|
Source ST9:2 |
|||
ST9:2="ON" |
|
|
||||
|
|
|
Control R6:2 |
|||
ST9:3="Hi" |
|
|
|
|||
|
|
|
Length 2 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GRT |
|
AWT |
|
|
|
|
Source A N7:1 |
|
Channel 0 |
|
|
|
|
|
||
|
|
|
|
Source B N7:0 |
|
Source ST9:3 |
|
|
|
|
|
||
|
|
|
|
|
|
Control R6:3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
Length 2 |
plc serial - 27.18
5.
R6:0/EN
MOV
Source F8:0
Dest N7:0
AIC
Source N7:0
Dest ST9:0
AWT |
|
ASCII WRITE |
|
Channel |
0 |
Source |
ST9:0 |
Control |
R6:0 |
String Length |
5 |
Characters Sent |
|
27.8 ASSIGNMENT PROBLEMS
1.Describe an application of ASCII communications.
2.Write a ladder logic program to output an ASCII warning message on channel 1 when the value in N7:0 is less than 10, or greater than 20. The message should be "out of temp range".
3.Write a program that will send an ASCII message every minute. The message should begin with the word ‘count’, followed by a number. The number will be 1 on the first scan of the PLC, and increment once each minute.
4.A PLC will be controlled by ASCII commands received through the RS-232C communications port. The commands will cause the PLC to move between the states shown in the state dia-
plc serial - 27.19
gram. Implement the ladder logic.
FS
“start”
IDLE
“estop”
ACTIVE
“reset”
FAULT |
“error” |
|
5.A program is to be written to control a robot through an RS-232c interface. The robot has already been programmed to respond to two ASCII strings. When the robot receives the string ‘start’ it will move a part from a feeder to a screw machine. When the robot receives an ‘idle’ command it will become inactive (safe). The PLC has ‘start’ and ‘end’ inputs to control the process. The PLC also has two other inputs that indicate when the parts feeder has parts available (‘part present’) and when the screw machine is done (‘machine idle’). The ‘start’ button will start a cycle where the robot repeatedly loads parts into the screw machine whenever the ‘machine idle’ input is true. If the ‘part present’ sensor is off (i.e., no parts), or the ‘end’ input is off (a stop requested), the screw machine will be allowed to finish, but then the process will stop and the robot will be sent the idle command. Use a structured design method (e.g., state diagrams) to develop a complete ladder logic program to perform the task.
6.A PLC-5 is connected to a scale that measures weights and then sends an ASCII string. The string format is ‘XXXX.XX’. So a weight of 29.9 grams would result in a string of ‘0029.90’. The PLC is to read the string and then check to see if the weight is between 18.23 and 18.95 grams. If it is not then an error output light should be set until a reset button is pushed.