08-27-2009 04:30 AM
Hi, I have been trying to solve my code. it has event structures and do not know how to work around. Actually, I have two buttons, the first button start an event when value change, and the second one stops a while loop inside the event when also its value changed. But the problem is, once the first buton is pressed, i cannot press the second button.
Please find the attached code.
08-27-2009 04:41 AM
SOme points:
First the source of you problem is taht the 'Start Event' is configured to lock the FP unitl the event is finished, however since you stall the event with a while loop inside you will never 'finish' the event. To overcome this uncheck the setting 'Lock FP' in the event dialog.
Second it is a bad idea to have a while loop inside an event case, try to get the 'End loop' as an event as well.
And let this event finish the main while loop.
Ton
08-27-2009 04:42 AM
Hi Thabos,
you should deal each control event separately.
Please try the vi in attachment and check whether it works.
08-27-2009 04:53 AM
thabos
also you should look into the example finer and tutorials to help you learn good programming practices such as how to use a event structure.
have a good day.