Compatibility of Matlab 2017b S-function C-Code on a HIL D-Space setup that is using Matlab 2017a?
1 view (last 30 days)
Our oganization only has Matlab 2017b and we are creating s-functions of our simulink model where one of the artifacts that gets auto-generated is C-code to be delivered to a customer who is using them on a HIL D-space system that is using Matlab 2017a. The customer is experiencing incompatibilities between our 2017b s-function code and their 2017a system. There is no means for either organization to align their matlab versions with the others.
Hoping to learn if there are any workarounds for getting our 2017b built s-function code working on their 2017a system. We have also tried exporting the actual 2017b s-function model into 2017a format which works for the model use, but this solution does not help for the c-code.
Anyone have any ideas?
Fangjun Jiang on 19 Aug 2022
The best way is for you to export R2017b version model to a R2017a version model so your customer can use it. Of course, that requires to disclose the contents of the model, which you might not be allowed to do.
The second option is to provide the generated C code to your customer so they can build the S-function in R2017a. If they need to run the model in dSpace real-time target, then C code is required. Providing R2017b version of S-function (.dll or .mex) file is not sufficient even if it could be run in R2017a in model simulation.
The third option is to consider Create Proteced Model. R2017b might not have it. I don't remember which release starts to have it. It also requires them to be able to "use generated code".
Disclosing the generated C code may not be as serious as disclosing the model, if you don't include comments in the generated code.