Generate Code Function Pvwatts V1

3 posts / 0 new
Last post
Generate Code Function Pvwatts V1

Hello once again Paul,

I´m wondering if there´s any way in the current version of SAM (or in any of the legacy versions) to use the Generate Code command to write all of the inputs from a pvwattsv1 case to VBA (even tough i believe this command is only available since release 2016.3.14 r4).

I can see that when simulating with Pvwatts, SAM automatically defaults to pvwattsv5, but since the inputs between the 2 versions somewhat differ, and the latter version doesn´t take POA values, I was wondering if there was the possibility to force SAM to simulate with pvwattsv1, and then generate the respective VBA code, in order for me to better understand the differences and how I might adapt my code to run pvwattsv1 with my own POA values.

Thank you again for any and all help,

Miguel Duarte

Paul Gilman

Dear Miguel,

SAM 2017.1.17 and the more recent versions use pvwattsv5, so when you generate code from those versions, the code will assign values to inputs for the pvwattsv1 compute module.

You might consider generating the code from the current version of SAM, and then modifying it by hand to use the pvwattsv1 module. You can refer to the module browser in SDKtool and the PVWatts V5 reference manual to see which variables you need to modify.

Best regards,


Once again, thank you for your help Paul. I´ll do as you suggest and try to modify it by hand.

Best regards,
Miguel D.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer