MATLAB: Can I generate PLC code from an S-function using PLC Coder

plc coders-functionsimulinkSimulink PLC Coder

I designed a controller in an S-function and after trying to generate a code with PLC Coder I get the following error:
PLC Coder does not support S-function controller invoked from block 'simulink_modell/Subsystem/S-Function'.
"Block 'Subsystem/Subsystem/S-Function' is a non-inlined s-function, which is not supported with the current configuration. Consider selecting the support 'non-inlined s-functions' option on the Configuration Parameters > Real-Time Workshop > Interface page."
I don't have this support option 'non-inlined s-functions'.
What can I do? In fact, is it possible to generate code from an s-function using PLC Coder?

Best Answer

Hello,
PLC Coder currently does NOT support generating code from an s-function. The error message is misleading though and we will work on fixing the message to be more accurate.
Thanks for posting this. It would be great if you could also report this issue to Mathworks Tech Support so that they can create a formal request for this and we can look into your requirement in more detail.
Thanks and regards, Kalyan Bemalkhedkar Simulink PLC Coder development team
Related Question