DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Request and waiting for reply Event.... Works with Module Tester, but not with sequential calling.

Solved!
Go to solution

@FabiolaDelaCueva wrote:

 

In general, we want modules to stop as soon as we tell them to stop.

 


Why?  The remaining action in this case is done in at most 500 ms, and I suspect it was completed in much less than that, quite possibly in less than 1 ms.  What are you gaining?

 

What you're losing is intuitiveness and testability.  "Do X and then stop" is very clear and always happens the same way. "Do X, no wait, stop immediately!" is harder to understand and has a race condition determining if X happens or not. The race can be different in testing and real-world conditions.

0 Kudos
Message 11 of 14
(1,519 Views)

@drjdpowell wrote:

@FabiolaDelaCueva wrote:

 

In general, we want modules to stop as soon as we tell them to stop.

 


Why?  The remaining action in this case is done in at most 500 ms, and I suspect it was completed in much less than that, quite possibly in less than 1 ms.  What are you gaining?

 

What you're losing is intuitiveness and testability.  "Do X and then stop" is very clear and always happens the same way. "Do X, no wait, stop immediately!" is harder to understand and has a race condition determining if X happens or not. The race can be different in testing and real-world conditions.


We cannot please everyone. If we had the stop event not be a priority request, we would get the developers used to NI QMH and other architectures complaining as to why it is not a priority event.

Developers are free to change this behavior in their own custom template, they are not forced to use the DQMH templates in order to use DQMH. You are welcome to create your own DrJDPowell_DQMH template and use that when you are using DQMH. In your template, you could make the Stop Module not be a priority event.

 

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 12 of 14
(1,507 Views)

Are you sure, that you are using a Request and wait for reply Event? If it was a Request and wait for reply Event, the Stop Module call should be executed after the reply of the Module to the Public API VI.

Message 13 of 14
(1,484 Views)

After I debugged, it was because the hardware (LDD) was not closed correctly, and when I ran the code again, it generated the error in the subVI I used. 

Now it is working well, and no more magic delay needed too. 


CQ
Message 14 of 14
(1,458 Views)