LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger a user defined event

Hello,

 

 In my application, there will appear a dialog when an error occurs. I hope when pressing the "OK" button on the dialog can notify the main loop to stop, please advise how todo this.

 

Thanks

 

David 

0 Kudos
Message 1 of 8
(3,821 Views)

Hi David,

you can place a case structure after your dialog. If the result is "true" then you can generate an User Event.

 

Mike

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

dialog.PNG

 

Use a dialog button.use a case strucure

Message Edited by muks on 08-11-2009 04:22 PM
0 Kudos
Message 3 of 8
(3,808 Views)

My idea as follows:

 

 

捕获.jpg

 

hope can stop the loop by the user defined event, but this event never be triggered. Please give an advise.

0 Kudos
Message 4 of 8
(3,780 Views)

Hi David,

if you ask the user before the user event, then you can simply use a case structure.

 

To get the event, you have to generate the event. Use the "Generate User Event" function for it. You should create the event in any case. Decide only if you generate it or not. Don't forget to use the "Destroy User Event" function.

 

Mike

Message 5 of 8
(3,756 Views)

Hello Mike,

 

As your hint I make such a block diagram:

 

 

 捕获.jpg

 But it  cannot find any defined data label I've defined from the event structure's terminal. Please give a support.

 

David

 

 

0 Kudos
Message 6 of 8
(3,720 Views)

Hi DavidLee,

see the two possibilities to solve your problem.

 

Mike

Download All
Message 7 of 8
(3,713 Views)

Hi Mike,

 

That is what I need. Thankyou very much.

 

 

David

0 Kudos
Message 8 of 8
(3,671 Views)