{"id":21849,"date":"2021-10-14T09:35:00","date_gmt":"2021-10-14T09:35:00","guid":{"rendered":"https:\/\/gpower.io\/how-do-you-document-your-code-with-built-in-tools-in-labview\/"},"modified":"2026-04-14T12:59:30","modified_gmt":"2026-04-14T12:59:30","slug":"how-do-you-document-your-code-with-built-in-tools-in-labview","status":"publish","type":"post","link":"https:\/\/gpower.io\/en\/how-do-you-document-your-code-with-built-in-tools-in-labview\/","title":{"rendered":"How do you document your code with built-in tools in LabVIEW?"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"21849\" class=\"elementor elementor-21849 elementor-10021\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-section elementor-top-section elementor-element elementor-element-2f8c0c7f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2f8c0c7f\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2caf987\" data-id=\"2caf987\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1c7883b9 elementor-widget elementor-widget-heading\" data-id=\"1c7883b9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Use a typedef cluster and a single feedback node; check the conditions once per iteration based on the previous iteration, and write only to the specific value when necessary, to improve clarity. Find more tips on documentation in LabVIEW in the blog post.  \n<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-73e7ef3b elementor-widget-divider--view-line elementor-widget elementor-widget-divider\" data-id=\"73e7ef3b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"divider.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2b7ec5e elementor-widget elementor-widget-text-editor\" data-id=\"2b7ec5e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Everyone has undoubtedly encountered undocumented code at some point, like the example shown at the top of the image, and asked themselves questions such as:<\/p><ul><li style=\"list-style-type: none;\"><ul><li>Why was this code written?<\/li><li>What are the conditions for execution?<\/li><li>Why do the conditions for the case structures depend on the VI\u2019s output?<\/li><li>Why is this output inverted?<\/li><\/ul><\/li><\/ul><p>However, the above questions could have been avoided with a small effort to document the code using the built-in tools in <a href=\"http:\/\/www.ni.com\/da-dk\/shop\/labview.html\" target=\"_blank\" rel=\"noopener\">LabVIEW<\/a>.<\/p><p>In the lower part of the image, I have outlined a few points on how to document a VI using the simplest tool in LabVIEW. I have used the Cluster data type together with a feedback node to handle the data in each iteration, as these provide good documentation of the available data. And by adding labels and subdiagram labels for the case structures, understanding of the execution process becomes much clearer.  <\/p><p>An important point to mention is also that these tools are available in all versions of LabVIEW.<\/p><p><a href=\"https:\/\/gpower.io\/en\/what-is-labview\/\">Learn more about LabVIEW<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-601eeb8 elementor-widget elementor-widget-heading\" data-id=\"601eeb8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Start documenting your code today!\n<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c22d598 elementor-widget elementor-widget-text-editor\" data-id=\"c22d598\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<div class=\"section post-body\"><p>My intention in writing this blog post was to highlight the importance of documentation in order to reduce complexity for the reader and to reduce errors in the code in the future.<\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Use a typedef cluster and a single feedback node; check the conditions once per iteration based on the previous iteration, and write only to the specific value when necessary, to improve clarity. Find more tips on documentation in LabVIEW in the blog post. Everyone has undoubtedly encountered undocumented code at some point, like the example [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":21851,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[82],"tags":[92],"class_list":["post-21849","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-software"],"_links":{"self":[{"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/posts\/21849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/comments?post=21849"}],"version-history":[{"count":1,"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/posts\/21849\/revisions"}],"predecessor-version":[{"id":21853,"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/posts\/21849\/revisions\/21853"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/media\/21851"}],"wp:attachment":[{"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/media?parent=21849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/categories?post=21849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gpower.io\/en\/wp-json\/wp\/v2\/tags?post=21849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}