3
Design Pattern for Machine Vision
Applications
A LabVIEW
design pattern
is a particular block diagram coding style that has
emerged over time and has been “vetted” by many developers as a useful
way to develop a broad range of specific applications. Design patterns range
from the very simple to the very complex, but all design patterns provide a
systematic way to transform your concept into a functional and reliable software
application.
This chapter introduces the popular
state machine
design pattern, especially
the “Queued State Machine” that serves as the foundation of the “Machine
Vision App” template LabVIEW project from which all of the projects in this
lab manual may be developed.
3.1
State Machines
The excellent textbook
Effective LabVIEW Programming
by Thomas J. Bress
presents a wide range of design patterns based on the
state machine
. A
state
em-
bodies a specific action such as incrementing a counter value, fetching the next
frame from the webcam, analyzing the image to search for a barcode, saving an
image to disk, and so on. The state “machine” moves from one state to the next
in either an unconditional fashion (State C always follows State B) or condition-
ally (go to State C if a particular front-panel button is pressed, otherwise go to
State D). See
for a more complete discussion of state diagrams.
This “classic state machine” design pattern uses a while-loop, a shift register
http://www.ntspress.com/publications/effective-labview-programming
NTS Press, 2013.
(10:06)
Содержание NI myRIO
Страница 1: ...Ed Doering NI myRIO Vision Essentials Guide...
Страница 2: ......
Страница 11: ...Part I Machine Vision Fundamentals...
Страница 12: ......
Страница 31: ...Part II Introductory Machine Vision Projects...
Страница 32: ......
Страница 38: ...32 CHAPTER 4 CAMERA SETUP...
Страница 44: ...38 CHAPTER 5 STEREO VISION...
Страница 61: ...Part III Machine Vision Application Projects...
Страница 62: ......
Страница 72: ...66 CHAPTER 8 COIN COUNTER...
Страница 85: ...CHAPTER 10 KEYED OPTICAL LOCK 79 Figure 10 3 Typical expected results for the Geometric Matching step...
Страница 86: ...80 CHAPTER 10 KEYED OPTICAL LOCK...
Страница 92: ...86 CHAPTER 11 DMM TEST STAND...
Страница 134: ...128 CHAPTER 17 MARBLE SORTER...
Страница 135: ...Part IV Appendices...
Страница 136: ......
Страница 143: ...B MXPandMSPConnectorDiagrams Figure B 1 MXP myRIO eXpansion Port connector diagram...
Страница 144: ...138 APPENDIX B MXP AND MSP CONNECTOR DIAGRAMS Figure B 2 MSP miniSystem Port connector diagram...
Страница 148: ...142 APPENDIX D BUILD A STAND ALONE APPLICATION...
Страница 149: ...E MarbleSorterConstructionDetails To be continued...
Страница 150: ...144 APPENDIX E MARBLE SORTER CONSTRUCTION DETAILS...