Delacor Toolkits Discussions

Showing results for 
Search instead for 
Did you mean: 

Send a message versus call a subVI

Go to solution

Send a message versus call a subVI

Hey guys,


I recently came across this for the Actor Framework:


The basic idea as I read it is to not have a message call another message, rather just call the subVI.


Do you have the same thoery or idea for DQMH?  For example, I have a system something like thermochamber examples.  There is some sort of "Set set point" request.  But in the Initialize event, I want to read in an INI and intialize the set point to that value.  So, do I send the "Set set point" request from the init case or do I simply place the set set point subVI in the init case?


Part of this assumes most requests are a single VI or at least close.



0 Kudos
Message 1 of 3
Accepted by topic author Evan
02-03-2017 10:10 AM

Re: Send a message versus call a subVI

Hi Evan,


This is very timely, just yesterday I was on a code review with a customer and we were discussing this. We are even debating if we should get rid of the "Update Display" case in the MHL for the template. I am copying here two points from the DQMH Best Practices document:


  • Calling Status should be used over enqueuing Update Display message, even if done as a high priority message. Otherwise, the order of the status messages is not correct in the DQMH API Tester VI.
  • Atomic operations should be in a single MHL case. We cannot guarantee that other actions do not get enqueued in between MHL cases.

One of the earliest discussions in this forum resulted in us changing the template to have a single initialize case in the MHL as opposed to having three messages enqueued. 

The main reason is that you cannot guarantee things are going to get enqueued in between the two steps. Also, during debugging, we have come to appreciate having more atomic operations within each MHL case. It is tempting to reuse the code in a case by enqueing in different places, but a better approach is to have a subVI within that MHL case and call the VI instead. 






Certified LabVIEW Architect * Certified Professional Instructor * LabVIEW Champion
0 Kudos
Message 2 of 3

Re: Send a message versus call a subVI

Thanks Fab.

0 Kudos
Message 3 of 3