LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure and while loop

Only use 1 event structure. You can handle all events with one event structure. Things can easily go wrong with multiple event loops. See the shipped examples (producer/consumer with events, etc). If you feel you need to use more than 1 event structure, most probably you are going in the wrong way. Repeat myself: learn from the shipped examples.

 

edit: of course, I mean you better to use only 1 event structure in your top level main VI (additional dialog subVIs may have event loop, it is ok).

0 Kudos
Message 11 of 12
(420 Views)

@fedezava88 wrote:

Here is my code. It is ok to use the enum or ring but since I need to add more event structures I was trying to figure out what is wrong.

 

Thanks again for all the help.


Lets go back to the original question. I downloaded the code from the link you posted. The START (label: OK Button), STOP (label: Stop Button), RESET (label: Process Stop Button) and QUIT (label: Cancel Button) buttons are not wired to anything, and not included in any event structure, so they do exactly what they should - nothing. You need to use them somehow in your code in order to see some action.

 

The front panel control of the stop terminal located in the event case in the main VI, is hidden on the left side of the user interface. The front panel doesn't have scroll bars at all, so during runtime there is no way to click on that control, so the main while loop cannot be stopped at all. You should edit the event case, so that it uses the control labeled Stop Button, in order the VI execution.

0 Kudos
Message 12 of 12
(393 Views)