JMH wrote:
> Hi,
>
> I have another question WHich I would appreciate any help I could get. I
> have a main screen, where I set a bunch of parameters. Then I have a sub
> vi which takes that bundled information, when I hit the continue button,
> and does the necessary calculations to determine the commands needed to send
> to the instrument. So, I bundled all the parameters, then I have the bundles
> go into the setup subvi by the cluster which has the exact same info as on
> the main screen, except it is indicators, not controls. So, there is the
> cluster icon there, and then a wire going to an unbundle, and then from that
> I will distribute the info as needed. The problem is that I bundled all the
> parameters in a certain order, and then when I unbundle them, they are in
> a different order in the unbundle display. Clicking on any one in teh unbundle
> picture does not display the value, and by connecting it to another indicator
> does not display the defauly value of any one. I have 4 double precision,
> two arrays, and an alphabetical string. So, I cannot tell the two arrays,
> or the numbers apart.
> My second question is, I have two arrays, and for one of the calculations,
> I need to add together all the walues down the array. The array has the times
> in certain zones of an experiment, and I need to find the total time. I set
> it up with arrays so that I can scan down, and enter data at the proper places.
> The maximum zones are 5 being used, and the time in each zone can be any
> value. SO in order to know whow often to sample for data, I need the sum
> of the total seconds. Any help on how to do either of these things would
> be most appreciated. Thanks very much
>
> JMH
There are two ways to create a bundle; Bundle by name and bundle by order.
I dont know of any reason the cluster order would change UNLESS you created
the two clusters differently. I typically use the bundle by name because it
is so much easier, and I do not have to worry about order. The bundle by name
uses the name of the contol indicator. If you have a cluster somewhere
and use the "create indicator" or "create control" It will look exactly the same
(doesn't matter how you bundled the cluster). As far as the bundle by order
you can right click on the cluster and select "Cluster Order" this will show
the order that will be used in the Bundle / Unbundle operation.
As far as the second question I am not sure what you are putting in the Array.
If you simply want to add all the numbers together use this;
Create a for loop, use the "Array size" to feed the N terminal
Connect the array to the for loop and disable "Auto Index"
Create a shift register on the for loop and init to 0.00
In the loop place an "Index Array" and use the "i" terminal
as the index. Wire the left shift register to an add function, and the output of
the Index array
to the other ADD terminal. Send the add to the right shift register, and also to
an indicator (optional).
this will extract all the values and add them together.
Hope this helps.
Kevin Kent