01-14-2013 01:15 AM
Hello,
I want to use 2 buttons Pass and Fail instead of stop button.
Means here in attachment I have made one sample program which is similar to my actual program.
In that case there is one continuous run time function(device) is arrange in while loop and we have to check the functionality of that device,when user thing that this device is working good then he will press pass button so message in log window will display that device is pass and process will stop.
And suppose this device is not OK then user will press Fail button so message will display that device is not OK.
Hope you will get me..
In attachment I want to use Pass and Fail button instead of stop button so user can press any button and stop the process.
Thank you very much in advance.
01-14-2013 01:40 AM
User Event Structure.....right tool for the right job. Handle either button press with separate event cases.
01-14-2013 02:04 AM
Thank you BillMe,
Can you please send me any example vi regarding to this ,
becase I am not sure how to arrange this event structure in this case , my whole programme is in Event structure and this testing is part of my Main programm.
Thank you very much for replying.
01-14-2013 02:15 AM
If your code is already in event structure then you can add the Value change events for both the Ok and Not Ok buttons in the same event case and check one of the value and give the output. Main thing is set the Button's mechanincal action to Latch when Released.
01-14-2013 03:06 AM
Thank you very much for reply,
Here in attachment I have put my sample vi with case structure,will you please guide me that what kind of change I need to do in that?
I tried with given solution but may be I missed some concept so I am not able to get solve the problem.
Thank you very much for understanding.
01-14-2013 03:51 AM
You are currently missing a couple of concepts :D. If you made the current code, you seem to know how to configure events, so simply create another event for the fail button. I actually could not find a fail button in your code. Where is it?
In addition, you might want to give all controls a label, especially the ones used for events. A ["": value change] event make the code hard to read and debug. Why are there 2s waits in the dialog cases? The code won't continue until the dialog is acknowledged, the wait just throws more sand into the gears. 😉
I would also strongly recommend to keep user iteractions handling to the upper loop. For example, the pause handling is just weird. Also the "maths" state has a CPU burner loop ...
01-14-2013 04:37 AM
I tried to implement Event structure with pass and no pass event but still I am confuce will you please guide me that what should i have to do in order to user choice message.means pass or fail.
here in attachment I have attached that vi.
Thank you for help.
01-14-2013 06:27 AM
Have a Look
01-14-2013 06:46 AM
Thank you Himanshu for reply,
I think my structure is may be different, in your case its OK but how can I get same function in attached Vi.??
Please guide me..
I am confused at the math function loop what kind of logic should I use to get appropriate solution??
Thank you very much in advance.
01-14-2013 08:42 AM
its solved now...
thank you vary much to every one who has spending their time ,.....