LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Learning to write user interface

Dear All,
 
With zero experience in writing LV user interface, we needs to write a User-Interface program for end-user data entry of "structured command script" (text with specific keyword_command)
 
Basically, we need to have the LV equivalent of some basic window commands, like
 
list box for user to select one from several keyword_commands
push button  to 'enter' 'save' etc.
radio button to select options (like inch vs. mm) 
a graphic plot showing the  'execution'    (like the x-y grid inspection (template).vi in the motion find-example)   
drop down menu (like File in windows)
 
Grateful pointers for beginner's learning resources on user interface.
 
Thanks in advance
0 Kudos
Message 1 of 5
(3,211 Views)
Depending on your version, all of these things exist in the LabVIEW palettes, you just have to place them on your front panel. Just look through the different palette, since there aren't many palettes. If you want controls which look like the MS ones, go for the Dialog Controls palette, which uses OS specific controls. The tricky bit is the menu, which can be controlled through code, or from the Edit menu.
 
After placing all things on your FP, however, the real trick is connecting the code to those things. Here is a standard passage I provide to beginners (although I don't know how much of that applies to user interface):
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
 
You can try searching this site for a presentation called "the good, the bad and the ugly", which deals in UI design, but is not a tutorial. You can also try the LAVA forums UI board (I believe they have one), but read what's there instead of bombarding them with questions. Above all, this will have to take your time. You can't write an LV program without learning LV (and that's relatively easy).

___________________
Try to take over the world!
Message 2 of 5
(3,200 Views)
Hello,

I hope this quick example will help you, I did it trying to match what you were asking for...

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 3 of 5
(3,201 Views)
Thank for the wonderful example. It ease things a lot.
 
How is the radio button created? I tried to look around the right-mouse menu and still no luck in finding it.
 
How can we create window-style pull down menu? Like most application program, the top-left is FILE and inside FILE is  open, read, save, save as, .... as that the end-user can select from existing file or open a blank new one to edit, .....
 
For windows, people write 500 pages books, just for the topic of user interface. Is there equivalent LV books on user interface (not other LV functions)?
 
 
0 Kudos
Message 4 of 5
(3,161 Views)


John_ wrote:
 
How can we create window-style pull down menu?

I already answered that - through the Edit menu or programmatically. If you open the example finder (Help>>Find Examples) you will find several examples.
 
Radio buttons are built into 7.1, but if you want to create them in earlier versions, you just need to use a numeric slide with labels. You will need to customize the slide to make it look more like radio buttons.
 
I don't know of any book specifically about UI design in LV, but UI in general is something that is left to the developer. Unlike windows, there are no real conventions in LV, so a book would not necessarily be relevant. My applications usually look different from one another because they serve different purposes and different users. For example, some of my applications, which are operated by touch screens, have no need for menus and radio buttons and things like that, because they're all too small to manipulate by hand.

If you want a general (and very long) review on UI design examples, try searching the web for something called "the interface hall of shame".

___________________
Try to take over the world!
0 Kudos
Message 5 of 5
(3,154 Views)