{"id":16964,"date":"2017-02-21T10:22:32","date_gmt":"2017-02-21T18:22:32","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=16964"},"modified":"2021-06-11T10:43:03","modified_gmt":"2021-06-11T17:43:03","slug":"using-property-nodes-in-labview","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/using-property-nodes-in-labview\/","title":{"rendered":"Using Property Nodes in LabVIEW"},"content":{"rendered":"<p>With property nodes, you can start making your <a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW<\/a> program more powerful and a lot more fun. Property nodes allow you to programmatically control the properties of a front panel object: things such as color, visibility, position, numeric display format, and so on. The key word here, programmatically, is changing the properties of a front panel object according to an algorithm in your diagram. For example, you could change the color of a thermometer indicator from green to red as its numerical value increases. These types of changes can help create a more intuitive user experience.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-19229 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-9.24.13-AM-600x232.png\" alt=\"\" width=\"754\" height=\"291\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-9.24.13-AM-600x232.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-9.24.13-AM-1024x397.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-9.24.13-AM-800x310.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-9.24.13-AM.png 1892w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/p>\n<p>To create a property node, pop up on either the front panel object or its terminal and select a property from the\u00a0Create&gt;&gt;Property Node\u00a0submenu. A terminal with the same name as the variable will appear on the diagram. To see what options you can set in a control&#8217;s property node, click on the node with the Operating tool or pop up on the node and choose property. Now you have the choice of which property or properties you wish to select. Each object has a set of\u00a0base properties\u00a0(common to all types of controls), and usually, an additional set of properties specific to that type of control.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19237 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-9.53.35-AM-1.png\" alt=\"\" width=\"564\" height=\"347\" \/><\/p>\n<p>Just as with local variables, you can either read or write the property of an object (although a few properties are read-only). To change the mode of a property, pop up on it and select the\u00a0Change to Write\/Read\u00a0option. The small arrow inside the property node&#8217;s terminal tells you which mode it&#8217;s in. A property node in write mode has the arrow on the left, indicating the data is flowing into the node,\u00a0writing\u00a0a new property. A property node in read mode has the arrow on the right,\u00a0reading\u00a0the current property and providing this data. The same analogy we used for locals, a control (read mode) and an indicator (write mode), holds for property nodes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-19240 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-10.08.07-AM-1.png\" alt=\"\" width=\"241\" height=\"169\" \/>An interesting feature of property nodes is that you can use one terminal on the block diagrams for several properties (but always affecting the same control or indicator). To add an additional property, you can use the Positioning tool to\u00a0resize\u00a0the terminal and get the number of properties you need.\u00a0Often you will want to use more than one option in an object&#8217;s property node. Remember, instead of creating another property node, you can select several options at a time by enlarging the terminal with the Positioning tool (much like you enlarge cluster and array terminals). You will see each new option appear in sequence; you can later change these if you like by clicking on any item with the Operating tool.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-19230 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-9.19.35-AM-431x600.png\" alt=\"\" width=\"431\" height=\"600\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-9.19.35-AM-431x600.png 431w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-9.19.35-AM.png 473w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/>Almost all controls or indicators have the base properties. Most of them have more, especially tables and graphs (which can have over 100 properties). For example, it took all of the property nodes shown above(and more) to create the <a href=\"https:\/\/digilent.com\/shop\/analog-discovery-2-100msps-usb-oscilloscope-logic-analyzer-and-variable-power-supply\/\">Analog Discovery 2<\/a> Oscilloscope interface shown below. The best way to learn about property nodes is to create some to go with your application and begin to play around with them.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-19234 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Oscilloscope-1-600x378.gif\" alt=\"\" width=\"600\" height=\"378\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Oscilloscope-1-600x378.gif 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Oscilloscope-1-768x484.gif 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Oscilloscope-1-1024x646.gif 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Oscilloscope-1-343x215.gif 343w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Oscilloscope-1-800x504.gif 800w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>You&#8217;ll find that property nodes are very handy for making your program more dynamic, flexible, and user-friendly.\u00a0Thank you for reading my blog post, and for more information about using property nodes in LabVIEW check out\u00a0this\u00a0<a href=\"https:\/\/zone.ni.com\/reference\/en-XX\/help\/371361J-01\/glang\/property_node\/\">link<\/a>. If you are interested in trying out LabVIEW for yourself, you can purchase a copy of\u00a0<a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW 2014 Home Edition<\/a>\u00a0which includes everything you will need to run\u00a0<a href=\"https:\/\/www.labviewmakerhub.com\/doku.php?id=learn:tutorials:libraries:linx:3-0:beaglebone-black-setup\">LINX 3.0<\/a>.\u00a0Please comment below 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-16964 jlk' data-task='like' data-post_id='16964' data-nonce='3c15ebf169' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-16964 lc'>+11<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-16964 jlk' data-task='unlike' data-post_id='16964' data-nonce='3c15ebf169' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-16964 unlc'>-2<\/span><\/a><\/div><\/div> <div class='status-16964 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Austin illustrates how to use property nodes in LabVIEW!<\/p>\n","protected":false},"author":42,"featured_media":19230,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4323,1563],"tags":[],"ppma_author":[4493],"class_list":["post-16964","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","category-guide"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-9.19.35-AM.png","authors":[{"term_id":4493,"user_id":42,"is_guest":0,"slug":"astanton","display_name":"Austin Stanton","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/056fddaefc60a1f99c226ea5757a8c41?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Stanton","last_name_2":"","first_name":"Austin","first_name_2":"","job_title":"","description":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/16964","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=16964"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/16964\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/19230"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=16964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=16964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=16964"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=16964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}