From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Manage the main VI

Hello!

 

I have problems how to manage my main VI  and organise the front panel, which will be after my final User Interface, in order to have the succession of the following events :

1- Select a file (from wich we will import data to labview)

2- select the type of analyse to do : A or B ,

      ----> If B is selected , we choose from a list box 2 options ( a,b,c,d ...)

3- Display graphs corresponding to A ( if A is selected) and graph corresponding to B ( il B and then a,b,c,d are selected) 

4- have a quit buttom to reset all controls when exiting and a help buttom to explain to the user how does the application work

My problem is when I run my program and press for example ''select the type of analyse to do"buttom, the program stops and doesn't continue running! How to manage chronologically the scenario above.

Any suggestion will be appreciated, thanking you

 

0 Kudos
Message 1 of 14
(2,853 Views)

Hi Student,

 

My problem is when I run my program and press for example ''select the type of analyse to do"buttom, the program stops and doesn't continue running!

Then there is a problem in your program, but you didn't attach that VI to your message…

 

How to manage chronologically the scenario above.

When you want to execute several states in a certain order you might use a state machine…

Best regards,
GerdW


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

No idea.  If you had attached a VI, we could look at it and give you guidance on what the problem is.

 

In general, when you have a series of actions you want to take, you should be looking at a "state machine".

 

PS:

"Select the type of analysis to do"

"Button", not "Buttom"

0 Kudos
Message 3 of 14
(2,846 Views)

It sounds to me like a Tab control would work well (though i already hear how some users are typing an answer), 1st tab to select file and testmode, then select 2nd tab for A or 3rd for B.

Selecting the analyse should not affect anything at this stage, unless you manage to create a wild loop.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 14
(2,830 Views)

Thank you for your responses, 

You will find attached the main VI that I have done

When speaking about state machine, what is it about exactly, it's different from what i have done ( event structure, condition structure ...)?

0 Kudos
Message 5 of 14
(2,825 Views)

There's no loop around your event structure, so once any event case executes, the program will end. As a start, put a while loop around it.

Message 6 of 14
(2,803 Views)

Application Design Patterns: State Machines


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
Message 7 of 14
(2,800 Views)

The one iteration while loops in the two cases of your case structure serve no purpose.  You can eliminate them.

 

Also your single frame sequence structures are not needed in the other event cases.

 

Make sure all of your controls have meaningful labels that are visible on the block diagram.  You can hide them on the front panel if you want.

Message 8 of 14
(2,771 Views)

 

Hi!

When running my code, and press one botton, for example ''select a file" , then i can't press the following buttons in order to continue to choose the options, that depending on them, i will have the correspondent graph.

In fact, what i want is to  ''Select a file'' then "select the type of analyse to do : A or B ,    ----> If B is selected , we choose from a list box options ( a,b,c,d ...), and finally press Display graphs to show the resulted graphs that suits my options selection.

So what can i do to press many buttons in a single run of the program

I Thank you in advance. 

   

0 Kudos
Message 9 of 14
(2,671 Views)

Hi Student,

 

again you failed in attaching your current VI…

Best regards,
GerdW


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