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
Best Answer