06-27-2025 11:33 AM - edited 06-27-2025 11:35 AM
If my EHL receives a broadcast, and in response to that needs to message another module, should it be going via the MHL?
In a lot of places in my code I have option A occuring, where a broadcast will come in and I immediately want to message something else, so I send that request straight from my EHL.
However it occured to me that perhaps B is actually the reccomended way as it means the EHL doesnt have to have a list of any module IDs and it keeps the MHL aware of everything going on. I hadnt felt option A was clogging up my EHL as its just sending a request, but certainly if I wanted to do some other action I'd need an MHL case.
But to change it I'll have to manually make every corresponding MHL case, and make every event case send messages to these. The lack of scripting of this makes me wonder if it is the reccomended way?
Wanted to check before i embark on something quite tedious.
Solved! Go to Solution.
06-27-2025 01:10 PM
Any of these options are probably fine, I don't see an inherent problem with A or B. And there's also option C, where you have a Helper Loop that is responsible for registering for broadcasts of interest, and then messaging the other modules from there. That way your helper loop is responsible for maintaining the Module IDs and you don't need to set up any additional inter-loop communication.
The possibilities are endless at least three!
06-29-2025 01:00 PM
Adding any data (eg module IDs) to the EHL is a „yellow“ flag for me and I would take a good look at all alternatives before going with it.
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
06-30-2025 04:21 AM
Okay thank you, do you generally forward all your broadcasts that you receive to the MHL then?
06-30-2025 04:49 AM
@Shiv0921 wrote:
Okay thank you, do you generally forward all your broadcasts that you receive to the MHL then?
It's difficult to give a blanket answer. I'd guess though that the most common use case for me is to have a helper loop as I prefer to keep the module-internal events (EHL) and external events (HL) separate.
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
07-01-2025 04:55 AM
Okay thank you! I'll do some more reading on the different flavours of helper loops. Cheers
07-01-2025 05:59 AM
May I suggest the following two reading resources:
1. https://dokuwiki.hampel-soft.com/kb/labview-frameworks/dqmh/starting-modules
2. https://hampel-soft.com/blog/dqmh-actors-self-messaging-or-helper-loops/ (somewhat dated but not completely obsolete)
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
07-01-2025 06:44 AM
Thank you! Yes I restructured where I'd been starting my modules just this week based on your link! Great resources.
Will read through the helper loop one 🙂 I've already got a number of helper loops for repetitive tasks, but hadn't considered other options for them, like message forwarding, which I like the idea of. So thanks