Koushik Shetty
Koushik Shetty

Reputation: 2176

Subsequent events not triggering in while loop

I have a MAIN VI and a SUB VI which communicate events through control refnum. flow of events is as follows.

1) sub vi changes a value of its control and this event is handled in the main vi(this works).

2) main vi in response to the event changes one of its control and triggers an event from the event handler itself which is handled in the subvi event handler.(this also works).

The first phase is over. Now the main vi is running a while loop and the sub vi is running a while loop and main vi triggers an event every ~150ms. Which is to be handled in the subvi. This is the part which is not happening. I can see the main vi's control getting updated but the event(if generated) is not handled by the subvi. I'm using control's property node->Value(signalling) to change the value as well as trigger the event. What can be the possible cause?

note: the control (whose value is changed), event handler are the same as in the first phase.

Hope my question is clear.

Upvotes: 0

Views: 253

Answers (1)

Koushik Shetty
Koushik Shetty

Reputation: 2176

i found the problem . the subsequent events were not being handled because the loop in which the event handler ran looped once i.e the initial condition was itself false so the loop only ran once. this loop was controlled by stop if true. it had to be continue if true. the boolean variable that controlled this loop was true. this should have been my first clue.

Upvotes: 1

Related Questions