MATLAB: A problem about the Sample Time in the asynchronous subsystem

sample timesubsystem

Hi, There is a subsystem in my model.The model's sample time is 0.0001,and i want to set some block's sample time in the subsystem 0.0005.But when i click the build button ,i got the error as follows:
Error building Real-Time Workshop target for block diagram '2812_StepTime'. MATLAB error message: '2812_StepTime/Function-Call Subsystem/Counter Limited/Output' has an invalid sample time. Only constant (inf) or inherited (-1) sample times are allowed in the asynchronous subsystem '2812_StepTime/Function-Call Subsystem/Counter Limited'
How could solve this problem?
My matlab version: 2009a
Best regards.

Best Answer

Hi,
this can't work: you call you subsystem with a function call asynchronously, so blocks inside the subsystem have no "direct" control about when the subsystem is called. How could a block inside impose a sample time? It would need to carry this information to the containing subsystem... Perhaps you could explain in more detail why a block inside the fcn call subsystem should have a fixed sample time...
Titus
Related Question