CHAPTER 16. AUTO-PAN CAMERA
115
Figure 16.3: Webcam mounted to the servomotor which in turn is mounted
to a small tripod. Use strips of duct tape to secure the camera and servomotor
to the tripod head.
Convert the tracked object’s
X
-position from pixels into a
[DBL]
value be-
tween 0 (left image boundary) and 100 (right image boundary). Use
IMAQ Get
Image Size
to determine the number of image pixels in the X-direction instead
of hardcoding this value.
Servo control
Chapter 17 of the
NI myRIO Project Essentials Guide
describes how to set
the angle of a servomotor with the NI myRIO PWM (pulse-width modulated)
output; see
for details. Use the block diagram code
described in that chapter to convert a desired angle expressed in percent of
full-scale rotation (
−
100 to
+
100) into the corresponding duty cycle of the PWM
http://www.ni.com/myrio/project-guide
(7:18)
Содержание 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...