I have to develop a GUI, and in this gui i have to control four bottons, like start, break, continue and stop. how can i use this buttons in the front panel and where should i place my execution code in the block diagram and how should i connect all these states like start, break, continue and stop to my program.please explain it with any example. thanks
I would suggest that you start with the numerous shipping examples. If you go to Help>Find Examples and from the browse tab, open the Building User Interfaces selection and look through them. You might want to use the Event structure as in the example New Event Handler, or a state machine as in Queued Message Handler, or a combination of the two.
Thanks. i already added start and stop buttonin my GUI . i attached the GUI/VI. but now i would like to add Break/Halt and Continue Buttons. that means when i want to halt the execution i can simply halt/break and when i want to continue, i can simply continue it with continue button. what change i have to do in my VI. thanks for tips. Regards
I don't have 7.1 yest so I can't open your VI. What are you trying to pause? If, for example, you have a separate data acquisition loop, you could set an occurance or notifier in your user event handler that's monitored by the daq loop. There's also the example here that might give you some ideas.
You can put a case statement inside your loop that executes when your Break button is pressed. Inside the True case, put a loop that waits for the Continue button to be pressed. See the attached vi.
Thanks. i tried this example. now i am passing the variable break and continue to AO write VI, so that it also halts or continue writing when i send break and continue events. but it seems that i cannot send this events towards left. so now with your example i can halt the vi in the loop, but if if i want to halt/continue it just before writing AO or if i want to halt/continue at some other place how would it look like. i make some changes in the VI and i am sennding it to you. please tell me how can i correct it.? with regards.
You have your AO Write inside the false condition of the case structure that you added. Move the AO Write to after the case structure. The false conditon should do nothing, except route your numeric and error wires straight through. If you want to interrupt the AO Write after it has started, then continue again, you will have to put the case structure and AO Write in a loop just like it is in the section that is now working.
thanks. ok i moved AO write outside the case structure. but it is still not halting/continue. there are two AO Write. which Ao write, i have to bring in the case structure. the one i just move it? i am sending you my updated VI. please can you show me the example? Regards
I don't understand why you have two AO Writes. Usually you write to the AO and then do AO Start. Your second AO Write does nothing, it does not even have data input. Once you do AO Start, I don't think you can interrupt the output, it is under hardware control at that point. Look at NI's examples for AO.
Thanks for your suggestions. i made some changes and now i can halt the AO write VI and continue it again. just please check it and tell me whether the functionality is the same or wether the functionality of the program has been changed. regards and many thanks