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.
06-30-2018 06:12 AM
Is there a way for one module to know and/or check to see if event-registration ref-nums for some other module are valid? I suppose there could be some kind of hand-shake created (something using the round-trip mechanism) between the module trying to register, and the module that is the event owner, to see if the event-registration ref-nums are valid. Then i guess if there is no response, the first module can then attempt to start the module for whose events it wants to register. But would there be a better, neater method, I'm thinking.... like.... checking if the event-registration ref-nums are non-empty, if that's even possible??? if i tried reading event-registration ref-num to see if it's not empty, would I even be able to make sense from what's on that wire? What would be the best way to check if event-registration ref-nums are valid and thus able to register for in my module?
Solved! Go to Solution.
06-30-2018 10:23 AM
Obtain Broadcast for Registration tells you if the Module is already running, if it is already running, the events are valid, if not they are empty.
Inside Obtain Broadcast Events for Registration.vi is another VI that you could also use, the Get Module Execution Status.vi if that or any other request fails, you know the module is not running and therefore the events are not valid.
Also, if the module is a singleton, you can call Start Module.vi + Synchronize Module events.vi in different places. For example, it could be called in a Launch Modules.vi and it could also be called inside another module if that module requires that other module to be running.
07-02-2018 08:37 AM
Thank you for your reply. Yes, I saw the built-in support for checking execution status of DQMH-singletons. This may be my mistake, I made earlier in development, when I created the 2 modules I was referring to in the original question. They are all cloneable. I guess I should've planned better, as now I wish I had made all of them singletons. So when I asked the question I was thinking about "how to check the execution status" of an instance of a cloneable. Needless to say I'm not using the cloneable feature of these 2 modules for anything yet. When I created them, I sort of thought that cloneable would be more versatile, but I have a feeling that this might be a topic for another question however, what type of module to use when as I don't want to derail my original topic of the question.
07-09-2018 08:05 PM
Hi Rafal,
The start module.vi for the Cloneable modules has an input to run as a singleton. So you could still use your cloneable module as a Singleton. If you created them with an older version of DQMH that did not have this feature, download the latest version and inspect how we modified the Start Module to allow for running as a singleton.
I hope that helps.
Regards,
Fab
07-10-2018 08:35 AM
yes, that will do. Thank you,