LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event user

Hello,
I would like to know if somebody could explain me what is the relation between create user event /register event /generate user event /unregister user event /destroy user event and maybe show me this relation by one or more examples in order to see the different way to use them?

Thanks.



0 Kudos
Message 1 of 12
(3,949 Views)
Hi,

take a look at the LabVIEW examples:
Help->find examples

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 12
(3,941 Views)
Hi,
I had already take a look at the Labview examples but no one matches close enough to what at  need to understand, I attached a kind of what I am trying to do.
If you run the program in highlighted mode you'll see that its stopwhen the signal reach the event structure and I don't know why maybe you could explain me that point?

Thanks for your help


Message Edité par olivier66 le 02-21-2007 07:31 AM

0 Kudos
Message 3 of 12
(3,932 Views)
Hi Olivier,

The event case is waiting on one of your three 'user events'. These 'user events' have to be controlled programmatically, eg. by a 'generate user event', just like in your 'Action->start' event.
If you want the program to react on events on the front panel, add new events specific for these events.

Right now your program, just waits for a 'user event' (the name 'user event' is misleading, it allows the program to control 'user events' as if the user has done some action), and never executes the event case.

Ton

PS remove the 'exit LabVIEW' function before posting!!!!
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 12
(3,928 Views)
Hi,
I don't think I have got everything understood, I have tried what I thought you was saying but this still doesn't work.
as you can see in the modified file I added a button to make appear a new evenement but when I click on this button nothing happen.
So I guess I did it the wrong way.
may I ask  you to send me a working modified version of my VI ?

PS: I replaced EXIT Labview by Stop hope it is enough and I understand it is boring to restart labview everytime you run my VI, sorry about that.


0 Kudos
Message 5 of 12
(3,922 Views)
Bonjour Olivier,

There are different type of events:
  1. GUI events, these are generated on basis of action of the user, and can directly be accesed by the 'event structure'
  2. DAQmx events, these are generated on basis of DAQmx  events
  3. User events, these can be generated within the code
You are looking into the third, but you are never generating one!
I modified you last code, and post a screenshot of my edit:

I removed the new user event because this is not what you want
I added a event case in the event structure (right click on the event structure border, add event case and selected Boolean -> Value change.)
Inside that case I generated the action start user event.
However your VI will be stalled inside the event structure, since you don't react on the evenement user event!
Ton

PS I hadn't run your code so LabVIEW didn't exited!

Message Edited by TonP on 02-21-2007 04:28 PM

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 12
(3,916 Views)
Hi tonP,
I'm sorry but I stil don't understand every subtilities of user events
That's why I'm trying to  execute an easier exercise  which is  to make  light a led by a button using user events 
so here is what I have done
could you just tell me what is missing in this program and where should I put the generate user event VI's to make the top VI work.
I think that I will make me understand the method for user event with your explaination

I attached the 3 VI's the first is the top VI and the others are only a button and a led, It would be a great thing if you could send the program

thanks again and sorry for my weakness with this method

0 Kudos
Message 7 of 12
(3,902 Views)
Olivier66,

I made some changes to your programs.  Here's how it works:
- Two "user events" are generated before the while loop starts. They are called led and bouton. 
- In the event structure, there are events for Boolean 2, which is a front panel control.
- When the value of Boolean 2 changes, then the led user event is generated, by the Generate User Event.VI.  The value of Boolean 2 is passed in as the value
- The Event case, <led>: User Event is then fired.  This event is fired becaus the Generate User Event.VI was called.
- I modified your led user event.vi to accept an input, and then pass it to its output.
- The value passed into the led user event, which is the value of Boolean 2, is then passed into your led user event.VI,
- This value is then pased back out, and populates Boolean, which is your front panel LED.

I hope that this helps.

Respectfully,
0 Kudos
Message 8 of 12
(3,892 Views)
Hi Jeffrey,
It certainly may help but could you just compile this for the 7.1.1 version of Labview because it is the one I am using therefore I cannot run your VI's

Thanks for your help


0 Kudos
Message 9 of 12
(3,871 Views)
Hi,
Please Could somebody recompile thooses files in labview 7.1.1 version and send it again.

thanks
0 Kudos
Message 10 of 12
(3,857 Views)