How do you document your code with built-in tools in LabVIEW?

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 shown at the top of the image, and asked themselves questions such as:

    • Why was this code written?
    • What are the conditions for execution?
    • Why do the conditions for the case structures depend on the VI’s output?
    • Why is this output inverted?

However, the above questions could have been avoided with a small effort to document the code using the built-in tools in LabVIEW.

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.

An important point to mention is also that these tools are available in all versions of LabVIEW.

Learn more about LabVIEW

Start documenting your code today!

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.

About GPower

At GPower, we deliver robust and scalable solutions across industries, from research to production. Our modular software helps you optimize and streamline operations, so you can focus on your core business.

We offer
Read other articles

Read our other blog posts

Meet GPower at DDAC 26 (Danish Defence Annual Conference) and learn more about automated test solutions – from R&D to production [See you at stand 66]
New appointment: Four LabVIEW Champions are now gathered at GPower!
Acquiring data you can trust! [Test & Measurement TechDays 2025 – Copenhagen]

We are launching a new website on April 14, 2026.

As a result, it will not be possible to complete purchases today, and throughout the day only the Danish version of the website will be available.

If you have any questions, or if you would like to make a purchase during the day, you are—as always—very welcome to contact us:

Gabrielle, Marketing Manager: +45 5190 5790.

Thank you for your understanding—we look forward to welcoming you to our new website!