- •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 pid - 25.20
|
BT9:0/DN BT9:1/DN |
|
|
|
|||||
|
|
SUB |
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
SourceA N7:80 |
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
SourceB N7:42 |
|
|
|
|
|
|
|
|
|
Dest N7:81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DIV |
|
|
|
|
|
|
|
|
|
SourceA N7:81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SourceB 2 |
|
|
|
|
|
|
|
|
|
Dest N7:60 |
|
|
|
|
|
|
|
|
|
|
|
|
BT9:2/EN |
Block Transfer Write |
|||||||
|
Module Type Generic Block Transfer |
||||||||
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
Rack 000 |
||
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
Group 1 |
||
|
|
|
|
|
|
|
Module 0 |
||
|
|
|
|
|
|
|
Control Block BT9:2 |
||
|
|
|
|
|
|
|
Data File N9:60 |
||
|
|
|
|
|
|
|
Length 13 |
||
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
Continuous No |
||
|
|
|
|
|
|
|
|
|
|
Figure 25.21 A Water Tank Level Control Program
25.5SUMMARY
•Negative feedback controllers make a continuous system stable.
•When controlling a continuous system with a logical actuator set points can be used.
•Block diagrams can be used to describe controlled systems.
•Block diagrams can be converted to equations for analysis.
•Continuous actuator systems can use P, PI, PD, PID controllers.
25.6PRACTICE PROBLEMS
1.What is the advantage of feedback in a control system?
2.Can PID control solve problems of inaccuracy in a machine?
3.If a control system should respond to long term errors, but not respond to sudden changes, what type of control equation should be used?
plc pid - 25.21
4.Develop a ladder logic program that implements a PID controller using the discrete equation.
5.Why is logical control so popular when continuous control allows more precision?
6.Design the complete ladder logic for a control system that implements the control equation below for motor speed control. Assume that the motor speed is read from a tachometer, into an analog input card in rack 0, slot 0, input 1. The tachometer voltage will be between 0 and 8Vdc, for speeds between 0 and 1000rpm. The voltage output to drive the motor controller is output from an analog output card in rack 0, slot 1, output 1. Assume the desired RPM is stored in N7:0.
Vmotor = ( rpmmoter – rpmdesired) 0.02154
where,
Vmotor = The voltage output to the motor rpmmoter = The RPM of the motor rpmdesired = The desired RPM of the motor
7.Write a ladder logic control program to keep a water tank at a given height. The control system will be active after the Start button is pushed, but it can be stopped by a Stop button. The water height in the tank is measured with an ultrasonic sensor that will output 10V at 1m depth, and 1V at 10cm depth. A solenoid controlled valve will open and close to allow water to enter. The water height setpoint is put in N7:0, in centimeters, and the actual height should be +/-5cm.
8.Implement a program that will input (from I:000) an analog voltage Vi and output (to O:001) half that voltage, Vi/2. If the input voltage is between 3V and 5V the output O:002/0 will be turned on. Include start and stop buttons that will force the output voltage to zero when not running. Do not show the bits that would be set in memory, but list the settings that should be made for the cards (e.g. voltage range).
25.7 PRACTICE PROBLEM SOLUTIONS
1.Feedback control, more specifically negative feedback, can improve the stability and accuracy of a control system.
2.A PID controller will compare a setpoint and output variable. If there is a persistent error, the integral part of the controller will adjust the output to reduce long term errors.
3.A PI controller
4.
Assume the values:
update
plc pid - 25.22
N7:0 = Analog input value
N7:1 = Analog output value
N7:2 = Setpoint
MOV
Source F8:4
Dest F8:5
MOV
Source F8:3
Dest F8:4
SUB
Source A N7:2
Source B N7:0
Dest F8:3
F8:0 = Kp
F8:1 = Kd
F8:2 = Ki F8:3 = ei F8:4 = ei-1 F8:5 = ei-2
F8:6 = T (Scan Time)
CPT |
|
Dest F8:10 |
|
Expression |
"F8:0 + F8:2 * F8:6 + F8:1 | F8:6" |
|
|
|
|
CPT |
|
Dest F8:11 |
|
Expression |
"-F8:0 - 2 * F8:1 | F8:6" |
|
|
|
|
CPT |
|
Dest F8:12 |
|
Expression |
"F8:1 | F8:6" |
|
|
CPT
Dest N7:1
Expression
"N7:1+F8:3*F8:10+F8:4*F8:11+F8:5*F8:12"
5.Logical control is more popular because the system is more controllable. This means either happen, or they don’t happen. If a system requires a continuous control system then it will tend to be unstable, and even when controlled a precise values can be hard to obtain. The need for control also implies that the system requires some accuracy, thus the process will tend to vary, and be a source of quality control problems.
plc pid - 25.23
6.
FS
BT9:1/EN BT9:0/EN
BT9:2/EN
BT9:1/DN
BTW
Rack 0
Group 0
Module 0
Control Block BT9:0
Data N7:0
Length 37
Continuous No
BTR
Rack 0
Group 0
Module 0
Control Block BT9:1
Data N7:37
Length 20
Continuous No
BTW
Rack 0
Group 1
Module 0
Control Block BT9:2
Data N7:57
Length 13
Continuous No
CPT
Dest N7:57
Expression
"0.02154*(N7:41-F8:0)"
plc pid - 25.24
7.
S2:1/15 - first scan |
|
|||
BTW |
||||
|
|
|
||
|
|
|
Rack: 0 |
|
|
|
|
||
|
|
|
Group: 0 |
|
|
|
|
Module: 0 |
|
|
|
|
BT Array: BT9:0 |
|
|
|
|
Data File: N7:1 |
|
|
|
|
Length: 37 |
|
|
|
|
Continuous: no |
|
|
|
|
|
BT9:0/EN |
BT9:1/EN |
BTR |
|||||
Rack: 0 |
|||||||
|
|
|
|
|
|
||
|
|
|
|
|
|
Group: 0 |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
Module: 0 |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
BT Array: BT9:1 |
|
|
|
|
|
|
|
Data File: N7:38 |
|
|
|
|
|
|
|
Length: 20 |
|
|
|
|
|
|
|
Continuous: no |
|
|
|
|
|
|
|
|
START |
ESTOP |
B3/0 - ON
Note: Assume that a 12 bit analog input card is set for 0 to 10V input. Thus giving a range of 0V(0)
BT9:0/DN BT9:1/DN
GRT
SourceA F8:2
SourceB F8:1
LES
SourceA F8:2
SourceB F8:0
B3/0 - ON
ADD
Source A N7:0
Source B 5
Dest F8:0
SUB
Source A N7:0
Source B 5
Dest F8:1
DIV
Source A N7:43
Source B 409.5
Dest F8:2
U B3/1 - VALVE
L B3/1 - VALVE
B3/0 - ON |
B3/1 - VALVE |
O:002/0 |
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
VALVE |
|
|
|
|
|
|
plc pid - 25.25
8.
BTW
FS Rack 0
Group 0
Module 0
Control Block BT9:0
Data N7:0
Length 37
Continuous No
|
|
|
|
|
|
start |
|
|
|
|
|
|
stop |
active |
|
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
active |
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BT9:1/EN |
BT9:0/EN |
BTR |
||||||||||||
|
Rack 0 |
||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Group 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Control Block BT9:1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Data N7:37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Length 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Continuous No |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BT9:1/EN |
|
|
|
|
|
|
|
BTW |
||||||
|
|
|
|
|
|
|
|
Rack 0 |
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Group 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Control Block BT9:2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Data N7:57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Length 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Continuous No |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BT9:1/DN |
|
|
|
DIV |
||||
|
|
|
|
|
sourceA N7:41 |
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sourceB 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dest N7:57 |
|
|
|
|
|
|
|
active |
|
||
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
MOV |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
source 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dest N7:57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
active |
|
LIM |
|
|
|
|
||||
|
upper 2048 |
|
|
|
O:002/0 |
|||||
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
lower 1229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
test N7:41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assume:
12 bit input and output
2s complement values -10V to 10V range constant update
no filtering
scale from -4095 to 4095
3V → |
3 |
|
|
----- |
4095 |
= 1229 |
|
10 |
|||
5V → |
5 |
|
|
----- |
4095 |
= 2048 |
|
10 |