MATLAB and SSC library

  • andboe
  • Topic Author
More
19 Nov 2024 12:18 #13611 by andboe
MATLAB and SSC library was created by andboe
Hello,
I have SAM version 2023.12.17 64-bit, updated to revision 2 (August 23, 2024). I am using MATLAB R2024b and have also installed the C compiler. I generated code from the SAM desktop to run in MATLAB. Before doing this, I configured the MATLAB environment to recognize the path containing the SSC MATLAB files, and all the generated files are located in the same folder. However, I am encountering the same error:
 
Error using calllib
Method was not found.

Error in trial>ssccall (line 35)
        result = calllib(ssclib, 'json_file_to_ssc_data', arg0)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in trial (line 230)
    data = ssccall('json_file_to_ssc_data', 'trial.json')
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I checked the SSC library, but the function json_file_to_ssc_data is missing. How can I confirm if I have the correct library or if I'm overlooking something?

Thank you for the guidance.
 

Please Log in or Create an account to join the conversation.

  • sjanzou
More
20 Nov 2024 04:18 #13613 by sjanzou
Replied by sjanzou on topic MATLAB and SSC library
andboe,

Thanks for reporting this issue.

We have duplicated the issue and found that it is caused by the incorrect sscapi.h file included in the generated code folder.

The current workaround is to place the sscapi.h file from the open source link  github.com/NREL/ssc/blob/develop/ssc/sscapi.h into your SAM\x64 folder (where the ssc.dll resides - e.g. c:\SAM\2023.12.17) and then regenerate the MATLAB code and test and let us know if you have any issues.

This issue will be addressed in the next release and updates can be tracked at  github.com/NREL/SAM/issues/1918
 

Please Log in or Create an account to join the conversation.

  • andboe
  • Topic Author
More
20 Nov 2024 18:14 #13614 by andboe
Replied by andboe on topic MATLAB and SSC library
Thank you. The problem was resolved.
Best,
Andrea

Please Log in or Create an account to join the conversation.

Moderators: pgilman
Powered by Kunena Forum