Simulink Test Harness Time Step Mismatch

Hi All.
I'm trying to create a test harness out of small model ("parent model") that calls a reference model. The parent model has the "fixed-step size (fundamental sample time)" set to '0.01' sec while the reference model has this set to '-1'. All blocks in the parent model have '-1' or 'Inf' for "Sample Time" (as best I can tell). I've checked this by displaying the sample time colors on the parent model (outside of the test harness) and by spot checking some of the blocks.
I'm running into an issue where, when I create a test harness for the parent model, the test harness's "Signal Conversion Subsystem" seems to be setting the time step 0.20 sec, & ignores the parent model's time step. I'm not sure how to get the parent model to execute at 0.01 sec when being called by the test harness. Any advice would be much appreciated.

댓글 수: 6

Birdman
Birdman 2017년 11월 27일
Can you share the model?(export to R2017a)
Richard Hopple
Richard Hopple 2017년 11월 27일
Unfortunately, I cannot due to PIA's.
Birdman
Birdman 2017년 11월 27일
Signal Conversion blocks inherits the sample time from its driving block. Make sure that the driving block uses the fundamental sample time.
Richard Hopple
Richard Hopple 2017년 11월 27일
I created new parent and reference models. It seems that the reference model is driving this. The reference model seems to default to 0.20 seconds when all items inside it & the model are set to inherit the time step.
Young Ma
Young Ma 2017년 12월 5일
Hi Richard,
Which version of MATLAB are you using? I tried to create a model in R2017b but could not reproduce the issue you had. I have attached the zipped models I created according to your description and the screenshots. Please feel free to use/update the model and let me know your reproduction steps and further questions.
Richard Hopple
Richard Hopple 2017년 12월 5일
Turns out I have 1 block buried that had a default step step of 0.2 which was back propagating. Took a few days to find it.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

제품

질문:

2017년 11월 27일

댓글:

2017년 12월 5일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by