02-16-2024 01:44 PM
So, im new to Labview and i want to know is if its possible to make an interface that has several "stages", each taking some values as inputs, one of them being a time duration, and that has an option to add another stage, so that the user can program as many "stages" as they want, so that, when the program runs, it uses the values from each stage for their duration, something like this:
Specifically, i want to know if there's a way to do this stage-creating button or if its gonna have to be a fixed predefined number of stages that i manually add while designing the interface.
Thanks for the help.
Solved! Go to Solution.
02-16-2024 03:28 PM - edited 02-16-2024 03:33 PM
@Baldred wrote:
interface that has several "stages", each taking some values as inputs, one of them being a time duration, and that has an option to add another stage, so that the user can program as many "stages" as they want,
Technically you can't create UI controls programmatically, but as workaround I would like to suggest template-based solution and linked list of the subpanels, where you will insert your panel as *.vit, then wrapped into XControl. The only problem that you're new in LabVIEW..., but this is a good exercise.
Anyway, example in the attachment - its arranged vertically, but should be not a big deal to rearrange horizontally as you needed:
Use it as starting point.
Andrey.
02-16-2024 06:38 PM
The visuals are the least of my worries, thanks for the help and the example!
02-16-2024 08:19 PM
I have done something similar to what you're describing by using an array of clusters. You can then add and remove elements from the array programmatically and change the number of array elements shown via property nodes. The attached code is a very simple example of how this works.
03-28-2024 11:21 AM
Sorry for replying after marking it as solved, but i havent had much time to work on this much until now.
I've played around with this and have tried to make some changes, like having the stop button reset the stages instead of just deleting them, but my main concern now is how do i get the user inputs from the panels?
03-28-2024 06:15 PM
@Baldred wrote:
now is how do i get the user inputs from the panels?
Internally you have it in Event structure as normal OnChange events. If you need to collect these changes externally, you can use Queues, for example.
04-11-2024 04:28 PM
So, from what i've seen those inputs come through an "on-Change" event in the "facade", but the input boxes are on the "Panel" VI, while the "facade" is empty. I dont see how to take the values from the "Panel" VI or how to reference the boxes in the "facade".
I was also looking at the data in the "facade" wires to see if i could reference them somehow, as they seemed to have some kind of id reference to the input boxes, but again i dont know how to reference that data across VIs.
04-11-2024 11:12 PM
@Baldred wrote:
So, from what i've seen those inputs come through an "on-Change" event in the "facade", but the input boxes are on the "Panel" VI, while the "facade" is empty. I dont see how to take the values from the "Panel" VI or how to reference the boxes in the "facade".
I was also looking at the data in the "facade" wires to see if i could reference them somehow, as they seemed to have some kind of id reference to the input boxes, but again i dont know how to reference that data across VIs.
Do you need to get this statically and programmatically? Then via references as shown in attachment. Or, alternatively, use trivial Functional Global to set and get values.
04-12-2024 10:32 AM
I need to get the the inputs from the user when they press a "start button" or as they are changed, either one would work for me, so that i can use it to control some other components.
From what i can see you made a loop that iterates between all elements visible and you select the ones that are the input boxes of each type, saving their values, is that correct? If so i think i could run that when the user presses a "Start button" to get those values, since they shouldn't change after it starts.
06-10-2024 08:57 AM
Now that's some AI generated botting.