Running SAM generated MATLAB Model

  • Alfred Abukubu
  • Topic Author
More
12 May 2020 14:15 #8183 by Alfred Abukubu
Running SAM generated MATLAB Model was created by Alfred Abukubu
I am trying to run a Linear Fresnel Model for direct steam generation.
I have  generated the MATLAB code using generate code(GC) option.
However, when I try to run the GC via MATLAB on a System without SAM installed  on it I get the following error.
 Error in DSteam_Linear_Fresnel22/ssccall (line 8)
        loadlibrary(strcat(ssclibpath,ssclib),strcat(ssclibpath,'sscapi.h'));

 Error in DSteam_Linear_Fresnel22/ssccall (line 208)
ssccall('load');
I tried setting MATLAB environment so it can  recognize the path containing the SSC MATLAB files and libraries.
So my question is can I use the GC on any PC/Laptop via MATLAB without Installing a SAM version.
I have attached the file as well.
Thanks

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

  • Paul Gilman
More
12 May 2020 15:49 - 12 May 2020 15:53 #8186 by Paul Gilman
Replied by Paul Gilman on topic Running SAM generated MATLAB Model
Hi Alfred,

SAM's code generator should create all of the files you need to run simulations using the SSC API on a computer even if SAM is not installed on that computer.

Please be sure to keep all of the files created by the code generator together in the same folder.

Also, please be aware of the issue described here:

sam.nrel.gov/forum/forum-sdk/2949

Best regards,
Paul.
Last edit: 12 May 2020 15:53 by Paul Gilman.

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

  • Alfred Abukubu
  • Topic Author
More
12 May 2020 16:36 #8191 by Alfred Abukubu
Replied by Alfred Abukubu on topic Running SAM generated MATLAB Model
Hi Paul,
Thanks for your reply.
I ensured all files generated from the code gen (sscapi.h, ssc.dll and matlab files are in the same folder).
Nevertheless, I keep getting the stated error when running the code on a PC without SAM installed but it works on the other with SAM installed.
However, according to your reply I should be able to run Simulations even without SAM.
So I do you have any idea as to why I can't or any suggestions?
I checked out the link but I seem to face a different issue to that address in the link.
Regards,
Alfred

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

  • Alfred Abukubu
  • Topic Author
More
12 May 2020 17:13 #8192 by Alfred Abukubu
Replied by Alfred Abukubu on topic Running SAM generated MATLAB Model
Hi Paul,
Fortunately I have figured the problem. MATLAB wasn't equipped with C/C++ Compiler.
I  just installed MinGW-w64  compiler suite for Windows (Third party software for MATLAB).
The MATLAB GC works well regardless of a SAM installation.
Thank you very much for your help and response as always.
Best Regards,
Alfred

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

  • Paul Gilman
More
13 May 2020 21:44 #8197 by Paul Gilman
Replied by Paul Gilman on topic Running SAM generated MATLAB Model
Hi Alfred,

Thank you for letting us know how you solved the problem. I'm sure that information will be useful to others.

Best regards,
Paul.

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

Moderators: Paul Gilman
Powered by Kunena Forum