LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Design UI by using event structures(Urgent)

Hello, I am new to LabView. I would like to design a main UI which was consisted only 2 button, "OK" button and "Close" button.
If the user click on Ok button then it will go to the sub VI. However, "Thank you" will be prompted out after "Closed" button was clicked.
Can I use event structure method? Can anybody help me, please.

Urgent

Thank you.
0 Kudos
Message 1 of 12
(3,132 Views)
Yes you can.

Try it out and if you don't succeed come back and
1. post a screenshot of or a sample of your code.
2. ask question about the things that dont work.

André
Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 12
(3,113 Views)
Yes, you can use an Event Structure.
Place the Event Structure inside a while loop. Edit Event case to Value changed Event for your button and place the button-indicator inside that event case. Wire the indicator to the stop terminal if you want the program to stop for that case (all other cases are covered by the default value). Place a dialog inside the event for which to show.
Thats it.

Felix
0 Kudos
Message 3 of 12
(3,112 Views)

Try searching the example finder for more VIs based on Event Structures.

You can see the Dialog Using Events template to get an idea to design yours.

- Partha ( CLD until Oct 2027 🙂 )
Message 4 of 12
(3,100 Views)
Quick example using the LV template.
- Partha ( CLD until Oct 2027 🙂 )
Download All
Message 5 of 12
(3,101 Views)
Thank you, guys. My labview version is 7.0. I cant open those labview file which is late than 7.0 version >.< (is there any example in 7.0?)
I got what you all mean. I will try it out now. Thank you for the help. 😃
0 Kudos
Message 6 of 12
(3,091 Views)
The two files is labview version 7.1. I cant open it because i am using labview 7.0. Is there any matter to open those two files by using labview 7.0?
0 Kudos
Message 7 of 12
(3,078 Views)
Why don't you look at the shipping examples. There are several in LabVIEW 7.0. Go to Help>Find Examples. On the Browse tab, expand Building User Interfaces>Acquiring User Input>General. Look at Event Conditional Stop, Event Tracking, and New Event Handler. The New Event Handler is probably the simplest and pretty close to what you are asking for.
0 Kudos
Message 8 of 12
(3,075 Views)

As Dennis told you, there re several examples inside LV itself.

Here you can ve those VIs in 7.0.

- Partha ( CLD until Oct 2027 🙂 )
Download All
Message 9 of 12
(3,048 Views)
Dennis and Partha, thank you for the examples that you both suggested. I really gained a lot from the examples. I had solved the problem for the event structure. However, when i run the problem that time it showed me errors, "error-1073807346 occurred at VISA Open in version 1.vi--> Error Occur.vi". I am suspecting that the port for VISA in version 1 was not been selected therefore the error occur. Do u think that is the reason?

After, I try to put the whole version1vi inside the event structure instead of a combined sub vi of version 1. It work but the front panel is not stay alone because the buttons, Ok and Close were put with the version 1's front panel.

p/s: how can i put picture with the post.
       how can i put a link for downloading the vi.
Is it just copy the file location in my pc and paste on it?

Thank you a lot.
0 Kudos
Message 10 of 12
(3,038 Views)