Showing results for 
Search instead for 
Did you mean: 

Proliferation of a QMH application

I have written an application to control a stepper motor connected to a linear actuator with a total travel of ~3"(0.001" to 2.999") using the Queued Message Handler (QMH) design pattern.  The user has several controls available to them as shown from the FP below, they can change speed, Move to the set position, extend or contract, save or return home, etc.  This application controls a single actuator using Modbus communication and appears to work very well.  The question is now that I have this fully functional application, what's the best way to use it so I can control multiple actuators at the same time?  In other words, if I use this application as a sub VI, how do I press the buttons or change control values on the sub VI from an upper level VI?




0 Kudos
Message 1 of 2

The QMH project template is not designed to facilitate reentrant use, i.e. the ability to spawn multiple running copies of the same VI. You can certainly try to retrofit your application to do so. I recommend this approach over trying to call the QMH Main VI as a subVI.


I suggest you take a look at DQMH, which is a framework that has some similar constructs as the NI QMH, but very easily facilitates the creation and use of reentrant modules via the creation of "cloneable" modules. It's a 3rd party toolkit, but it's also free on the NI Tools Network.

0 Kudos
Message 2 of 2