I think I have a basic understanding of what it's doing, although the details are beyond me. I think the code can be cleaned up a little, if nothing else.
Near the end, you are using case structures to decide which wire to use. Take a look at this block, it might be more suited for this.
http://zone.ni.com/reference/en-XX/h.../glang/select/
Also the giant case structure in the middle... I'd be tempted to put the buttons into a boolean array, then convert that array to a number, then put that number into a single case structure which can select the constant. This was used pretty elegantly in the example line following code.
Also it seems a little messy to run the process value into the setpoint as a method of making it not move. I'm not sure I understand the goal, but perhaps removing the first case and instead making one around that PID would be better.
Hope this helps... My confidence is a little shot by Alan's reply...