You may want to look at some of the examples which come with LabVIEW and deal with phase measurement. Also, I am attaching an example VI I found on NI's website. This may help you get started with your programming also. But the example VIs which ship with LabVIEW are definitely your most useful resource that you have.
J.R. Allen