DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Missing measurements when using "Message Pump"

Hi,

 

I have used the basic idea from Pete Horn regarding using a "Helper loop" to fire a message at a user definable interval within the cloned VIs. Note that I have not used his actual package/code, just the same idea.

 

This timing interval is working fine in principle and most of time there are no issues. However when looking through the measured data I have seen several places where data points have been missed, even though the scheduled measurement before and after completed ok.

 

Basically what I have implemented is:

 

Clone waits for time period -> Clone sends request to Application for status of hardware (in use or available) -> Application replies -> If HW available Clone sends message to Application that HW is in use -> Clone does the test -> at end of test message sent to Application saying that HW is available. The tests are very quick, probably only around a second in total (some switches and a RF measurement).

 

These missing measurement points occur even if only one Clone is running (so it's not a hardware conflict) and also regardless of the measurement period (so it's not collisions or queued events). Everything occurs in a serial process, so there is nothing happening in parallel that could cause a race issue. I have noticed in the Application VI that sometimes the HW Available request does not fire when it should, I have not tried to correlate this with the missing measurements (although its more than likely to match).

 

The "Helper Loop" fires as expected every X seconds, the corresponding user event fires and the case in the handler loop fires (all in the Clone). Everything is running on the same machine (a new i7 PXI system), LabVIEW 2016, DQMH 4 (beta), everything works fine individually, no other programs running (anti virus etc.) and hardware issues that could cause a timeout.

 

While missing the occasional measurement is not a huge issue, my concern is that with more Clones running the issue will grow to a point that it could be a problem. 

 

Can someone explain to me what happens if a request is being processed in the Application and it then receives a second request? Are they queued, or is the second request just ignored? While I do not think that this is the issue here, it could be when several Clones are running.

 

This is quite frustrating as the whole process works fine, even when there are 2 clones running with shorter time intervals, but this occasional missed point is quite annoying. 

 

Thanks

Darren.

0 Kudos
Message 1 of 3
(2,981 Views)

So, quick update...

 

After some testing I found that:

 

 "Is HW Available?" Clone -> Application Broadcast is ok

Application processes Event (checks the BOOL flag, sets as argument to Request)

Application -> Clone Request sometimes is not received by the Clone.

 

As far as I can remember this was created as a "Round Trip".

 

Should this kind of thing be done this way, or is there a better way?

Cheers,

Darren.

0 Kudos
Message 2 of 3
(2,967 Views)

My take on helper loops, just in case.




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 3 of 3
(2,882 Views)