LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Manage multiple different Input

Solved!
Go to solution

Hi,

 

In my VI I have many different cases, each one represent a particular setting for a channel of a measure device. So each of the 12 cases contains a specific VI with its own input. How can I manage so many variables in my VI (without creating too many clusters)? I am trying to find a way to display and manage only the wanted input for that casein an automatic and friendly way?

Thank you for the help!

 

Best Regards,

Zuc

 

Zuc_lab2_0-1757335357954.png

 

Zuc_lab2_1-1757335381665.png

Zuc_lab2_2-1757335432493.png

 

 

0 Kudos
Message 1 of 14
(275 Views)

Start by attaching your VI. (Do a save fore previous, 2020 or below).

0 Kudos
Message 2 of 14
(233 Views)

Well you could start by naming all your cases something human readable rather than 1,2,3,4...

kaseCapture.PNG

 

Also you are going to have to accept that a "universal" program to cover many different settings and variations is going to be complex. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 14
(211 Views)
Solution
Accepted by topic author Zuc_lab2

Hi,

 

Here the VI. I know that a "universal" VI can be quite complicated, but this is what I have to do, so my aim is to have a VI that manage different options for configuring a LXI 34980A channels automatically. Yesterday, while going around the web I found interesting the Subpanel idea. Unfortunately it remains the problem of managing the different cluster input since ConfigureChannelMeasure.vi will be introduced in another VI.

 

Thank you for the help.

 

Best Regards,

 

Zuc

0 Kudos
Message 4 of 14
(189 Views)

Hi Zuc,

 


@Zuc_lab2 wrote:

Unfortunately it remains the problem of managing the different cluster input since ConfigureChannelMeasure.vi will be introduced in another VI.


Two options:

  1. Define a cluster with ALL the elements you will need in ALL cases. Each case can unbundle its own elements…
  2. Define a generic element (like a string), and each case parses that string for its own needs. You need to define a data format being able to handle all your cases…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 14
(183 Views)

Hi GerdW,

 

so you mean creating a cluster of clusters, and extract only what i need? but ho i can present to the user only the controls that he/she have to change? Is there any way by python or some code to manage that?

 

Best Regards,

 

Zuc

0 Kudos
Message 6 of 14
(172 Views)

Hi Zuc,

 


@Zuc_lab2 wrote:

so you mean creating a cluster of clusters, and extract only what i need?


I would use a (more or less) flat cluster, no need for cluster of clusters…

 


@Zuc_lab2 wrote:

but ho i can present to the user only the controls that he/she have to change?

Is there any way by … some code to manage that?


In general (and as mentioned before) there is a way: write the code needed to fulfill your requirement!

(There is some complexity in your requirement and you need to handle that!)

 

  • You could use subpanels for the user input: each case will load its own VI into the subpanel.
  • Learn to differ between UI/UX requirements and data storage in your backend: once you learn to differ them it becomes more easy to create "nice" UI and still use some more generic routines to handle your data…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 14
(166 Views)

Hi GerdW,

 

while studying the different VIs for the Channels configuration i have noticed that some Parameters have the same name, so putting toghether in the same container can create caos. I suppose I will use a spreadsheet as a database for creating the needed input combinations, otherwiase I have no other ideas left. 

 

"Learn to differ between UI/UX requirements and data storage in your backend: once you learn to differ them it becomes more easy to create "nice" UI and still use some more generic routines to handle your data"

Do you have any suggestion where i can start doing that?

 

Best Regards,

Zuc

0 Kudos
Message 8 of 14
(156 Views)

Hi Zuc,

 


@Zuc_lab2 wrote:

"Learn to differ between UI/UX requirements and data storage in your backend: once you learn to differ them it becomes more easy to create "nice" UI and still use some more generic routines to handle your data"

Do you have any suggestion where i can start doing that?


It's "learning by doing"…

 

Look at a frontpanel of a traditional scope device and try to mimic that in LabVIEW:

  • How would you organize all the configuration data in the backend to handle the data efficiently in the processing routines?
  • How would you organize (and format) the data for the UI?

Sometimes it makes sense to use different representations for the "backend" data and the "UI" data. All you need are some "helper" VIs that convert from backend to UI and vice versa…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 14
(150 Views)

The 34980A is very similar to the 3497xA and DAQ97xA series we use here.

 

In my "universal test program" if the the 34970A is used for data acquisition all channels are configured through an XML file that is created using the free XML Notepad program. 

 

config34970Capture.PNG

The XML file is loaded, parsed, and the instrument is configured at the start of the program.

========================
=== Engineer Ambiguously ===
========================
Message 10 of 14
(95 Views)