cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

How to handle 40 of the same little GUI's

Solved!
Go to solution
Highlighted

How to handle 40 of the same little GUI's

I'm just starting to use LabVIEW and have only done a few small and relatively easy projects. My current project didn't seem that difficult either but I'm encountering some 'challenges'. 

 

In this project we have 40 test stations where we test composite items by putting them in some aggressive fluids, at a certain temperature and under a specific load and then wait till the test item breaks. I've made a quick GUI to demonstrate what needs to be measured, see attachment. We measure and log the load, temperature, displacement and a pressure values at each test station. If the test item breaks the load will change rapidly and the background of that test station needs to become red.

 

If a test item breaks it will be replaced and the new test item will be tested in the same test station but with a different load and temperature. The challenge is that these test items do not break at the same time so we kind of need 40 individual log-files and also 40 individual start and stop controls to .... start and stop a test at a specific test station. 

 

My first 'challenge' is how to handle all the start and stop events from the GUI. I can make an event-structure and put all 'value change' events from the start and stop buttons in there but there must be a better solution for that as this becomes kind of messy. What I would want is just two event cases (one for the stop buttons and one for the start buttons) and where the result would be something like a index number of the test station were the button was pressed.

 

What I've tried so far is to combine all controls and indicators from a single test station in a cluster so the number of controls and indicators is reduced and put the cluster in an array. The problem here is that in a cluster the combination of controls and indicators is not possible (right ?). There are some possibilities to use property nodes to change a value of a control but I'm not sure if this is the way to go. I also tried to do something with references and put these in an array in the beginning of the program but but this also seems to get messy.

 

So I didn't really figure it out how to do this I hope somebody can point me in the right direction of how to handle this in a proper way.

 

Oh, and sorry for the long text.

 

0 Kudos
Message 1 of 11
(331 Views)

Re: How to handle 40 of the same little GUI's

There's definitely better ways to do it, but with you being new at LabVIEW I should warn you that it's not something super simple.

 

First, you definitely want to abandon anything that you need to manually replicate once per instance.  You may have 40 now, but when searching for a solution you want to pick something that works for N instances so you only would need to make a minimal change to either add or remove panels, or change all N panels at the same time.

 

One option would be to use something like a Multicolumn Listbox.  Use one line per test station.  With clever use of property nodes, you can change the color of specific cells when the load changes and it needs attention drawn to it.  Then, have one set of controls off to the side, and the controls would activate whichever station is the currently selected line on the listbox.

0 Kudos
Message 2 of 11
(302 Views)

Re: How to handle 40 of the same little GUI's

First of all, I almost guarantee that your user is NOT going to want to have to see 40 stations all at the same time.  It is called Information Overload.  So what I do is use subpanels.  You can load whatever instance of a VI into the subpanel to show its front panel.  I used a Listbox to allow the user to select which instances they want to look at.  You should also learn about the Asynchronous Call By Reference to use this well since you will want to be dynamically creating 40 instances of a single VI.

 

In my last case, only one station was to be viewed at a time.  But you could have more, only limited by the number of subpanels you want to show.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

The discussions from the Advanced User Track is not over. Join in the conversation: 2016 Advanced Users Track
0 Kudos
Message 3 of 11
(281 Views)
Solution
Accepted by topic author Floris
04-21-2017 02:35 AM

Re: How to handle 40 of the same little GUI's

Use arrays, regardless if this is the final UI design.  Even if you are using listboxes, subpanels, or other ways of presenting the data.  You don't know when the size of your stations, or monitor resolution will change and now you need more or less columns or rows.  Attached is a version that I think is close to what you want.  Once a second it updates the values for 30 stations (as an array) and then displays them in 3 separate but duplicate arrays that show 10 stations each.  Each is offset by 10 so the first array shows 1 through 10, the next 11 through 20.  When there is a value change on any of the 3 arrays we find which index changed, and what button was pressed and show a dialog for the appropriate station.  I left the index display visible on each of these three arrays to show but they can be hidden later.  The only issue with this design is every element in an array must have the same properties.  This means the same font in each control, the same color etc.  The only thing that can change is the value.  So in this case I put a color box behind all the controls and can change it's value from red to grey as needed.

 

Main UI.png


  Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
Going to NI Week? Checkout the Advanced User Track sessions put on by LabVIEW experts.
And attend the community ran LAVA BBQ Tuesday evening for a chance to have discussions with other LabVIEW enthusiasts.

Message 4 of 11
(280 Views)

Re: How to handle 40 of the same little GUI's

To add to the others' suggestions, no, you can't combine controls and indicators in a cluster, but you can disable controls, which would effectively make them indicators.

0 Kudos
Message 5 of 11
(276 Views)

Re: How to handle 40 of the same little GUI's

Wow, I posted my question just before going home for the day .... frustrated. Just arrived home and looked to see if any one had even read my question and then to find out that already many people made suggestion and even came up with a solution that seems to precisely do what I was looking for is amazing, many tanks to all of you.

 

I'll be looking into the solution in more detail when I get back to work tomorrow but again, many thanks, this forum is amazing.

 

0 Kudos
Message 6 of 11
(256 Views)

Re: How to handle 40 of the same little GUI's

You can't mix controls and indicators in cluster but you can make them all controls and then use the property node for the control to read and write values so that it doesn't matter.

0 Kudos
Message 7 of 11
(212 Views)

Re: How to handle 40 of the same little GUI's

Is it necessary to control and monitor 40 instruments in separate panels? Will graph indication work better?

40 temperatures.png

0 Kudos
Message 8 of 11
(204 Views)

Re: How to handle 40 of the same little GUI's


Floris wrote:

I'm just starting to use LabVIEW and have only done a few small and relatively easy projects. My current project didn't seem that difficult either but I'm encountering some 'challenges'. 

  


Then this probably isn't the right suggestion but...

 


In this project we have 40 test stations ... certain temperature ... specific load ... We measure and log the load, temperature, displacement and a pressure values at each test station. If the test item breaks the load will change rapidly and the background of that test station needs to become red.

 

... we kind of need 40 individual log-files and also 40 individual start and stop controls  


the Actor Framework seems like the perfect tool for 40 slightly different objects of the same class. You could use a 'MeasurementStation' class which has private data values for load, temperature, log path, etc and then ran the measurements and wrote them to its log file. The class should provide a UI (probably in Actor Core is simplest) and a message to 'Embed in Subpanel' or similar - this can just involve a subpanel reference in and an invoke node.

 

Then your launching VI can run a For loop, setting the relevant load, temperature and log values with accessors before launching the new Actor 'MeasurementStation' object and storing the enqueuer in an array.

 

To start or stop, you'd just take the array index in which you clicked, access the enqueuer from your array, and then send a message to the appropriate station.

 

Apologies for largely ignoring your initial sentence but I do think this might be a useful solution to consider if you have time to learn a new architecture. It takes a little bit of head-tilting...

 

Edit: You can't put subpanels in arrays, so instead you can have the measurement station send messages to caller when something happens that you care about (e.g. breaking, periodic updates) and then have the calling VI update a set of indicators in a cluster in an array by index. Store the index in the private data to make this simpler and send it with each message (so you don't need strange look-up settings).

0 Kudos
Message 9 of 11
(189 Views)

Re: How to handle 40 of the same little GUI's

I'm going to use Hooovahh's solution as it is exactly what I need. All test stations visible so the operator can immediately see all the data and be notified by the change of color of the test station color box if a test item fails. It's a lot of visual information but it will be displayed on a 50 inch TV hat will stand between two rows of 20 test stations so it should be OK.

 

I'm planning to use the 'Continuous Measurement and Logging' template and although I seem to understand the basics of this template it will definitely take a lot of effort from me to make it work for my situation. However, as I understand it, this template is kind of the go to framework as advised by NI so better use this structured approach as oppose to the messy VI's some of my colleagues produce Smiley Very Happy

 

Thanks again for all the help and you probably see me back on the forum with other questions ! 

 

 

Message 10 of 11
(150 Views)