LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

running event inside DNET while loop

Hi,
I am using DNET's I/O Communication VI for sending and recieving data from a DNET device. This VI has a while loop which is running all the time, exchanging data with the selected device. Now, I have a few controls in the front panel which should be programmed using the event structure. When I click on these switch, an event should be triggered which would then send the new data to the selected device using the I/O Communication.
Since I already have a while loop running all the time, is it possible to put the event structure inside this while loop. If yes, how should I terminate the events.
I have tried putting the event structure both inside and outside the loop. Both the time, my program stalls,
and the front panel switches dont operate.
Please let me know how to get around this problem. I have attached the main file, but not included all the subvis's..but you would have a good idea if you have a look at this vi.
Thanks.
0 Kudos
Message 1 of 2
(2,536 Views)
I took a quick look at your application. I saw this nesting structure:
While loop
- While loop
- Event structure

What you should have is the two while loops in parallel. ie
While loop
While loop
- Event structure

To terminate both parallel loops simultaneously, give the stop button its own event.

I don't know what you mean by the switches not operating.
- If you can change the values, but nothing happens, then your event structure is not active. i.e. the while loop the event structure is in has already terminated
- If you can't change the switches, then your front panel is locked because an event case is still executing.
Message 2 of 2
(2,536 Views)