08-03-2009 12:27 PM
Clusters look like they can be used to "future proof" what gets passed to a sub vi.
But they break too often, and are not flexible enough.
Is there a "software engineering" solution to making them more future proof?
How about using arrays inside of clusters?
Just skip clusters, and pass references?
What's the best solution?
Thanks
Chris
Solved! Go to Solution.
08-03-2009 12:29 PM
Make your cluster a type def. It is an option under customizing a control.
Lynn
08-03-2009 01:18 PM
johnsold wrote:Make your cluster a type def. It is an option under customizing a control.
Lynn
And here is a Nugget to go with that topic.
Ben
08-03-2009 02:13 PM - edited 08-03-2009 02:13 PM
Thanks for the replies folks.
But do Type Def suffer the same problem that Globar variables do? They are hard wired to a file. Which means any subVi using can't be truly portable
with a group of programmers. (I use universal shift registers that are 100% portable, but they're weird).
Thanks
08-03-2009 02:21 PM - edited 08-03-2009 02:23 PM
Chris in Colorado wrote:Thanks for the replies folks.
But do Type Def suffer the same problem that Globar variables do? They are hard wired to a file. Which means any subVi using can't be truly portable
with a group of programmers. (I use universal shift registers that are 100% portable, but they're weird).
Thanks
Message Edited by Chris in Colorado on 08-03-2009 02:13 PM
Define "Truly portable" Type-defs are a blessing when working ina group development environment. I shiver at the thought of doing group development with them.
Q: What is a "universal shift register" ?
Ben
PS Please concider marking Lynn's reply as the solution since he replied first. The best I would get is an "assist" (still in hockey land) You can un-mark my post as the soltion using the "options" located in the top right corner of that post.
08-03-2009 02:31 PM
USR are the trick where you use a shift register on a wire inside a while loop that runs once, but do NOT define the starting value.
The subVI retains the value between calls = hence a true global.
Great for Write-Once-Read-Many variables like Serial Number, IP address, etc.
08-03-2009 02:38 PM
OK now I see.
USR = Un-initialed Shift Register also known as Action Engine.
I use Type-defs with them as well (see the nugget linked above)
Ben