필터 지우기
필터 지우기

Sample time control in S functions

조회 수: 1 (최근 30일)
Owen
Owen 2012년 10월 15일
Hi,
I’d like to control the sample time of output so that this output under some conditions comes out only once. Now there are many same outputs.
Is “IsSampleHit” for this purpose?
I got an error if I use this line:
if block.InputPort(1).IsSampleHit
‘IsSampleHit’ cannot be called for a port that has no sample time.
Are there any conditions that must be fullfilled to use ‘IsSampleHit’?
Thanks Senmeis

채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 10월 16일
I think you need to have specified a port-based sample time for that input. Also, here is the documentation for IsSampleHit.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by