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: 

Message Pumps in DQMH

Solved!
Go to solution

I sugest a different name for this than “message pump”.   A “message pump” is another name for an “event loop” or “message handler”.   Both the two main loops in the DQMH are “message pumps”.   Better terminology would be something like a “timing source”, “trigger”, etc.   In Messenger Library, my equivalent timing source is called “Metronome”: you could consider that, but you’d have to make the internal timing metronome-like by eliminating time-drift.

0 Kudos
Message 21 of 41
(2,722 Views)

Hi Pete, Fab,

 

I have had a look at the message pump code and I can see what is happening, however I have a question or two..

 

1 - Is the intention that when creating a new module you would choose the "Pump" option and this would be used instead of the Cloneable module already setup?

2 - Seeing as I already have some of the code completed in the Cloneable module for my individual tests, what's the best way to implement your message pump? Do I need to start again or can I create a Pump Module (that is loaded but never shown) that will then act as the timing for the cloned tests?

 

Probably what I am asking is if I can simply use your idea and implement it into my existing program, or is there something "under the hood" that I haven't seen and would also need to implement?

 

Cheers,

Darren.

0 Kudos
Message 22 of 41
(2,698 Views)

Hi Darren,

 

If you can share your cloneable module or a simplified version of your module, we might be able to give some tips on what direction to go.

 

The helper loop is needed if you are requiring to do something periodically regardless of what is happening on your MHL (Message Handling Loop). If that is the case, you just need to add the extra loop to your module and create the event that will get that helper loop going.

 

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?
Message 23 of 41
(2,685 Views)

Hi Darren,

 

Basically, what Fab said..... Smiley Wink

 

In short though, there is no hidden code or anything funky going on in the background of the message pump code - so you can probably add it in fairly easily to your existing modules.

 

I'm working on another application at the moment using Actor Framework, where I needed the same sort of functionality. For that I decided to create a separate "Timing Source" actor that was launched by the first actor, the timing source just has an loop which periodically sends a message to its parent - same idea, different way again of implementing it.... The same thing could work with DQMH as well.

 

Cheers,

 

Pete

Message 24 of 41
(2,678 Views)

Cheers folks, I just added the extra loop to the bottom of my cloneable VI and passed the timing value to it when opening.

 

So yes, what Fab said... 😉

Message 25 of 41
(2,674 Views)

Thanks for sharing this, it has been good food for thought, I have doing a similar periodic broadcast and great to see how other are dealing with similar problems

Danny Thomson AshVire Ltd
0 Kudos
Message 26 of 41
(2,648 Views)

Hey guys, here's my take on helper loops. Let me know if that makes things easier or if it poses more questions than it answers.




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® (The Future of Team-Based LabVIEW Development)


Message 27 of 41
(2,512 Views)
Hello together,
I got a problem with the helper loop in my aplication.

If I run a VI, that just fires 100 similar request to a DQMH Module:

If the helper loop is implemented: i just recieve 99 or sometimes 98 Events.

If the helper loop is in a diagram disable structure, I always recieve 100 Events.

I use LV 15 SP1. Are there known issues or am I doing somthing wrong?
0 Kudos
Message 28 of 41
(2,468 Views)

Marco, can you post example code or describe the exact structure of your module?




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® (The Future of Team-Based LabVIEW Development)


0 Kudos
Message 29 of 41
(2,466 Views)

LV.PNG

0 Kudos
Message 30 of 41
(2,464 Views)