LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a shortcut of a control

Solved!
Go to solution

Hi All, I have a 2 page tab. In page 1 I have a control button that can be used to select. I want to place a short cut of this control in page 2, could you advise how can I do it? Thank you!

 

tab.PNG

0 Kudos
Message 1 of 12
(3,097 Views)

If the control applies to all tab pages, you should place it outside the tab control. Alternatively, you can "float" it over the tab control (place it next to it, the move it over using the arrow keys).

0 Kudos
Message 2 of 12
(3,089 Views)

Hi altenbach, actually I have several pages and just need this from page 1 and page 4. So it is not a good idea to take it out from the tab. Do you have the solution for making the shortcut? Thank you!

0 Kudos
Message 3 of 12
(3,086 Views)

LabVIEW does not have shortcuts for controls. You can place an identical control on a second tab and logically link them in code.

0 Kudos
Message 4 of 12
(3,084 Views)

Are you talking about like this? Do you think what I did is correct?tab2.PNG

0 Kudos
Message 5 of 12
(3,081 Views)

This question was asked the other day here

 

What I would do is put the control over the tab structure like altenbach mentioned, and hide it when the tab is on a page you don't want the control to show up on. 

 

The image you posted is likely not going to do what you want. Race conditions abound.  If control 1 = 5 and control = 3, you have no real way of determining which value you're going to see.  If the top locals execute first the'll be 5.  If the bottom locals execute first they'll be 3.  And that's assuming both locals in each set finish before the other ones start.  There's no way to know what's going to happen.  (Plus it's only going to happen once, but I assume there is some loop structure somewhere)

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 6 of 12
(3,078 Views)

elset, thank you. I have a question in doing like what you guys said. I know how to make the control visible or hide, but I do not know how to trigger this one. For example, how can I do it like "when I click page 2 of the tab in front panel, this visible property node of this control is assigned to false".  Could you advise about this? Thank you!

0 Kudos
Message 7 of 12
(3,073 Views)

The tab has a value change event.  Capture it, and it should give you the page you chose.  Turn on visibility based on that value.

Something like this.

 

Example_VI_BD.png

 

(Also note that I edited my reply above, commenting on your image)

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 8 of 12
(3,068 Views)

You can wire the tab control terminal to a case structure and put the property nodes in the appropriate cases.  This might be placed inside an Tab: Value Changed case of the event structure.

 

Perhaps the problem is due to the logical configuration of your front panel.  It might be worth asking yourself: Is it logical to group these controls in this manner? It appears that some of your controls group logically for some conditions but not others.  Maybe there is a better grouping.

 

Lynn

0 Kudos
Message 9 of 12
(3,064 Views)

@bhl3302 wrote:

Are you talking about like this? Do you think what I did is correct?


No, this is a textbook race condition with way too many local variables!

 

You can use a small independent loop with an event structure as follows, for example.

(You only need to connect one in the main code, of course, they will always have the same value.)

 

 

0 Kudos
Message 10 of 12
(3,058 Views)