DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Register for module events inside a subVI

I have a parent module that starts a group of child modules. I am trying to follow HSE guidelines https://dokuwiki.hampel-soft.com/kb/labview-frameworks/dqmh/starting-modules .

One thing that bothers me esthetically is the need to grow EHL vertically in order to accommodate large number of  event sources. Is it possible to place this node in a subVI? When done directly, it has a compilation error:

bratdv_0-1759426623972.png

 

bratdv_1-1759426634567.png

I understand that event registration ref num controls I used have private typedefs inside that prevent the usage outside owning library, but I can't figure out how to fix this.

 

Any solution?

 

Thanks,

Anton.

0 Kudos
Message 1 of 6
(200 Views)

At Wired-in, we start our modules inside an EHL event with a for loop, and starting each module one at a time.  This will take longer than launching them all in parallel, but sometimes order is important (ie you want to have a database module or a error logging module running before starting modules that depend on those).  Anyway, the point is that the code doesn't suffer from the vertical growth issue.

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 2 of 6
(174 Views)

Christopher,

 

the vertical size of "Register for events" remains 10 levels in my case, right? If every event should be connected to the correct "level", how do you do this in a for loop? Wiring has to be different for each iteration... I just can't imagine it in my head. Can you please provide a bit more explanation or a quick screenshot?

 

Or do you mean you have 10 (in my case) EHL cases, one for each of the modules, and these events (cases) are called from a for loop within MHL?

 

Thank you!!

0 Kudos
Message 3 of 6
(163 Views)

Yes, the register for events still is 10 levels, so you can't avoid that.

 

Not 10 separate EHL cases, just one but using a FOR loop:

 

ChrisFarmerWIS_0-1759463889111.png

 

This event case is called from a request in the MHL Initialize case.

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 4 of 6
(150 Views)

Thank you, Christopher.

 

I ended up doing a combination of HSE recommended scheme with your For Loop approach. MHL cycles through start module and sync VIs for all modules, in between sending a private request to EHL to register for events:

 

bratdv_0-1759757305842.png

 

One more thing I want to do is to add handling "Module did init" event in MHL case (right after sync). This way when the MHL's for loop went through all modules, they are all started, initialized and ready.

 

Best,

Anton. 

 

0 Kudos
Message 5 of 6
(124 Views)

@bratdv wrote:

I ended up doing a combination of HSE recommended scheme with your For Loop approach. MHL cycles through start module and sync VIs for all modules, in between sending a private request to EHL to register for events:


Just to follow up: The article on our Dokuwiki contains a "When to start" section which states the following:

 

  • HSE modules with the need for automated sequential steps usually feature a State Machine

Meaning that if we need to start a number of modules, more often than not we will do that from a HSE State Machine module, going through each child module one by one to maintain control over what worked and what didn't. 




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 6 of 6
(107 Views)