From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-20-2021 03:17 AM - edited 09-20-2021 03:30 AM
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.
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?
Solved! Go to Solution.
09-20-2021 04:13 AM
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
09-20-2021 07:07 AM
@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.
09-20-2021 08:04 AM - edited 09-20-2021 08:07 AM
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.
09-20-2021 11:29 AM
@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.