LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

embedded sequence

I have a two-frame stacked sequence structure inside of a while loop. I want the sequence structure to execute repeatedly, but when I run the code it executes once and then the while loop goes off without executing the sequence again (see attached image.)  Note this is on FPGA

0 Kudos
Message 1 of 4
(2,905 Views)

No it doesn't.  Either you are explaining your problem incorrectly, or everything I know about LabVIEW is a lie.

 

The while loop will run repeatedly forever, doing case 0 then case 1 then back to case 0 again and again.

 

The iteration terminal will increase quickly depending on your values, and the index will incrase past the size of the array, then indexing the array will return a 0 which is the default value for the array.

 

I'm guessing you want a mod (quotient and remainder) to repeat back through the indexes of the array.

0 Kudos
Message 2 of 4
(2,884 Views)

Hooovah already gave you the answer, still some questions remain.

 

  • What's in the other frame (it would be so much clearer to use a flat sequence ;))
  • How often does the array data change (I guess the size is fixed on FPGA, right?)
0 Kudos
Message 3 of 4
(2,878 Views)

Based purely on the image given, I think you really want a FOR loop with autoindexing on the array.  No Index Array needed then.  If you want that process to repeat, you put it all inside of a While loop.

 

If you insist on keeping your current setup, then keep your index in a shift register and increment it.  Since you are in FPGA, I would advise against using the Quotient & Remainder function.  It uses a lot of gates and I think it cannot be done in a single cycle (would need to verify this).  Instead, do a check for Index equaling the array size and use a Switch to set the index to 0 if it is greater or equal to the array size.


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 4
(2,855 Views)