Effacer les filtres
Effacer les filtres

Sample time control in S functions

1 vue (au cours des 30 derniers jours)
Owen
Owen le 15 Oct 2012
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

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by