LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Userinput Frontpanel to SubVi

Hello,

 

I'm looking for a more efficient way to get multiple user-given inputs into a SubVI. At the moment the structure used looks principally like the one in the attachement.

What is needed: 

1) The user fills every control with the desired value (in this case force values) 

2) the case-index given by the "Zählung Kontaktwiderstand" SubVI must be transmitted later in the program to assign row numbers in an Origin table

 

How it's intended to work:
When the program starts, it gets the first value to use from the first case as the index given by the "Zählung.."SubVI starts at 1. Then the programm runs with this value. When this is done, the "Zählung.."SubVI counts one up. Now the program starts again, this time with the value given in the second case and so on until a specified index is reached.

 

Problem:
This method isn't really elegant, as it's limited by the numbers of connections that can be made to the SubVI and is also restricted to the pregiven maximum number of inputable values.

 

I'm completly open to suggestions on how to change that, as long as it gives me values and value indices which can be passed on for further use. It would also be nice to have some sort of "grow" option, so that an infinite number (more or less, I don't think I'll ever need more than 200) of inputs is possible.

 

Thanks.

Download All
0 Kudos
Message 1 of 6
(2,598 Views)

Clusters will help a lot here.  But don't just make clusters for the sake of making a cluster.  Group items into logical sections.  For instance, use a cluster to hold your index information.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(2,579 Views)

Thanky you for the idea with the cluster. I will look into that as it will surely clean up the single controls.

 

For the optional part of the problem, as far as I know, case structures can't have cases added from the front panel, can they? So to be able to add more controls, I'd have to manually add a new case for each, correct?

0 Kudos
Message 3 of 6
(2,532 Views)

Hello Rhazal,

 

here some more information on clusters: http://www.ni.com/white-paper/7571/de/#toc5

You are right, a case structure cannot be edited from the front panel. Any controls you add and wish to be part of a case structure, you need to do the edit in the block diagram.

 

Best regards

 

AndGar

Andreas Gareis
Senior Applications Engineer, NI
Certified LabVIEW Developer & TestStand Architect
0 Kudos
Message 4 of 6
(2,526 Views)

@AndGar wrote:


You are right, a case structure cannot be edited from the front panel. Any controls you add and wish to be part of a case structure, you need to do the edit in the block diagram.

 



Thank you for the clarification. Is there even a structure that could do what I'm looking that is to say, first letting the user decide how many input fields he needs and then adds those?

0 Kudos
Message 5 of 6
(2,486 Views)

Hello Rhazal,

 

is this what you are looking for?

http://forums.ni.com/t5/LabVIEW/programmatically-add-front-panel-objects/td-p/873184

https://decibel.ni.com/content/thread/10162


Best regards

 

AndGar

 

Andreas Gareis
Senior Applications Engineer, NI
Certified LabVIEW Developer & TestStand Architect
0 Kudos
Message 6 of 6
(2,457 Views)