NI sells a control toolkit for LV which includes PID control. You can look for it on this site.
If you want to write this yourself, you should start with an uninitialized shift register. A USR allows you to keep data from the last time you ran the VI. There is an example of using a USR in the LV Example Finder and you can probably some more information about it in this site. You will also need to measure the time between runs and then probably calculate the derivative between each 2 runs to see how fast you're approaching your setpoint.
I hope this helps, as a start.
___________________
Try to take over the world!