Saturday, September 25, 2010

Cluster Functions

Use the Cluster functions located on the Functions>>All Functions>>Cluster palette to create and manipulate clusters. Use the Bundle and Bundle by Name functions to assemble and manipulate clusters and use the Unbundle and Unbundle by Name functions to disassemble clusters.
You also can create the BundleBundle by NameUnbundle, and Unbundle by Name functions by right-clicking a cluster terminal on the block diagram and selecting Cluster Palette from the shortcut menu. The Bundle and Unbundle functions automatically contain the correct number of terminals. The Bundle by Name and Unbundle by Namefunctions appear with the first element in the cluster. Use the Positioning tool to resize the Bundle by Name and Unbundle by Name functions to show the other elements of the cluster.

Assembling Clusters

Use the Bundle function to assemble a cluster from individual elements or to change the values of individual elements in an existing cluster without having to specify new values for all elements. Use the Positioning tool to resize the function or right-click an element input and select Add Input from the shortcut menu. If you wire a cluster to the cluster input, the number of inputs must match the number of elements in the input cluster.
If you wire the cluster input, you can wire only the elements you want to change. For example, the cluster in Figure 1 contains three controls.
Figure 1
Figure 1 (bundle.png)
If you know the cluster order, you can use the Bundle function to change the Command value by wiring the elements shown in Figure 2.
Figure 2
Figure 2 (bundlebd.png)

Replacing or Accessing Cluster Elements

Use the Bundle by Name function to replace or access labeled elements of an existing cluster. Bundle by Name works similarly to the Bundle function, but instead of referencing cluster elements by their cluster order, it references them by their owned labels. You can access only elements with owned labels. The number of inputs does not need to match the number of elements in output cluster.
Use the Operating tool to click an input terminal and select an element from the pull-down menu. You also can right-click the input and select the element from the Select Itemshortcut menu.
In Figure 3, you can use the Bundle by Name function to change Command and Function.
Figure 3
Figure 3 (bundbyname.png)
Use the Bundle by Name function for data structures that might change during development. If you add a new element to the cluster or modify its order, you do not need to rewire theBundle by Name function because the names still are valid.

Disassembling CLusters

Use the Unbundle function to split a cluster into its individual elements.
Use the Unbundle by Name function to return the cluster elements whose names you specify. The number of output terminals does not depend on the number of elements in the input cluster.
Use the Operating tool to click an output terminal and select an element from the pull-down menu. You also can right-click the output terminal and select the element from the Select Item shortcut menu.
For example, if you use the Unbundle function with the cluster in Figure 4, it has four output terminals that correspond to the four controls in the cluster. You must know the cluster order so you can associate the correct Boolean terminal of the unbundled cluster with the corresponding switch in the cluster. In Figure 4, the elements are ordered from top to bottom starting with element 0. If you use the Unbundle by Name function, you can have an arbitrary number of output terminals and access individual elements by name in any order.
Figure 4
Figure 4 (unbundlebyname.png)

Content actions

GIVE FEEDBACK:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Popular Projects

My Blog List

Give support

Give support
Encourage Me through Comments & Followers

Followers