The LabVIEW environment is full of features but can be overwhelming at first. When I first started using LabVIEW, I was very frustrated with the amount of time I had to spend to do just about anything. I remember wasting time searching through the functions palette trying to find a block I had used the previous day. Every so often I would have a Eureka! moment where I learn something that helped me speed up my coding process. In this blog post, I will tell you about some of the tricks I’ve learned, and hopefully, they will help you avoid some of my frustrations.
Diagram Disable Structure
Nothing is worse than those moments when you delete your old code because you think you’ve made found a better way to do it but later find out you had it right the first time. The Diagram Disable Structure can help you avoid this issue. It is an effective tool within LabVIEW because it allows a user to run their code, even if it is partially broken. This is a useful tool used for debugging new code, or if a user is looking to add improvements to the current code, without affecting the original program.
- Ctrl + Space – Opens the quick drop menu
- Ctrl + E – Switches between front panel and Block Diagram
- Ctrl + B – Deletes loose wires
- Ctrl + U – Reroutes wires and rearranges objects in a selected area
It is also possible to view the keyboard shortcuts and change them. The list can be found by going to Tools >> Options >> Menu Shortcuts.
LabVIEW includes an easy way to pass data from one loop to the next when using a while loop. Shift registers can be added to the diagram by right-clicking on the while loop structure and clicking ‘add shift register.’ Wiring a value into the left shift register from outside the loop will initialize the shift register.
In many instances, you will want to pass values in and out of a while loop. Values can be wired through the borders of the loop. Values wired in from the left side are inputs into the loop, and wires exiting the right side are outputs. Code that is connected to the output side of a while loop will not execute until the while loop has completed.
A local variable can read or write to controls or indicators on the front panel of a VI. Local variables are useful to communicate between structures within one VI. To create a local variable on the diagram, right-click an existing front panel object or block diagram terminal and select Create»Local Variable from the shortcut menu to create a local variable that you can add to the block diagram.
Thank you for reading my blog post, and for more LabVIEW tips and tricks follow this link. If you are interested in trying out LabVIEW for yourself, you can purchase a copy of LabVIEW 2014 Home Edition which includes everything you will need to run LINX 3.0. Please comment below with any questions or comments you may have.