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.

DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

checking if event-registration ref-nums are empty, after calling "obtain broadcast events for registration.vi"

Solved!
Go to solution

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?

0 Kudos
Message 1 of 5
(3,114 Views)

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.

obtain broadcast for registration.jpg

 

 

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. 

 

 

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
0 Kudos
Message 2 of 5
(3,086 Views)

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.

0 Kudos
Message 3 of 5
(3,059 Views)
Solution
Accepted by topic author Rafal_Kor

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

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
0 Kudos
Message 4 of 5
(3,035 Views)

yes, that will do. Thank you,

Message 5 of 5
(3,028 Views)