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: 

Passing many references to subVI using clusters returns invalid reference at property nodes

Solved!
Go to solution

Hello,

 

I am trying to pass in data from controls on the main gui (also information out using indicators) into my subVI. For the life of me I can not figure out what the problem is, I have tried dang near everything so any help is much appreciated. Also, I suspect that my clusters may be holding too much information. Finally, yes I know there are a lot of posts about this but none seem to alieviate my problem. 

 

(Just a warning, if you try and run the code you will first have to change where the data file gets stored, all it does is takes all of the information from the sensors and calculations and stores them into a file)

 

I couldn't attach all of the subVI's so I attached the relavent ones. The main problem is going from the LangmuirTroughStepperMotorCodePlusSubVi to DataGatheringSubVi

0 Kudos
Message 1 of 8
(3,679 Views)

You are bundling up references to your various front panel elements, but you aren't doing anything with them.

 

The only thing you are feeding to your subVI are cluster constants which have generic references in them that aren't linked to any front panel elements.  Get rid of those cluster constants and wire the output of the bundle functions to the appropriate terminals of your subVI.

 

Those bundle functions should all be outside the while loop and done once before the VI starts.  There is no need to rebundle all of those static references over and over again on every iteration of the while loop.

0 Kudos
Message 2 of 8
(3,664 Views)

After all did you check the DataGathering SubVI properly? Instead  of taking the reference from the Input you are taking the reference from the cluster constant which will obviously give you invalid reference.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 8
(3,663 Views)

Ummmmm.  You actually need to wire the references to the subviSmiley Wink

Capture.PNG

What you have is a constant of type cluster of references of digital a wire from the build cluster to the subvi terminal would add the values of reference to this control.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(3,660 Views)

Thank you for your help! I did try to right click on each bundle and do create control and the same thing happened. I will try moving the bundles outside of the while loop and let you know what happens. Can I use the "create control" option and use those as my inputs to the subvi? 

0 Kudos
Message 5 of 8
(3,649 Views)
Yes you can.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 8
(3,641 Views)
Solution
Accepted by topic author futh29

No.  You can't use "Create Control".  I have no idea what wire or terminal you are thinking of using that on.

 

You need to:

 

Delete the pink cluster constants.

 

Move the Static control references and the Bundle functions to outside the loop.

 

From each bundle, take the wire coming from the output of the bundle, wire it through the loop wall as a tunnel.  Connect it to the appropriate input of the subVI.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 7 of 8
(3,640 Views)

I dirrectly connected the bundles to the subvi and probed them and it worked! Its werid because I've used the "create control" before and it has worked, must not work for clusters though! However now I have some other problem with error 5000, Ill look into it and hopefully will be able to figure it out! Thanks!

0 Kudos
Message 8 of 8
(3,626 Views)