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.
Lately I've been running into lots of code that looks like this:
I just need to start a module, call a request (and wait for reply, usually), then stop the module. I think it would be convenient if the module templates included a 'Start and Sync Module' VI that wrapped the Start Module.vi and Synchronize Module Events.vi. This is for the use case where you won't be needing to register for any of the module's broadcasts.
Edit: As soon as you start adding broadcasts to a DQMH module, these new broadcasts will be added to the cluster of broadcast events. Seeing as this cluster sits on the connector pane of the "Start Module.vi", adding broadcasts changes the Start Module.vi's type specification.
Our "Load Module.vi" encapsulates the Start Module.vi and hides away the potential modifications. This allows us to load any HSE-ified DQMH module dynamically from our application template.
Seeing as we use our own HSE Logger for debugging, we do not have to rely so heavily on the default broadcasts of our modules, especially during the startup phase. We can always go and register for specific broadcasts later.