LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequential incrementation of array

I want to make a VI that allows the user to press a button control and then a sequential list of numbers appear in an array.  Then when the user presses the same button, the next sequence of numbers appear.I will have an array of 25 numbers.  So when the user hits the button control, first the numbers 1-25 appear; when the user hits the button control again, the numbers 26-50 will appear in the same array; then 51-75, 76-100, etc.

 

Can someone post some code of how I can do this? 

 

Thanks.

0 Kudos
Message 1 of 7
(3,319 Views)

Have you tried writing any code to do this on your own yet?  For a relatively simple task like this, you will get more help if you post your code demonstrating that you've already made some effort.

0 Kudos
Message 2 of 7
(3,314 Views)

That looks like homework. What have you tried so far and where did you get stuck?

0 Kudos
Message 3 of 7
(3,310 Views)

Just to get you started, I would start with an empty array.  Use the Empty Array? function to select a case in a case structure.  If the array is empty, initialize the array.  If you have data, add 25 to all of the elements.  If you desire more help, you need to show that you made an effort.  There is the general consensus here that we do not give hand outs.  If you get stuck somewhere, show us where and we can help you learn.


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 7
(3,290 Views)

You were very specific in your needs, so my solution only speaks to that. See if you can think of a more efficient way. We really wish you could of posted some of your own code 😉

 

*See attached png

 

-chazzzmd

0 Kudos
Message 5 of 7
(3,280 Views)

Thank you all for your responses.  This is actually for my job.  We are getting Labview to run our test fixtures; it is a slow process making the change over from our normal way of running test fixtures to getting Labview to run them.  I am heavily involved with this so I am slowly getting into it.  My knowledge of labview is soley based on literature, so I am new to a lot of things concerning labview.  I will get my code that I tried to do on here when I get the chance.  I will also use what you all have given me.

 

Thanks Chazzzmd for that example.  That gives me a good start on this issue, as I was having a total programmer's block.

0 Kudos
Message 6 of 7
(3,268 Views)

Try something like this....

 

 

0 Kudos
Message 7 of 7
(3,248 Views)