Your local variable is working fine - however you need a while loop around your case structure. Otherwise will your case structure only get executed once, when you press the run button.
Best Regards
Alex E. Munkhaus Certified LabVIEW Developer (CLD) System Engineer