Yes, it must be done with two different processes. The idea is that a pipeline is comprised by process elements that can be chained.
The main reference for writing scripts is in:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting
- What are the errors that you are getting?
- Is there any problem at computing PLV with same parameters in the GUI?