book
18:8
Contents
xi xiii 1
3 3 4 8 11 13 17 20 24 25 27 27 34 35 39
1.16 Passing Data by Reference 1.17 File I/O 1.18 The Simulated Data Acquisition VI 1.19 Loop Timing 1.20 The Data Over Limit sub-VI 1.21 The Create Log String sub-VI 1.22 Absolute and Relative File Paths 1.23 The Append To Log File Sub-VI 1.24 Property Nodes and Invoke Nodes 1.25 Developing the Simulated Data Acquisition VI 1.26 Elements of LabVIEW Style
42 43 48 49 51 52 53 54 56 57 59
1.10 The Move Or Delete Sub-VI 1.11 The Right File Type Sub-VI 1.12 Loops 1.13 Shift Registers and Feedback Nodes 1.14 Error Handling 1.15 Developing the Clean Up Folder VI
2 Functional Specications
2.1 The Multitest VI 2.2 State Transition Diagram for the Multitest VI 2.3 The Car Wash Controller 2.4 State Transition Diagrams for the Car Wash Controller
61
61 62 63 66 v
Bress
book
18:8
vi
Contents
3 Problem Set 1
3.1 Car Wash Controller Exercises 3.3 Security System Controller Exercises 3.4 Boiler Controller Exercises
68
68
123
7 Problem Set 2
7.1 Car Wash 2 Controller Exercises 7.2 Boiler Controller Exercises 7.3 Trafc Light Controller Exercises 7.4 Security System Controller Exercises
125
125 126 127 129
90
90 92 96 97
5 Action Engines
5.1 Anatomy of an Action Engine 5.3 Example: Creating a Counter 5.4 The State Variable Method
106
106 110 111
115
116 116
8.10 Develop the Wait State 8.11 Develop the Lock Selector State 8.12 Develop the Car Wash States
6.3 Outputs of the Car Wash Timer 117 6.4 Icon and Front Panel of the Car Wash Timer 117 6.5 State Variables of the Car Wash Timer 6.6 The Timecheck Action of the Car Wash Timer 6.7 The Reset Timer Function of the Car Wash Timer 6.8 The Kernel of the Car Wash Timer 118 118 120
9 Problem Set 3
9.1 9.2 Trafc Light Controller Exercises Security System Controller Exercises
152
152 152
121
Bress
book
18:8
Contents 9.3 9.4 Boiler Controller Exercises Car Wash 2 Exercises 166 166
vii
197
199 201 206
167
168 168 170 171 175 175
210
210 212 212 214 217
178
178 180
16 Problem Set 5
16.1 Trafc Light Controller Exercises 16.2 Security System Controller Exercises 16.3 Boiler Controller Exercises 16.4 Car Wash 2 Exercises 16.5 DAQ State Machine Exercises
224
224 224 225 225 226
12 Problem Set 4
12.1 Trafc Light Controller Exercises 12.2 Security System Controller Exercises 12.3 Boiler Controller Exercises 12.4 Car Wash 2 Exercises
182
182 182 182 183
184
185 185 188 191
231
232 234 235 236 237 238
Bress
book
18:8
viii
Contents
22.4 Security System Controller Exercises 22.5 Boiler Controller Exercises 22.6 Car Wash 2 Controller Exercises
23 Data Encapsulation
23.1 LabVIEW Objects and Classes
298
302
24 Problem Set 9
24.1 Trafc Light Controller Exercises 24.2 Boiler Controller Exercises 24.3 Car Wash 2 Controller Exercises
313
313 313 314
316
318 320 321 324 327 329 331 332 333 338
274
275
21.2 Developing Parsing Routines for the Car Wash Controller 276 21.3 Developing a Generic Cycle State 21.4 Implementing the Car Wash Controller with Arguments 278 281
25.8
22 Problem Set 8
22.1 DAQ State Machine Exercises 22.2 Car Wash Controller Exercises 22.3 Trafc Light Controller Exercises
287
287 287 288
25.9
25.10 The Factory Method 25.12 The Car Wash Controller with Inheritance and Composition 25.13 Why Bother with Classes?
345 347
Bress
book
18:8
Contents
ix
26 Problem Set 10
26.1 Car Wash 2 Exercises 26.2 Trafc Light Controller Exercises 26.3 Boiler Controller Exercises
348
348 351 353
411
412 414
368
369 371 372 377 383 385
30 Problem Set 11
30.1 Security System Controller Exercises 30.2 Car Wash 2 Exercises
429
429 437
31 Wrapping It Up
31.1 The Classic State Machine Queued State Machine State Machines with Arguments State Machines with Classes ProducerConsumer State Machines Coupling Selecting an Architecture How Can You Improve? 31.2 31.3 31.4
438
438 439 439 440 440 440 441 442 443
385
387
393 397
400 401
A Sample CLD Exam Trafc Light Controller B Sample CLD Exam Security System
444 446
Bress
book
18:8
Contents
C Sample CLD Exam Boiler Controller D Sample CLD Exam Car Wash Controller 2 E Sample CLD Exam Sprinkler Controller F Sample CLD Exam ATM Controller G Problem Set 1 Solutions H Problem Set 2 Solutions I Problem Set 3 Solutions
J Problem Set 4 Solutions 449 454 458 463 469 493 502 K Problem Set 5 Solutions L Problem Set 6 Solutions M Problem Set 7 Solutions N Problem Set 8 Solutions O Problem Set 9 Solutions P Problem Set 10 Solutions Q Problem Set 11 Solutions Index