Hello P Fletcher,
why do you want to stop the while loop? If you want to warn the user, then the error checking should be active all the time...
If you have conditions to stop the error checking, then you may include a case structure. See my attached example.
But: my implementation can change the behaviour of the error counting, when checking is switched off and on again.
Best regards,
GerdW
Best regards,
GerdW

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