06-01-2018 02:27 AM
Hello Joerg
Good to know. I was thinking the mistake was done by me. Your idea with an additional wrapper is a good solution to go on. In my application I need all broadcasts, so also the special broadcasts per modul, though. Finally I now take the origin Start.vi's. Because I have only 10 moduls to implement it is acceptable.
br Markus
08-30-2023 04:42 AM
Hello Fabiola,
I'm doing what are you suggesting on the second option, but I'm not capable of registering broadcast events from other modules. The thing is I implemented this on a logger module and my idea is to record messages from other modules using the broadcast functionality.
If the modules are running and I use the default send MHL or EHL error buttons, I should have be able to record them on the Logger module, right?
Thanks in advance.
08-30-2023 04:55 PM
Are you starting your logger module when all the other modules are already running? Or, in other ways, have you made sure that the other modules are already running when you start your logger?
Beware: The "Obtain Broadcast Events for Registration.vi" will only return the actual references if the corresponding module is already running. See https://documentation.dqmh.org/DQMHProjectStructureOverview.html for more details.
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 )
08-31-2023 02:05 AM
You are right, the other modules have to be running. I tried this and it works. The thing is I want to create the logfile at the same time when I start the UI module, that's why I was sending this message to the Logger module.
I've managed to get it to work with this workaround (something similar to Fabiola'a 1st option), but I don't know if it's the most elegant solution:
08-31-2023 08:48 AM
At HSE, we strongly recommend not to place any code (other than preparing event registrations) outside the MHL or EHL. Or, to be more precise, we do not execute any code before the "Initialise" case in the MHL has finished executing.
My suggestion would be to have a single module that takes care of starting modules, then taking care of any event registrations (potentially asking one module for its broadcast references and then forwarding those references to another module for dynamic event registration without any static dependencies between those modules), and only then triggering modules to start doing their actual work like initialising log files, connecting to hardware etc.
That way, you have full control over when to execute which part of your code or application.
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 )