alexp123 Posted October 5, 2009 Report Share Posted October 5, 2009 (edited) Hello, I have a theoretical question about removing block diagrams. I know that removing block diagrams will make the vi unable to run on different versions of LabVIEW, different OS's, etc etc. However, I was wondering whether if you remove the block diagram of a certain vi, and then edit and save sub-vi of the vi whose block diagram you just removed, will the vi use the original version of the sub-vi, or the new updated version? Thanks in advance for any info! I did run a quick test to see if I could answer my own question (should have done this before I posted originally), and found that the vi will update to the new version of the sub-vi after the block diagram has been removed. I only tried this with a non-polymorphic non-reentrant vi. Anyone have any more information on this topic? edit: I did run a short test on this myself, and found that the vi will use the new sub-vi after the BD has been removed. This was using a non-polymorphic, non-reentrant vi. Anyone have any more info on this? Edited October 5, 2009 by alexp123 Quote Link to comment
Yair Posted October 5, 2009 Report Share Posted October 5, 2009 The VI will have to update to the new version, because it doesn't keep any information about the subVI other than what it needs (name, connector data, etc.). Two pitfalls I can think of: You change the connector of the subVI. The caller VI will probably break. You change the inplaceness of data that goes through the subVI. If the caller holds this data itself and NI didn't write this correctly, you could have a data-erasing bug on your hands. That said, this is just a guess as to something that might happen. It's quite possible that NI did handle this case. In general, I would say that any VI which has its BD removed should not have its subVIs changed under its feet. Quote Link to comment
Aristos Queue Posted October 8, 2009 Report Share Posted October 8, 2009 You change the inplaceness of data that goes through the subVI. If you change the inplaceness of a subVI, the caller VI will be broken when it loads. The caller VI checks that subVIs have the expected inplaceness and breaks unless it matches the inplaceness the caller was compiled to expect. Quote Link to comment
Yair Posted October 8, 2009 Report Share Posted October 8, 2009 I thought it was probable that NI handled this, but didn't know the details. Nice. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.