LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help on efficient SubVI interaction

Brian,

I am trying to figure out what my program is going to do when I choose to NOT "use default if unwired".  For the time stamps that are being returned through the shift registers, it makes sense.  I just wired them from left to right like you said.  Adds a ton of wires everywhere, but makes sense.  However, I'm not really sure if I can do something similar here with the fuel flow and dt data that is being passed out of the case structure.  Since it is only used once, and not passed back, I don't see any other option but check "use default if unwired".  Does this mean that when the fuel flow case structure frame executes, 1 real data value and 3 default values of 0 are going to pass to the SubVi?  I would prefer to not send any "false" data values to the SubVi.  Is there any option here?

Also, unfortunately memory is a pretty big issue in my program.  The fuel flow case structures are nestled in pretty deep within several other case structures, so I can't really see a way of minimizing the number of case structures the shift register passed data has to go go through.  In an ideal world, I would keep the data that is passed back within the fuel flow case structure.  However, as far as I know, only shift registers pass data back, and that is not an option with case structures.  Is there a different way to pass data back within a case structure, maybe in a manner that doesn't involve shift registers?  That way I wouldn't have data passing through a ton of case structures and bogging down the program. 

Thanks,

Alex     

0 Kudos
Message 11 of 12
(571 Views)
Hey Alex,
    I guess I don't understand what values you would want sent to your subVI.  Case structures cannot pass data back around b/c they only execute once.  It's the loop that the case structure is contained in that is iterating, and that's why the shift registers can be used on that loop.  Everytime your subVI is called, it will have to have data on each of the wires going into it.  If you don't want "false" values sent to the subVI, then those wires need to have actual values on them.  The only way they will get a value that is not default is if you wire some value to them when they are exiting the case structure. 
    As far as another way to pass data between iterations of loops, you could use variables (local, shared, global).  However, shift registers are recommended over this way as they require less memory.

Brian B
Account Manager
National Instruments
0 Kudos
Message 12 of 12
(551 Views)