View Full Version : Adding a cluster to an existing cluster (Labview)
paulcd2000
04-01-2009, 14:57
So i'm modifying a cluster in Begin.vi in the advanced view, and i'm trying to add a gyro to "Robot Data" i figured out that i need to add "GyroDevRef" to the cluster RobotData In. However, there's nothing in the help menus on how to add an element so it looks like its part of the cluster. Just dragging it in makes it overlap visually, but doesn't add it to the cluster. Is there anyone who knows how to do it?
paulcd2000
04-01-2009, 15:31
OK, so i figured out that you can add things by adding the control of the cluster i wanted to add to the control of the big cluster. to do this, i had to open the .ctl file of that cluster, and import GyroDevRef.ctl
My question is now, is there an EASIER way to do this? this is long, complicated, and counter-intuitive, especially for new programmers.
Michael Hill
04-01-2009, 15:46
I'm not totally sure of your intentions. There are a couple of ways you might be able to do this.
http://img523.imageshack.us/img523/9075/labviewed2.png
http://img136.imageshack.us/img136/250/labview2up8.png
One thing a few of us in Georgia decided to do was to stop using RobotIn for everything, but what it was needed for. All other things (ex: motors, sensors, joysticks...etc) are defined in the initialize case statement of where ever you need it (sure it needs tweaking to make it to work, but its a heck of a lot less work than the default advanced is).
If you're interested I can send you our files later.
Cheers
-Tanner
Greg McKaskle
05-01-2009, 08:46
My question is now, is there an EASIER way to do this? this is long, complicated, and counter-intuitive, especially for new programmers.
Easier is always relative. What you're doing is adding an element to a cluster datatype. Your initial instincts of "drag it in" were good ones, but since this type is actually a typdef, that drag needs to happen to the definition. True, there is no visual indication of something being a typedef, so of course it is sometimes confusing.
Here are the steps that I take for doing what you were trying. Right click on the RobotData cluster. In the menu it will say Open Typedef, choose that. In the new window, you now have access to the definition cluster.
So Open the typedef, and then open up a gyro VI, Open is a good choice. Drag or copy/paste the gyro dev ref cluster directly into the Robot Data cluster, or copy/paste. Close the Gyro VI, close the RobotData typedef, yes save, yes replace, and now all of the RobotData users throughout the project are updated.
Greg McKaskle
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.