Hi,
The problem of your code is that when ytou click the pause button, the pause global variable will go to true, then your simulation vi will never generate values again to the queue and then your read from queue vi in the main loop will be waiting forever for a value and the while loop will never run again and the pause variable will never be false again, because the code is stuck on the read from queue.
If you try to put some value in the timeout of the read from queue, so it will jump out after some time if no value is comming, or put the write to global in a separate loop.
Hope this helps,
Paulo