01-20-2014 09:50 AM
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
01-20-2014 09:59 AM
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.
01-20-2014 10:00 AM
Hi Lucas
You can use the Pane > Mouse Up event to do this.
Place your initialisation code inside this event.
Good luck
NeilR
01-20-2014 10:38 AM - edited 01-20-2014 10:45 AM
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
01-20-2014 11:17 AM
@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?
01-20-2014 01:45 PM
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
01-20-2014 02:20 PM
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 😄
01-20-2014 02:27 PM
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 =]