MATLAB: Is generating structured text supported for S-functions

ccustomplcs-functionSimulink PLC Coderstructuredtext;

I'm looking to wrap some custom code in an S-function and generate structured text from it. Is this workflow supported by PLC Coder?

Best Answer

Unfortunately, S-functions are currently not supported by PLC Coder. As an alternative, please consider using MATLAB Function blocks in your model. MATLAB Function blocks do have the capability of calling custom C code. For information on how to do this, please review the following documentation link: https://www.mathworks.com/help/simulink/ug/incorporate-c-code-using-a-matlab-function-block.html