LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front Panel Event case

Hello, guys

I am having some issues with data being uploaded from a spreadsheet to a VI. When I import the data, I have to plot the graphs and refresh the status bar of my program. The problem is that I also have to go back to the initial state of the program, so the same status bar is updated again, missing the data acquired.

 

So I want to make an event case, on which i can click anywhere in the front panel to change back to initial state. Is it possible? If so, how can I make it?

 

Ty in advance

Lucas Faquim
0 Kudos
Message 1 of 8
(2,632 Views)

Faquim wrote:So I want to make an event case, on which i can click anywhere in the front panel to change back to initial state. Is it possible? If so, how can I make it?

What you want is the Pane->Mouse Down event in the event structure.


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 2 of 8
(2,623 Views)

Hi Lucas

 

You can use the Pane > Mouse Up event to do this.

Place your initialisation code inside this event.

 

Good luck

NeilR

 

Message 3 of 8
(2,622 Views)

Is there any ways of building an event struct inside a sequence struct or a case struct? I mean, does LabVIEW understand the  event inside the other struct, or does it need to separated

 

In this case, the even i need to create has be inside a sequence which will be inside a case struct, since I only want the click on front panel to be understood as an event after I reach this case?

 

PS: edited

 

Ty in advance

Lucas Faquim
0 Kudos
Message 4 of 8
(2,594 Views)

@Faquim wrote:

Is there any ways of building an event struct inside a sequence struct or a case struct? I mean, does LabVIEW understand the  event inside the other struct, or does it need to separated

 

In this case, the even i need to create has be inside a sequence which will be inside a case struct, since I only want the click on front panel to be understood as an event after I reach this case?


No, don't do that! Please rewrite your code as a simple state machine. Keep e.g. an extra status boolean and then decide based on it if the mouse down should trigger a reload. Never hide event structures where they cannot be reached by dataflow at all times.

 

Please show us your code, because most of your descriptions don't really make sense.

 


Faquim wrote:

I am having some issues with data being uploaded from a spreadsheet to a VI. When I import the data, I have to plot the graphs and refresh the status bar of my program. The problem is that I also have to go back to the initial state of the program, so the same status bar is updated again, missing the data acquired.

 

So I want to make an event case, on which i can click anywhere in the front panel to change back to initial state. Is it possible? If so, how can I make it?


What is "uploading"? Sound more like a simple "reading" (or downloading, if the file if across a network).

What does the status bar have to do with the spreadsheed data?

 

 

 

0 Kudos
Message 5 of 8
(2,583 Views)

The most of this code is not really mine... What I did there was the button "Carregar dados" and its all based on an event for a double click in listbox.

 

What I am doing is basically importing data from a .txt (which I plot the graphs) and in my computer there is another .txt which has to be opened with all the stats of the test. Well, the stats (like number of stages, rotation, torque...) they all have to be written in the stats bar, when I double click one of the tests. Execution is pretty fine, the stat bar is being updated the problem is that I have to go back to initial state of the program, and When I set the initial stage it writes another thing to the stats bar - "Aguardando ação do usuário". 

So basically i gotta create something to block this thing to write on the stats bar, without deleting it, since its important in the conclusion of the tests...

I was thinking about an event for a click in the front panel but I realized this would affect the whole program. 

I am sending the whole programm, even though a big part of it is not a big part of this discussion.

To go to the important part, navigate trhough the event in the right to see the double click event for the listbox and in the sequences look for the state 5.

 

Ty a lot for your time and help

Lucas Faquim
0 Kudos
Message 6 of 8
(2,565 Views)

I am sorry about the last message, i couldnt edit it...

I am sending a new Vi, a simplified version with the issues related.

 

Note that the stats bar is always showing the same message - "Aguardando ação do usuário". I want to make it appear the message containing all the stats from the test imported.

 

Ty in advance 😄

Lucas Faquim
0 Kudos
Message 7 of 8
(2,556 Views)

I had an idea and i think i can make it work...

But to do so I want to ask if is there any ways to create a case struct to detect if front panel was clicked anywhere, instead of making an event struct.

 

Ty again, for your time and understanding, and of course, your help =]

Lucas Faquim
0 Kudos
Message 8 of 8
(2,551 Views)