Posted
by Craig Bedward
Multithread programming in traditional languages can be a challenge. The programmer is responsible for managing many things, such as:
- Separating logical tasks
- Avoiding race conditions
- Avoiding thread starvation conditions
- Managing communication between the threads
LabVIEW, on the other hand, lends itself easily to multithreaded programming. In fact, if you follow the dataflow rules, multithreading will happen automatically when LabVIEW finds the opportunity.
Posted
by Craig Bedward
You can make pop-up windows quickly and easily by using tab controls.
By using tab controls, you can create the same visual effect and the same functionality as a pop-up window, but you don’t need to create a sub-VI. Since you never leave the VI, you don’t need to worry about passing information into and out of the dialog, simplifiying the code.
While this technique may not be appropriate for every situation, it is a nice trick to have when you need a quick pop-up window.
Give it a try. An example VI is attached.
Download VI: QuickPopUp.vi
Posted
by Craig Bedward
The standard LabVIEW listbox control has very archaic icons. So I made some improvements. You can use this control as a direct replacement for the standard control, but it looks a lot better.
This takes advantage of the properties for the listbox to load your own custom graphics.
Download VI: ListBoxIcons2.0.vi
Posted
by Craig Bedward
One rule to remember when designing a user interface is to do things in standard ways.
For example, if you want to close a program in Windows, you click the red X button in the upper right-hand corner of the window. Most LabVIEW™ have a tell-tale “Stop” or “Done” button. That always bugs me. Why shouldn’t a LabVIEW program end the same way any other Windows program ends?
Read the rest of this entry »
Posted
by Craig Bedward
Error handling. You know you have to do…well, you should do it…well, maybe you will get the code working and then come back later and add proper error handling.
Let’s be honest, you will never go back and do it. If you can’t take time to do it right the first time, how do you expect to find time to do it over again?
Error handling is not the most fun aspect of programming, but doing it right can separate a buggy program from good solid code.
Read the rest of this entry »
Posted
by Craig Bedward
You can quickly place a VI onto another VI by dragging it from the icon pane and dropping it onto the destination VI. Dragging works from the icon pane on either the Front Panel or the Block Diagram, but you can only drop onto another VI’s Block Diagram.

Posted
by Craig Bedward
You can quickly flip through all the frames of a structure by holding <Control> and using the mouse scroll wheel. This works for Case Structures, Event Structures, Stacked Sequence Structures, even Diagram Disable Structures.

Posted
by Craig Bedward
You can get quick access to the LabVIEW Tools palette by holding <Shift> and right clicking. The Tools palette will pop up next to your cursor.

Simply make your selection and the palette will go away.