LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence through a cluster

Hi,

 

I'm just wondering is there a way to sequence through an array of clusters with a button?

 

LabVIEW 2013

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 1 of 11
(3,266 Views)

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?

Example_VI_BD.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 11
(3,254 Views)

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

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 3 of 11
(3,243 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 11
(3,238 Views)

Is there any visual example available?

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 5 of 11
(3,230 Views)

there's your button....

Example_VI_FP.png

0 Kudos
Message 6 of 11
(3,204 Views)

@PauldePaor wrote:

Is there any visual example available?


http://forums.ni.com/t5/LabVIEW/Sequence-through-a-cluster/m-p/2834954#M828403


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 11
(3,202 Views)

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

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 8 of 11
(3,189 Views)

@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.).

Message 9 of 11
(3,187 Views)

Does anyone have a visual representation of this code for visual reference?

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 10 of 11
(3,121 Views)