A quick reference demonstration on how to add the CodeSys PID (PID) function block. You will have to enable the library using the Library Manager. The library you are looking for is called Util. If you expand Controller, there you will find the PID function blocks.
I hpoe it helps.