05-08-2023 01:34 PM
Hello, I have this code (bc_ato) that works properly. But the same code (zaloha) works differently when the two integrators are put into subVI (integrace).
Does anybody know where is the problem or how to fix it?
Thanks for help
05-08-2023 03:16 PM
Just a general note that when code is placed inside a subVI you can change the dataflow. A race condition that may have made the code work may no longer exist. Normally this happens mostly to inexperienced LabVIEW programmers because all the experienced ones have developed workflows that make things like this less likely. In other words, dataflow was strictly enforced to begin with, so placing code inside a subVI is not likely to impact the way the code executes.
05-08-2023 08:36 PM
In the original, you have feedback nodes for different locations in the code. Once you place that inside the subVI, the feedback nodes will remember values from a different instance.
You can avoid that by making the subVI reentrant.
Overall, I have the feeling that whatever you are doing here is implemented way too convoluted. Can you explain what you are trying to do? Maybe things can be dramatically simplified.