Why do I receive an error when using an S-function generated with a explicitly-defined discrete sample time using the Real-Time Workshop S-Function Target from a subsystem that has both continuous-time and discrete-time blocks?
显示 更早的评论
Why do I receive an error when using an S-function generated with a explicitly-defined discrete sample time using the Real-Time Workshop S-Function Target from a subsystem that has both continuous-time and discrete-time blocks?
I am creating an S-Function with a fixed-step solver from a subsystem which has continuous and discrete blocks. Some of the discrete blocks have sample times set. Then, I place the subsystem into a model which uses a fixed step solver with a different discrete sample time. This is producing an error that the S-Function can not be used in the model because of the sample time.
Error reported by S-function 'Subsystem_sf' in block 'sampletimes_sfcn/Subsystem/Subsystem_sfcn':
This Real-Time Workshop generated S-function cannot be used in a simulation with the current fixed step size because this S-function was created from a model with a fixed step size of 0.001 and had both continuous blocks and discrete blocks running at this rate. See the Solver page of the simulation parameters dialog
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!