LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

queuing events using user events

Hi

 

i am making one vi using user events in which what i want to do is want to execute one event after another sequentially by using user events, i know we can di it using queues also but our requirement is to do by user events

 

i have tried something in the vi i ma attaching below, but getting wrong somewhere.

 

Thankyou

0 Kudos
Message 1 of 8
(2,770 Views)
Why not use simple state machine with enum control and case structure. Any specific reason for user events??

Coming to user events, u've kept cluster of 1-D array as data type of user event. After ur first boolean2 button triggers event and then what event should happen?

According to ur code, When u click boolean2 button, it'll generate user event-there is one <My User event>: user event which will be occuring next.

Please can u explain little more on the problem??
Thanks
uday
0 Kudos
Message 2 of 8
(2,763 Views)

Thanks Udka for reply,

 

actually this is part of the application i am working upon, it is already been created with user events so we cant change the architecture, yes it's going to my user event after boolean2 button triggers but what we want is it should go to boolean3, then boolean4 and boolean5 event case, that i am not getting how to do.

0 Kudos
Message 3 of 8
(2,760 Views)

Perhaps add more specific user events, then double-up the events handled:

 

events.png

 

And I get another chance to show Jack Dunaway's User Events presentation!

Download Jack's presentation (all VIs, no powerpoint), here:

https://github.com/w...icks-and-Sundry

"Download ZIP" button

Message 4 of 8
(2,757 Views)

ThankYou Todd_Lesher fir your reply,

 

i will try this way that you have explained but is their any way that we can do this by using the serial number of the event cases in array in generate event vi, like in the example https://decibel.ni.com/content/docs/DOC-4111 shown in this link
they have fired one event using another by using some array number but i aqm not getting how it has been done in this example.

0 Kudos
Message 5 of 8
(2,734 Views)
Yes, you can do that also. In user event, You have to change the Boolean value of the control(Triggers value change event for that specified boolean control) for which you want the event. and so on.

As far as i know ,the User event Data type doesn't give any info on what event should happen next.That can be used to pass data during that operation.
Thanks
uday
0 Kudos
Message 6 of 8
(2,732 Views)

That example just shows how to fire a user event when a value-change event is fired.

If all of your user events have the same data type, you could make an array of them and access them by array index.

0 Kudos
Message 7 of 8
(2,724 Views)

Todd_Lesher


 

 

Perhaps add more specific user events, then double-up the events handled:

 

events.png

 

And I get another chance to show Jack Dunaway's User Events presentation!

Download Jack's presentation (all VIs, no powerpoint), here:

https://github.com/w...icks-and-Sundry

"Download ZIP" button


This method told by you is working fine but we trying to solve one problem athat we are getting i want to know if it is possiblelike in the approach you had told we need to add up more user events and then need to increase the events handled i want to know is there any apporach by which we dont need add up and register user event every time, so that even if we increase our controls from 3 to 5 there is no need to add up more user event and register themseparately means some for loop or with the help of array if we can do, we tried with for loop but their also while registering we are getting problem,

0 Kudos
Message 8 of 8
(2,655 Views)