‘LabVIEW’ Category Archives

26
Aug

LabVIEW Radio Buttons without Frames

by Christina in LabVIEW, User Interface

Radio Button Group Example

Radio Buttons

The intended purpose of a radio button group is to select one (and only one) option from a set of choices. Microsoft has a detailed article on radio button usage guidelines on MSDN. (Although I should note that I don’t agree with all their guidelines).

LabVIEW introduced the radio buttons control in version 7.1. [Before then you had to write diagram code to ensure that only one radio button in a group was TRUE at a time, which was very annoying. Individual radio buttons are still in the palettes and I sometimes see them being used inappropriately, e.g. in place of a checkbox].

Unfortunately, the radio buttons control is somewhat confusing to new users. Here are the basics:

  • The group of radio buttons is a single control, with a single terminal on the diagram. Like a cluster, you don’t get terminals for the controls inside the group.
  • The radio buttons value is an enumeration of the contained button labels.
  • Similar to a cluster, you add radio buttons by placing them inside the bounds of the group. (You can also right-click on the group border and select Add Radio Button).

Read the rest of this entry »

23
Aug

LabVIEW 2010 Help Links for Controls

by Christina in "Hidden" Features, LabVIEW

I don’t think I can do a better job of showing off the top new features of LabVIEW 2010 than the official New Features in NI LabVIEW 2010 page or Darren’s nuggets.

So instead I’ll share a small enhancement that you may sometimes find handy.

Have you ever needed to refresh your memory (or teach someone else) the differences between the various LabVIEW graphs and charts? Or what data shapes (arrays, clusters, arrays of clusters, etc.) a graph accepts and how it displays them?

You know it’s all described in the Help, but it’s hard to find the right topic for a particular type of graph or chart, right?

Well, in LabVIEW 2010 you can use the Context Help window, mouse over a control and see a “Detailed Help” link that will take you to the help topic for that type of control.

The link only appears when the VI is in edit mode because the context help on a running VI belongs to you, for whatever description of the control you want to provide for the operator of your VI.

17
Aug

Custom Toolbars for LabVIEW VIs

by Christina in LabVIEW, User Interface

Have you ever wanted to make a custom toolbar on a VI?

I put together a small example VI to show how this might be done: Toolbar Example

Read the rest of this entry »

2
Aug

Survey to Help Improve Future Versions of LabVIEW

by Christina in LabVIEW

[August 10, 2010 - This survey is now closed. Thank you to everyone who participated!]

Do you want to help LabVIEW R&D focus our efforts for improving editor responsiveness in future versions? Take one or more of the following surveys to let us know what editor operations cause you the most frustration:

For those of you attending NIWeek 2010 who prefer paper forms over SurveyMonkey, you can find a version of these surveys in the Exhibition Hall, under the FPGA IP Demo in the Design Pavilion. Read the rest of this entry »

2
Aug

National Instruments Announces LabVIEW 2010

by Christina in LabVIEW, NI Week

From NI News: “National Instruments today announced LabVIEW 2010, the latest version of the graphical programming environment for design, test, measurement and control applications.”

Today also marks the beginning of NI Week 2010, with Alliance Day sessions (for NI’s Alliance Partners) and the NIWeek Kickoff Happy Hour. A big Austin welcome to all our NIWeek attendees!

10
Jul

Showing and Hiding Decorations Programmatically

by Christina in LabVIEW, User Interface

Grouping with Recessed Frames

When laying out a panel, you sometimes want to “group” elements together. You can do this by leaving a little empty space around the group. In some cases, however, it’s better to use a decoration such as the Recessed Frame, especially if you want to label the group.

Unfortunately, if you need to show/hide (or move) the group programmatically, you’ll find that you can’t get VI server properties for a decoration like you can for a control.

There are numerous techniques for showing and hiding decorations programmatically. I’ll go over four of them here. Read the rest of this entry »

9
Jul

Recommended NI Week 2010 Sessions

by Christina in LabVIEW, NI Week

I just received the finalized schedule for the Software Development Techniques Track at NI Week 2010 and there are some great sessions planned!

Here are the ones I hope to see, and think you might be interested in, too, given that you are reading my blog. Read the rest of this entry »

26
Jun

LabVIEW Splitter Bars

by Christina in LabVIEW, User Interface

VI with splitter bars

I recently saw a discussion on info-labview about scaling objects when you resize the panel.

There are several options for how to do this, with different strengths and weaknesses.

  1. Handle the panel resize event and programmatically resize and position everything. Flexible and powerful, but it’s a lot of work and the resulting code is brittle (which means it “breaks” easily – whenever you change your UI, you have to update your diagram).
  2. Scale all objects on front panel as the window resizes (in VI Properties>>Window Size). Easy, but rarely does what you want. In most cases, you probably want some (but not all) of the controls to scale with the window. Also, this option has problems when the panel gets very small and then large again in that controls don’t return to their original size and position. If you use this setting, make sure you set a reasonable minimum panel size in VI Properties.
  3. Scale Object with Pane (in control’s right-click menu). Easy, but limited to a single scaling object per panel unless you use splitter bars.
  4. Splitter bars combined with object scaling options. This is a fairly easy, powerful technique. I’ll go over this one in more detail.

Read the rest of this entry »

14
Jun

LabVIEW Boolean Control with Labeled States

by Christina in "Hidden" Features, LabVIEW, User Interface

A friend asked me “what is the best control to use for a Boolean subVI input that has special true/false values, e.g. enabled/disabled?” She was dissatisfied with the “Enabled?” checkbox approach because it didn’t give an explicit name to the other state. Similarly, using the boolean text part with a switch only showed the name of the current state. She wanted a switch that showed the labels for both states.

I gave her this control and asked if it was what she was looking for. She said that it was!

She had known that you could put free labels next to the switch, but not that you could make them “owned” by the control.

You can add decorative elements (e.g. images, decorations, and text) to a control using the Control Editor (Edit>>Customize Control or right-click Advanced>>Customize). When you add them in the Control Editor, they become parts of the control. Then when you use the control on a front panel, it acts as a single item when moving, deleting, etc.

Now, another thing you should consider when making a subVI input with named states is whether it would be better to use an enumeration. This can make the diagram that calls the subVI easier to read. If you do want an enumeration, however, I highly recommend you make it a type definition as well. That way you can edit it later and automatically update all the places it’s used.

14
Jun

LabVIEW Performance Course

by Christina in LabVIEW, Performance, Training

People sometimes ask me “how do I make my VIs run faster?” or “how do I make my VIs use less memory?” I don’t have easy answers for those questions! There’s a lot of material to go over, including tools for identifying performance issues, general software engineering techniques, and specific LabVIEW implementation details that affect code generation and memory allocations.

That’s why I was excited to learn that there’s a new course available on LabVIEW Performance that is all about identifying and improving performance issues in your LabVIEW applications. Check out the course outline to see if it might be right for you!