05-16-2018 07:42 AM
I tried to make a "vast swath" of references into a single subvi and LabVIEW gave me this:
My subvi would have 4 outputs: a string array, a cluster of control references, an error initialization, and a state-enum. I'm not actually providing any explicit inputs.
So my question is: What are the 28 things that I (clearly) exceeded, if not the references? Are there invisible things passed to the sub-vi, which I overwhelmed? What is going on?
Solved! Go to Solution.
05-16-2018 07:53 AM
Have you tried to create a subVI from the block diagram? - I assume you have done that to hit this error.
If so then this could be the problem. Every control/local used gets turned into a reference to a FP propertynode when creating a subVI.
Makes me assume a massive over use of Local variables here too, so you might want to look at your coding style too!
Best method would be to save the VI you want as the subVI name and delete all extra code you want to remove to avoid this error.
(Remember LabVIEW passes data through wires, and you can use a shift register to carry the wire round a loop).
- or is it simply that you didn't build the cluster/array of references and create an indicator before trying to create the subVI from a selection?
James
05-16-2018 08:13 AM
>> you might want to look at your coding style
It is a good point. I'm relatively immature in LabVIEW. I can get it to work, but not with elegance, or even solid form. In a "make it now, polish it later (but really never) work environment, I haven't had much chance to get good at the polish part."
>> remember the shift register
I love the shift register. I put them to solid use in my event driven state machines.
>> massive overuse of local variables
Not local variables. I do make references to the gui, but the components are non-negotiable.
05-16-2018 08:25 AM
Put all of your references into clusters or arrays to make your life easier. If nothing else, it helps sort your references.
05-16-2018 09:15 AM
Bundle up all references and use that cluster as input to your Subvi instead of individual inputs, it also clears up the diagram as you'll have 1 cluster instead.
/Y
05-16-2018 09:41 AM
>>Put all of your references into clusters
I did it already. The references are one of the clusters.
My problem isn't that downstream isn't clean. My problem is that when I put the "reference to cluster" into a "create vi" then it gives the error mentioned.
05-16-2018 10:08 AM
You know, an attached VI (even one that gives massive errors) would make it so much easier to understand the problem and propose a solution, particularly for someone who is just learning LabVIEW and doesn't know all the "lingo" ...
Bob Schor
05-16-2018 10:09 AM
@EngrStudent wrote:
>>Put all of your references into clusters
I did it already. The references are one of the clusters.
My problem isn't that downstream isn't clean. My problem is that when I put the "reference to cluster" into a "create vi" then it gives the error mentioned.
You know, an attached VI (even one that gives massive errors) would make it so much easier to understand the problem and propose a solution, particularly for someone who is just learning LabVIEW and doesn't know all the "lingo" ...
Bob "A Picture is Worth a kilo-Word" Schor
05-16-2018 10:27 AM
@EngrStudent wrote:
My problem is that when I put the "reference to cluster" into a "create vi" then it gives the error mentioned.
Don't do that. The bundle belongs where the references originate, not in a subVI.
05-23-2018 01:22 PM
Can't do it bob. They would string me up by my short hairs. It would be a "career limiting" behavior.
I wish I could. I do such things as much as I can, and I drive y'all crazy with my "cartoon toy code", but it is what I can do.
-EngrStudent