From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop instances of a subvi from sharing data?

Solved!
Go to solution

Thanks for your help johnsold.

 

How much you want for your converted program that uses shift registers instead of the feedback loop?

 

regards

0 Kudos
Message 11 of 14
(532 Views)

 

See here for my Nugget on Action Engines which makes use of Un-initialized Shift Registers (USR).


km4hr wrote:

...

 

I'll have to do some more studying about un-initialized data (?).

...


 

Regarding payment...

 

Everyone who has gold/yellow bars under their icon OR are a Knight of NI are all volunteers. We all work for Kudues (Copyright C Altenbach 2008).

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 12 of 14
(528 Views)

Just context-click on the feedback node and choose "Replace with Shift Register" from the pop-up menu.

 

The issue is not that a feedback node is prohibited in a subVI.  Your subVI is called more than once in the loop.  The feedback node inside the subVI retains data from the previous call, so the data gets mixed between the two channels.  Here is where a re-entrant VI may be of value.

 

You may find the tutorials and the LabVIEW Help useful in learning more about these issues.  Search the help for terms like "dataflow," feedback node," and "reentrant."   You will get more hits than will be initially useful, but pick out some of the more general topics first.

 

Lynn 

0 Kudos
Message 13 of 14
(525 Views)

Ravens,

 

Bingo! Setting the subVI for reentrant execution instead of the setting it in the main VI did the trick. I like this solution because it allows the subVI to "make sense" (at least to my current limited understanding anyway). It may not make optimal use of memory but that's ok. Memory is cheap. I'm an engineer, not a scientist. My first priority is to make it work so I can put it to use. 

 

I'll keep the things in mind that have come up in this discussion. I'm sure they'll have more meaning as I continue to study/use LV. I'll even consider Ben's "nugget", even though it looks more like a boulder to me.

 

 regards

 

 

0 Kudos
Message 14 of 14
(508 Views)