01-13-2014 07:18 AM - edited 01-13-2014 07:25 AM
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.
01-13-2014 07:52 AM
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.
01-14-2014 02:59 AM
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?
01-14-2014 03:18 AM
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
01-14-2014 03:33 PM
@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?
01-15-2014 01:53 AM
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