Hi Mini...,
I added an initialization step for the outer SR (and deleted unused code), now the example should work...
This init step will be called everytime the vi starts as it is connected with the iteration counter. When this is not what you need you can change the initialization to using the same scheme as the inner while loop: a SR holds the status (init/not init)...
Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019