DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing Issues/Event not firing

Hi all,

 

so this is a similar issue to this post but I thought I'd start a new topic instead of hijacking that solved post.

 

I have Module A which is supposed to start the Module B (which in turn starts Module C, etc.). If I were to start Module B immediately after Module Did Init in the Module A's "Initialize" case, the event does not fire according to the Event Inspector Window. Only after using a Stall Data and/or Highlight Execution did I manage to start Module B. This would indicate a timing issue but I'm perplexed as to why events do not fire right after the "Module Did Init" (In other sub-modules this seemed to have worked fine). 

 

This is what worked:

1) I send a message back to the MHL to "Init Acquisition Module"

 

nikvl_0-1756826573010.png

2) Init Acquisition Module contains a private request to start the Acquisition module

nikvl_1-1756826604087.png

 

3) From there it starts the module and then sends a private request to reregister for Broadcast in the EHL, and finally syncing the events (this architecture is what I gleaned from Joerg's post on tips for Starting DQMH modules but perhaps I have applied it wrongly)

nikvl_2-1756826636729.png

 

nikvl_4-1756826662301.png

 

When I first tried to run it, I placed the private request to start the Acquisition module right after the Module Did Init if it does not have an error (in place of the DQMH Enqueue Message circled in red in the first image). However, this didn't work even though there was no error and the private user event would not fire. After replacing with the slightly rube-goldberg-resque method shown above, it works as expected. I suspect this is due to a timing issue and solved by the magic delay fairy by going through the message enqueue-ing system. 

 

So even though it works now, I would like to understand why and whether there is better practice for issues like these. I suspect this is also related to another issue where I could not catch Module Did Init events from other sub-modules.

 

Thank you in advance.

0 Kudos
Message 1 of 3
(58 Views)

Hey nikvl,

 

thanks for using DQMH and taking the time to post here.

 

I'm afraid it's difficult to follow the details of what you tried and what you ended up with. Can you share a minimal example project of two modules that reproduces the symptoms you're seeing?




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 )


0 Kudos
Message 2 of 3
(37 Views)

Hi Joerg,

 

thank you for taking the time to reply. The above images are what I ended up with. What I tried was skipping the MHL by putting the private request directly after Module Did Init in the "Initialize" case (i.e. without inserting a message in the queue). That's basically the only difference.

 

If that's still unclear, I will see if I can try to reproduce it in an example but time-wise it might be a bit difficult.

0 Kudos
Message 3 of 3
(21 Views)