06-23-2009 09:12 AM
Hello
I search a little tutorial, to explain the event structure.
I saw the examples in the help of Labview but they are too hard to understand for a novice.
I would like to create a simple structure where a event like a "clic" will generate an event and this event will start a timer for example.
Thanks for your help.
bye
06-23-2009 09:29 AM
The event structure will respond to user events either on the entire Front Panel or on a single control.
For example, if you have a button, you can register the 'mouse click down' or 'mouse click up' or whenever the mouse moves over the button.
I attached a very simple example of how the event structure works.
In my example, there is a boolean indicator on the front panel.
When the user moves their mouse over the boolean, it turns on.
In the block diagram, you can right click on the event structure and click 'add event case'.
See what you can come up with.
06-23-2009 09:35 AM - edited 06-23-2009 09:35 AM
Here is the example you requested:
Run the VI.
When you click anywhere on the front panel, a timer will start.
I had the loop stop after 5 seconds.
06-23-2009 09:47 AM
Thanks for your help but I have Labview 8.5 and not 8.6, apologise...
I can not open the files, do you know a method to open labview 8.6 files with the 8.5 version, or it's impossible ?
06-23-2009 09:53 AM
06-23-2009 10:20 AM
I really don't like Cory's example for various reasons:
Here's a simple event example that manipulates the timeout to achieve a conditional timer. see if it makes sense. Modify as needed.
(see also this post for a more complicated example with four timers)
06-23-2009 10:35 AM
Ouch.....
Hehe thanks Altenbach
06-24-2009 02:58 AM
Thank you for your help, I have two questions:
- I haven't understand why do you use a selector with (100) for the configuration of the time for the event structure, and the aim of the decalage register.
- Do you know how to select dynamics events when you edit the structure, because there is some examples where you can choose a dynamic event but when I create my own structure, and when I edit it "dynamic" is in grey and I can't use it.
06-24-2009 03:29 AM
leo2b wrote:- I haven't understand why do you use a selector with (100) for the configuration of the time for the event structure, and the aim of the decalage register.
The 100 is an arbitrary timeout value, in this case the timeout case will execute every 100 ms if we are running the timer and never (-1) if we are not counting. You could set it also to 1000, since we are only displaying full seconds. This is how we dynamically change the timeout value as a function of program state.
leo2b wrote:- Do you know how to select dynamics events when you edit the structure, because there is some examples where you can choose a dynamic event but when I create my own structure, and when I edit it "dynamic" is in grey and I can't use it.
It is not clear what you are doing. Can you show us a screenshot?
06-24-2009 09:05 AM
Thank you for your help.
I put here what I see when I speak about "dynamic event in grey".
bye