VI High 2 (1 of 2): Enhance User Interface Usability through Disabling and Enabling LabVIEW Front Panel Objects
In this, the second installment of VI High, we explore intuitivity: how to make a VI front panel more intuitive. We do that by selectively disabling and graying out some controls. This video has been split in half and we’ll be posting the second tomorrow.
Experience Level: Basic
(start of transcription)
“Intuitivity, what does it mean? Is it when you’re really into someone, and they’re really into you? No, that as we know is mutual into-ism, not intuitivity. Intuitivity is the attribute of our user interface that refers to how intuitive or natural it is to use. Ideally the user wouldn’t have to read the Manual or be a psychic before they use our VI. The less research needed to operate our front panels the happier our user.
We’ll focus on one aspect of intuitivity and that is conditionally enabling and disabling front panel objects. For instance, let’s say my application runs a test with an acquisition device. During the configuration stage of my application my user will be setting test parameters right here. However, once the user clicks the Run Test button I don’t want them changing any configuration. How can I make this intuitive?I could make all the configuration buttons just stop responding to user clicks by disabling them when the user clicks on Run Test. Then my user could think the application is broken, clicking buttons rapidly in a crescendo of panic. This is inadvisable. Alternatively, you can make all the buttons disappear when Run Test is clicked but is that any better? In this scenario, intuitivity is achieved by disabling and graying out the controls. The buttons are still present, the user feels safe and secure, but they’re grayed out and the user thinks: “I won’t touch those”.
We have a plan now how do we implement it? A LabVIEW property node is optimal. I’ll right click on this Acquisition Rate control and choose create»property node and select the property I’d like to edit. In this case it’s disabled on the block diagram change the property node to write and then create a constant off the input. Drop this down and choose Disabled and Grayed Out. As you can see, here is where I would simply Disable the control without any appearance change if frustrating my user is bulleted on my Statement of Work. Let me move these out of the way. Now I’ll just delete this wire for now and pull up a Select function. Then create a constant off the bottom input. Now we’ll lovingly embrace this little block of code with a while loop. That’s tender. And create a control in order to stop the loop. As competent LabVIEW programmers, it’s a good idea to put a wait in the loop. 10ms should be plenty. My Run Test button will decide which constant to execute. That’s very pleasing. And now we’ll move my stop button here and run my VI. When the test is not running I can enter anything into my acquisition rate control. When I run the test I can’t do anything. When the test is stopped, I can again. Now when you’re looking, I’ll create the same property nodes for these other controls and place them in the same while loop. Please don’t peek.”
(end of transcription)