The PLECS component library does not include a component to measure power factor.
Assuming you are interested in three-phase systems, attached is a simple model to calculate the power factor that works well for balanced, three-phase systems with low harmonics. You can find similar calculations for P & Q in the "Microgrid in Island Operation" and "Windpower System with Permanent Magnet Synchronous Generator" demo models.
You should note this is one of many possible implementations of a power measurement block. For example, the calculation could be performed in different reference frames or using sequence decomposition. There also are different possible sign conventions for leading/lagging power. The calculation you ultimately choose should depend on the characteristics of your application, but this should get you started.