04-07-2020 09:55 AM
Hello!
Right now, I'm working on my first project using the DQMH and ran into a problem I’m not sure how to solve.
Let’s say we have a singleton module called “Test Manager”, one called “Logger” and one cloneable called “Test Runner”. The Test Manager and Logger are started by the main application. The Test Manger is then starting up to 40+ Test Runner modules which are performing long term tests on different motion controllers. Each Test Runner is testing one device but all devices running different test scenarios.
The Logger should now register for the “Status Update” broadcast events of every Test Runner and that’s where I ran into some problems. I did a lot research in the forums and all the documentation and found quite a lot of threads with similar but still different problems.
The Logger is using the “Register for Broadcast Events.vi” of the Test Runner module to get the event refnums but if no Test Runner is actually executing when doing this, the broadcast events are not fired inside the EHL of the Logger.
I found this example https://forums.ni.com/t5/Delacor-Toolkits-Discussions/Registering-to-broadcast-events-from-many-modu... which is the way I do it right now (option 2). I’m not sure how to do this the right way. The Logger must start before the Test Runner so how do I get all the broadcast events from the Test Runner modules inside the Logger module?
Best regards
Solved! Go to Solution.
04-07-2020 10:58 AM
The "Test Manager" could let the "Logger" know when it starts the "Test Runner(s)". The "Logger" can then (re)register for the broadcast events of the "Test Runner(s)".
Seeing as the cloneables share the same event references, the "Test Manager" can either just notice the "Logger" whenever a "Test Runner" is started, or you could put some logic there to only send the notification for the first clone that's instantiated.
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 )
04-07-2020 06:41 PM
Agree with Joerg.
If the Test Runners are dynamically being launched throughout the duration (and not all at the start), either the Test Manager needs to keep letting The Logger know of this.
Or just have The Logger independently and periodically check for new registrations.
04-08-2020 02:01 AM - edited 04-08-2020 02:07 AM
04-08-2020 03:51 AM
Maybe you'll find the article on Helper Loops interesting, and also this specific post that talks about this stuff...
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 )
04-08-2020 08:30 AM
Thanks! Thing I got it 😉