You've wired a constant 'Wait For Data' to the case selector, so it will always execute the same case. You want to add a shift register to the while loop, move the 'Wait For Data' constant outside the loop, and wire the unconnected output of the case structure to the right-shift register terminal.
I have changed the code as you suggested and it now works however I have a problem because it exits the while loop and closes my (CLOSE LJM Vi) which stops it working properly how can I resolve this?
The only way it exits the while loop is if you hit the stop button.
One problem I do see is that you have a blue wire that runs through the missing subVI's. But where that wire exits the case structure, you have it set for "Use Default if Unwired" on that case tunnel. That means you risk losing the data in the wire when that case structure ends. You should uncheck that tunnel setting, and make sure it is wired through every case, even those that don't use it.
So nice of you to mark your own reply as the solution to your problem when others here have clearly pointed you in the right direction. In the future be sure and give credit to those that help you by giving kudos and marking their replies as solutions.
I am sorry this has upset you so much please, beware this is only my second posting and I am not sure how to use this forum yet, it was never my intention to take credit for anything perhaps you should be a bit more tolerant until you know all the facts
You can go to the options menu of your message and pick "Unmark as Solution". Then you can go to which ever message helped you the most and mark that as the solution.
You can mark multiple messages as solutions if you find they were particularly helpful to solving your problem.
The message that you marked as the solution. Go to the Options menu to the upper right of that specific message.