LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create controls using a loop

Hi,

it's 2:00 AM and for 30 minutes I got stuck.

Maybe it's a simple question, but I don't have an idea, how to solve this problem.

 

I want a user to type in a number. For example "9".

After typing the number and clicking "OK" a number (in our case 9) of numeric controls should appear.

But before typing the number, none of them should be visible for the user.

 

How can I do that?

I'm using LabView 2009.

---
LabView 2009.
0 Kudos
Message 1 of 17
(4,811 Views)

where the user will type in the number?

 

 

If you want to programatically create the controls/indicators then you have to start making use of what is known as Scripting.... and for that atleast you must be advanced user of LabVIEW

Regards
Guru (CLA)
0 Kudos
Message 2 of 17
(4,797 Views)

maybe you can use "property node" function to control the visibility (and more functions!) of numeric controls. are those numeric controls in separate? in array? kindly try the attached sample VI and see if thats what you looking for. I hope you can give more details about your problem.

 

hope this one helps.

Ivel R. | CLAD
0 Kudos
Message 3 of 17
(4,784 Views)

If you want the control to be visible, but not the number in it. use a string indicator and either feed it an empty string or an appropriately formatted numeric string.

0 Kudos
Message 4 of 17
(4,776 Views)

My problem is much more complicated, but this subVI is easy to explain in a example.

 

Imagine that you're creating a calculator.

step 1.

In the first step the user types in an integer in a control. Than he clicks "OK".

 

step2.

After that a number of controls appear below the first control - the number is specified by the user in step 1.

 

For example you can use this VI to build a calculator with user specified amount of input controls.

 

---
LabView 2009.
0 Kudos
Message 5 of 17
(4,754 Views)

Hi,

 

if you want to create Controls in LabVIEW on the fly, you will have to use scripting.  What scripting is, you can find more info over here.

 

This toolkit is for free and if you're using LV2010 it's built in already if you're using 2009, you will have to install it yourself.  Before 2009 it's not existing.

It has some really good examples like : 

Drop Round Button.vi – Demonstrates how to create a Front Panel control. Programmatically creates a Round Button Boolean control. (but this can be any control)

 

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 6 of 17
(4,737 Views)

A Vi can't dynamically create controls on its own Front Panel.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 7 of 17
(4,731 Views)

perhaps this topic link may suits you (but it seems the author's VI cannot be download from his provided site). i guess its a good workaround to your problem.

 

DynaPanels​: Now we can place controls dynamicall​y

Ivel R. | CLAD
0 Kudos
Message 8 of 17
(4,726 Views)

You mean something like this?

0 Kudos
Message 9 of 17
(4,691 Views)

I would appreciate if you can save it as LV 2009.

---
LabView 2009.
0 Kudos
Message 10 of 17
(4,687 Views)