≡ Menu

04 VISV Dynamic Process VIs in LabVIEW (Part 2 of 2)


Part 1 of this video can be found here. It's highly recommended that you watch part 1 before watching this video.

This is part 2 of a 2-part video series where we go into more advanced topics related to using dynamic VIs as parallel asynchronous processes in LabVIEW. Topics covered in this video:

  • Using queues to send data to a dynamic process VI
  • Using queues to receive data from a process VI
  • Using named queues
  • Using reentrant VIs as process VIs

Download Code used in this tutorial: (LabVIEW 8.2)

Do you have any questions? Is there something you want to know about in more detail? Leave a comment below, or send your questions to feedback@vishots.com

Hey, this is Michael Aivaliotis! Thanks for reading my post, listening to the podcast or watching the video on this page. When I’m not posting content on this site, I help companies develop automation powered by LabVIEW. If you want to find out how I can help you succeed with your next LabVIEW project – Contact Me.

  • Pingback: Dynamic Process VIs in LabVIEW (Part 1 of 2) — VI Shots()

  • Fabiola

    Awesome! On this one you do show code that could be reused in an application and you provide suggestions at the end on how to improve it. Thanks!

    I had seen this done with templates, where the “reentrant process.vi” would be saved as “reentrant process.vit”. When the Open VI call is done a new VI is created, then the queue is named after the front panel’s name. Have you seen this? What are the advantages/disadvantages of one method vs the other?

    Another question I had is that at the end, when destroying the processes queues the “destroy all” input is not wired. Wouldn’t it be safer to wire a true to “destroy all”?

    Thanks again,

    • Using template VIs was the old way of doing things before we had the ability to open and debug the front panels of reentrant VIs which now open as clones. Somewhere around LabVIEW 8.2 is when this happened. Previously, there was no way to probe or debug reentrant VI instances.

      Using templates still works of course but for me, I like using reentrant clones. They are easier to work with than templates. For one thing, I always forget that a VI is a template and end up saving a copy or the original as a standard VI. :( The main use of templates now is for creating reuse code and a starting point for new VIs in your editor.

      On your other question. Releasing the process queues with the ‘force destroy?’ option set to TRUE is a good safety net. It would handle the case where we may have forgotten to release any queues that were obtained. However, this is not the case in the example. But of course mistakes happen, so setting the ‘force destroy’ is not a bad idea as long as it’s the last action in the code.

      • Fabiola

        Thanks for your answer. I didn’t know that now we can probe/debug reentrant VI instances.

  • Hamid Yazdi

    Hi Michael,

    Truly enjoyed it! It is very good and of course reusable!

  • Raidensnk

    how is possible to stop the reentrant vi by stopping the main vi? i making a program using the same configuration of reentrancy but when i stop the main program the reentrant vi keeps running, can you help me with that please