{"id":16979,"date":"2016-10-11T10:00:13","date_gmt":"2016-10-11T17:00:13","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=16979"},"modified":"2021-06-16T13:51:09","modified_gmt":"2021-06-16T20:51:09","slug":"adding-knobs-to-the-analog-discovery-2-using-labview","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/adding-knobs-to-the-analog-discovery-2-using-labview\/","title":{"rendered":"Adding Knobs To The Analog Discovery 2 Using LabVIEW"},"content":{"rendered":"<p>In <a href=\"http:\/\/www.instructables.com\/id\/Adding-Knobs-to-the-Analog-Discovery-2-Using-LabVI\/\">my project<\/a>, I used <a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW<\/a> to interface with three\u00a0<a href=\"https:\/\/digilent.com\/shop\/pmodenc-rotary-encoder\/\">Pmod ENC<\/a>&#8216;s connected to a <a href=\"https:\/\/digilent.com\/shop\/chipkit-wf32-wifi-enabled-microntroller-board-with-uno-r3-headers\/\"> WF32<\/a> to control a LabVIEW project I made called LabForms. This project allows\u00a0you to access the\u00a0<a href=\"http:\/\/www.instructables.com\/id\/Adding-Knobs-to-the-Analog-Discovery-2-Using-LabVI\/\">Analog Scope and WaveGen\u00a0functionalities of the Analog Discovery 2 through LabVIEW.\u00a0<\/a>While the basic version of LabForms works for all versions of LabVIEW after 2014 this particular project only works with LabVIEW 2014.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16993\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-11.15.36-AM-600x364.png\" alt=\"screen-shot-2016-09-29-at-11-15-36-am\" width=\"600\" height=\"364\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-11.15.36-AM-600x364.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-11.15.36-AM-768x466.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-11.15.36-AM-1024x622.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-11.15.36-AM-800x486.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-11.15.36-AM.png 1087w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>The LabVIEW code uses the <a href=\"https:\/\/decibel.ni.com\/content\/docs\/DOC-44838\">LabVIEW driver for the Analog Discovery 2<\/a>. Refer to my Instructable &#8220;<a href=\"http:\/\/www.instructables.com\/id\/Analog-Discovery-2-USB-Oscilloscope-LabVIEW2016-Up\/\">Analog Discovery 2 USB Oscilloscope + LabVIEW (2016 update)<\/a>&#8220;, where I walk through the Labforms user interface. The goal of that project was to recreate the results of\u00a0<a href=\"https:\/\/digilent.com\/shop\/waveforms-2015-download-only\/\">Digilent Waveforms<\/a> in LabVIEW.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16976\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/IMG_8338-600x450.jpg\" alt=\"img_8338\" width=\"600\" height=\"450\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/IMG_8338-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/IMG_8338-768x576.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/IMG_8338-1024x768.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/IMG_8338-800x600.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/IMG_8338-1200x900-cropped.jpg 1200w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Many people prefer using physical knobs to configure a scope rather than using a mouse. In this project, I will show you how I used <a href=\"https:\/\/digilent.com\/shop\/pmodenc-rotary-encoder\/\">Pmod ENC&#8217;s<\/a> and <a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\"> LabVIEW<\/a> to add physical knobs to the <a href=\"https:\/\/digilent.com\/shop\/analog-discovery-2-100msps-usb-oscilloscope-logic-analyzer-and-variable-power-supply\/\"> Analog Discovery 2<\/a>. With these knobs you will be able to control the sample rate, base, range, and offset of both of your scopes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16995\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Labforms__ENCp-600x327.png\" alt=\"labforms__encp\" width=\"600\" height=\"327\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Labforms__ENCp-600x327.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Labforms__ENCp-768x418.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Labforms__ENCp-1024x558.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Labforms__ENCp-800x436.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Labforms__ENCp.png 1305w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Offset for Channel 1;\u00a0if it is\u00a0switched is to the right, it controls offset for Channel 2.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16983\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-1.03.06-PM.png\" alt=\"screen-shot-2016-09-29-at-1-03-06-pm\" width=\"241\" height=\"165\" \/><\/p>\n<p>The last\u00a0knob controls range; if it is switched is to the left, it controls range for Channel 1, and if its switch is to the right, it controls range for Channel 2.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16982\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-1.03.18-PM.png\" alt=\"screen-shot-2016-09-29-at-1-03-18-pm\" width=\"245\" height=\"168\" \/><\/p>\n<p>Each<a href=\"https:\/\/digilent.com\/shop\/pmodenc-rotary-encoder\/\"> Pmod ENC <\/a>has an integral push button in the encoder shaft. This button toggles between &#8220;standard&#8221; and &#8220;fine&#8221; adjustment modes. In standard adjustment mode, when the encoder shaft is rotated, it scrolls through the list of preset options in that specific field.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16981\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-1.03.53-PM.png\" alt=\"screen-shot-2016-09-29-at-1-03-53-pm\" width=\"242\" height=\"218\" \/><\/p>\n<p>When you switch to fine\u00a0adjustment mode you will be able to make finer adjustments. If you select the settings tab you can select the size of the fine modes increment.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16985\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-1.01.31-PM-600x113.png\" alt=\"screen-shot-2016-09-29-at-1-01-31-pm\" width=\"600\" height=\"113\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-1.01.31-PM-600x113.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-1.01.31-PM.png 636w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Since sample rate was set to 50 MHz (5E+7 Hz) and its increment was set to a tenth of that value, one click to the right will increase the value 5 MHz (5E+6 Hz) to 55 MHz (5.5E+7).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16980\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-29-at-1.13.01-PM.png\" alt=\"screen-shot-2016-09-29-at-1-13-01-pm\" width=\"243\" height=\"156\" \/><\/p>\n<p>Thank you for reading my project rundown, and if you are interested in making this project yourself but don&#8217;t have the right supplies, you can purchase the <a href=\"https:\/\/digilent.com\/shop\/labview-physical-computing-kit-with-chipkit-wf32\/\">LabVIEW physical computing kit with chipKIT WF32<\/a>. This kit includes a copy of <a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW 2014 home edition<\/a>, a <a href=\"https:\/\/digilent.com\/shop\/chipkit-wf32-wifi-enabled-microntroller-board-with-uno-r3-headers\/\">WF32<\/a>, and everything you will need to run <a href=\"https:\/\/www.labviewmakerhub.com\/doku.php?id=learn:tutorials:libraries:linx:3-0:beaglebone-black-setup\">LINX 3.0<\/a> and start making projects. As always, please comment with any questions or comments you may have!<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-16979 jlk' data-task='like' data-post_id='16979' data-nonce='ac068a413b' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-16979 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-16979 jlk' data-task='unlike' data-post_id='16979' data-nonce='ac068a413b' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-16979 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-16979 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Austin introduces his latest project, integrating physical controls with the Analog Discovery 2.<\/p>\n","protected":false},"author":42,"featured_media":16976,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4327,4323,4312,1561],"tags":[111,1736,104,452],"ppma_author":[4493],"class_list":["post-16979","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","category-software","category-usb-scopes-analyzers-generators","category-applications","tag-analog-discovery","tag-analog-discovery-2","tag-project-2","tag-waveforms"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/09\/IMG_8338.jpg","jetpack_sharing_enabled":true,"authors":[{"term_id":4493,"user_id":42,"is_guest":0,"slug":"astanton","display_name":"Austin Stanton","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/0cc9db2caf6344c8f78ea46c21570f33a954c45596addf479125043e52431de0?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/16979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=16979"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/16979\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/16976"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=16979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=16979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=16979"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=16979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}