04-30-2015 12:00 PM
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
04-30-2015 01:30 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-30-2015 01:48 PM
Hooovah already gave you the answer, still some questions remain.
04-30-2015 03:17 PM
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.