LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linked behavior of multiple instances of a subvi?

I am using a latch VI (http://zone.ni.com/devzone/cda/epd/p/id/393) as a subvi.  I have created several instances of this latch in my VI as my understanding was that each latch should operate independently.  However, I find that latching 'true' or 'false' into the input of any latch instance causes that boolean value to be latched to the output on all instances of the latch!  Strangely enough, this behavior is also useful to me and I would dearly love to know what is going on and how to manipulate this behavior.  Thank you!
0 Kudos
Message 1 of 3
(2,390 Views)

The key is the uninitialized shift register which maintains the value between calls. By default, all VIs are set to be to non-reentrant, which means they will share the same data space.

To do what you originally wanted, you will need to set the VI to be reentrant (File>>VI Settings>>Execution).

I suggest you check this out for some more information on how this can be used.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
Message 2 of 3
(2,385 Views)
Got it, thank you.  Sorry for the simple question, but it is surprisingly difficult find an answer to an issue when the issue is not clear to you.
0 Kudos
Message 3 of 3
(2,376 Views)