MATLAB Answers

Is it possible to have strings as I/O for S-function blocks?

1 view (last 30 days)
There is an example model where I want to have that the Simulink S-Function block accepting inputs and outputs to a S-function as strings.
I was hoping to have the function below been modified as shown:
ssSetInputPortDataType( S, eIN_STRING, SS_UINT8 );
Modified version:
ssSetInputPortDataType( S, eIN_STRING, SS_STRING);
Is there a possibility to make this happen?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 6 Apr 2020
Including a string I/O is a documented limitation of S-Functions for both MATLAB and C. Please see the following link:
It is suggest to use UINT8 as probably the best workaround.


Sign in to comment.

More Answers (0)

Sign in to answer this question.