wrote:
I was interested in what you said about making typedefs - I had a bit of a read about them and watched some videos but not sure I have quite understood the whole process... Is this anywhere near what you meant?
Harriet,
Sorry, I "dropped the ball" and failed to get back to you last week. Listen to crossrulz about indexing tunnels -- much easier way to build arrays (you can even make the tunnel a "conditional" tunnel that allows you to choose which elements go into the array).
As to the TypeDef, you did it exactly right! Mine differs from yours in that I named the Cluster "Point" (instead of Cluster), got rid of the Increment/Decrement buttons on X and Y (they take up space), used Autosizing (right-click cluster on Front Panel and choose "Autosizing") to Arrange Vertically (why not make it compact and "pretty"?), and use the Icon Editor to give it an Icon (I made a square box with the word "Point" inside it).
But where do you use it? In the very first place you define the Cluster, the For loop where you do an "Array-to-cluster" operation. Instead of doing that (which, you must admit, is a little mysterious -- what is this Cluster about, anyway?), you put in a Bundle by Name, wiring the TypeDef you created to the top input, and "Presto!", the X and Y inputs magically appear. Drop an Index Array function down, wire the (now 1D) Array to it, and (here's a trick I learned after about a year using LabVIEW) drag down on the bottom margin of Index Array to get two index inputs. Don't wire them -- they'll give you (by default) the first and second elements of the Array, i.e. they give you X and Y.
Now it is clear what you are doing -- the 1D array "represents" the X and Y values of your Point, which you are putting into the Point Cluster. [If you'd made an Icon for the TypeDef, you could have something like this on your Block Diagram:
Bob Schor