05-02-2014 08:26 AM - edited 05-02-2014 08:26 AM
Hi,
I'm just wondering is there a way to sequence through an array of clusters with a button?
LabVIEW 2013
05-02-2014 08:52 AM
Right-Click Show index display?
What did you really mean to ask? Do the cluster array elements contain buttons? Do you want increment buttons on the array? would you prefer a scrollbar? Vertical or Horizontal? do you want user interaction or do you want to do this programatically with a property node?
05-02-2014 09:05 AM
I have a cluster of strings and numeric values. I would like the user to be able to cycle through the array with a button to select the next value and display it
05-02-2014 09:11 AM
@PauldePaor wrote:
I have a cluster of strings and numeric values. I would like the user to be able to cycle through the array with a button to select the next value and display it
That isn't much different from what Jeff showed you. Are you using an increment button and then a decrement button? If so, you just need to read the array index first using the property node, increment or decrement as needed, and then write back into the property.
05-02-2014 09:20 AM
Is there any visual example available?
05-02-2014 10:38 AM
there's your button....
05-02-2014 10:40 AM
@PauldePaor wrote:
Is there any visual example available?
http://forums.ni.com/t5/LabVIEW/Sequence-through-a-cluster/m-p/2834954#M828403
05-02-2014 10:57 AM
I know the array can be cycled through by the index display button. My question is can that be done by means of a boolean button
05-02-2014 10:57 AM - edited 05-02-2014 10:58 AM
@PauldePaor wrote:
I'm just wondering is there a way to sequence through an array of clusters with a button?
You don't really define what you mean by "Sequence through". It is also confusing that the title talks about sequencing through a cluster and the message body talks about an array of clusters. Big difference!
Apparently you want to sequence throught an array (it does not really matter if the elements are clusters),
The solution above resized the array container to one visible element and manipulates the visible element.
An alternative interpretation would be to use a scalar indicator and index out the desired element for display (no array indicator needed). You would use a loop with an event structure and keep an index value in a shift register. Make an increment and decrement button and increment/decrement the index value when one is pressed, then index out the new element for display.
(You should also apply quotient&remainder with the "index/total array size" to automatically wrap when you reach one of the ends.).
05-06-2014 03:25 AM
Does anyone have a visual representation of this code for visual reference?