DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Message Pumps in DQMH

Solved!
Go to solution

On a first - quick - glance, I can't see anything wrong with your block diagram. Maybe the problem lies outside your captured part? Which events are you triggering, what does the helper loop do, ...?

 

If you want, we can do a quick TeamViewer (or similar) session tomorrow in the morning. 




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 31 of 41
(3,590 Views)

Your problem is that you are sharing a single Event Registration between two parallel event structures.   Events are not designed for this and have this odd behavior.  Crete a separate Event Registration for your helper loop.

Message 32 of 41
(3,586 Views)

Of course, James. That escaped my tired eyes 😞




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 33 of 41
(3,582 Views)

@drjdpowell wrote:

Your problem is that you are sharing a single Event Registration between two parallel event structures.   Events are not designed for this and have this odd behavior.  Crete a separate Event Registration for your helper loop.


For a detailed explanation of why we should not fork the Event Registration wire, check out this post:

https://forums.ni.com/t5/Delacor-Toolkits-Discussions/Registering-to-broadcast-events-from-many-modu...

 

The general rule should be a Register for Events Node for each Event structure (with dynamic event terminals visible) handling events.

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 34 of 41
(3,574 Views)

 

Thanks @ all. Problem solved.

 

 

That way it works great.That way it works great. 

 

Message 35 of 41
(3,563 Views)

Any mention of randomly missing events should immediately make one think of a shared event registration.  I still remember debugging this in one of my applications 10 years ago.

0 Kudos
Message 36 of 41
(3,558 Views)

Makes me realize that I do mention a second event registration node in my article, but I do not explicitely state the importance. I'll edit the text accordingly. Thanks again for pointing that out, James.

 

Edit: Update done.




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


Message 37 of 41
(3,553 Views)

@joerg.hampel wrote:

 ...in my article,...


Can't post an image in a reply to the article, so a suggestion here.   Remove these wires, as you don't need them and they reduce readability of what you are doing.  

dqmh-helperloop-MOD.png

Message 38 of 41
(3,546 Views)

That's interesting James, I knew you didn't need the input wire (unwired = unchanged) but I didn't know that you don't need to wire the output of the register for events node... I always thought you had to "update" the event structure after changing the registration...

 

Nice to know!

0 Kudos
Message 39 of 41
(3,541 Views)

I'm always having a hard time with these "seems to work without" things, as it's hard to find official documentation or comments about these things...

 

Agreed, the LabVIEW help states "Registered events stay registered until you explicitly unregister them [..]", so wiring an event source that doesn't change is unneeded.

 

With the Event Registration Refnum going from the Register For Events node's output to the Dynamic Event Terminal on the right side of the event structure, I'm not really sure if I agree that deleting this wire makes the code more readable - but that might just be me having to get used to it.

 

Anyway, thanks James for taking the time to look at the article and point those things out!

 

PS: Edited for clarification




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 40 of 41
(3,537 Views)