LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop DQMH helper loop

Solved!
Go to solution

Hi,

 

I need a helper loop in my dqhm module but its unclear for me how to stop it. In the CML example project created by Delacor the helper loop subscribes to the Stop module request. The event handler loop subscribes to the Stop module request as well which seems to be a bad solution as NI recommends not to handle the same event in multiple event structures. I know that this solution is legit as I have seen a video which describes that these events are not the same, but I can't find the vid.

 

Could you explain how is it OK to stop the helper in this way?

 

thx.

 

dqmh_stop.png

 

 

EDIT: I have found this topic: https://forums.ni.com/t5/LabVIEW/multiple-event-structures/m-p/1174119#M510673 saying that handling the same event in multiple event structures is fine IF we do the registration to the events like the one above. So the top and the helper loop actually processes the same event, but in this way its OK. Could you confirm that my understanding is correct?

0 Kudos
Message 1 of 5
(252 Views)

You can register for another event which will generate event once the TOP VI gets the Stop Event.

In this case you will have Different User Events for Different Modules

Pazhanivel Thiruvenkadam,
CertifiedLabVIEWArchitect|| CertifiedTestStandDeveloper,
Currently able to Access LV2015&LV2017
0 Kudos
Message 2 of 5
(240 Views)

@PalanivelThiruvenkadam wrote:

You can register for another event which will generate event once the TOP VI gets the Stop Event.

In this case you will have Different User Events for Different Modules


Yeap, thats clear. But it doesnt answer my question.

0 Kudos
Message 3 of 5
(202 Views)

The whole point of using user events as queues is so you can have a many-to-many relationship.  I haven't done that ii a while, but I believe that is how handled it.  Can't find the code right now.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 5
(193 Views)
Solution
Accepted by topic author 1984

@1984 wrote:

 

I have found this topic saying that handling the same event in multiple event structures is fine IF we do the registration to the events like the one above. So the top and the helper loop actually processes the same event, but in this way its OK. Could you confirm that my understanding is correct?


Yes, that's correct. Having multiple Register For Events nodes registered for the same event is fine. The thing that's *not* fine is taking the event registration reference output from a Register For Events node and wiring that to multiple event structures.

DNatt, NI
Message 5 of 5
(175 Views)