Thank you so much! This is very helpful to what I am doing. Just wondering, how would the pseudocode formulas you have written change if I am using CEC for both the inverter and the module? Specifically, I am using "CEC Performance Model with Module Database" and "Inverter CEC Database".
Thanks for your help - I have managed to solve the issue!
A follow up question: How would I be able to tell if my simulation is using the '6par_' module parameters as opposed to the 'cec_' module parameters? Does it always default to cec? or is there a way to change the simulation between using 6par and cec for the modules?