I would suggest taking a look at some of the example programs that we have on the developer exchange.
If you are using LabVIEW, you would just need to create a simple program:
FP Open -> FP Tag Create (one for each tag) -> while loop -> (inside while loop) - read set point, do pid calculations (or process control calculations), then use an fp write to output a signal to the fp rly -> end while loop -> FP Close.
Be sure to put a small delay in your loop to allow the processor a little time to "breathe".
Hopefully, this will give you a general idea. For more information, take a look at some of the examples in dev exchange and some of the knowledge bases.
Let us know if you have any other specific questions.