setNumTicksUntilNextHit

Class: matlab.system.mixin.SampleTime

Set the number of ticks in Simulink sample time

Syntax

setNumTicksUntilNextHit(obj,ticks)

Description

setNumTicksUntilNextHit(obj,ticks) sets the number of ticks in Simulink® sample time to wait until the next call to stepImpl, or outputImpl/updateImpl. To use this method, set your System object to controllable sample time with createSampleTime('Type','Controllable'). Otherwise, your System object™ gives a compilation error.

You can only call this method from stepImpl, outputImpl, updateImpl, or resetImpl.

Input Arguments

expand all

System object that you want to specify the sample time.

Number of ticks in Simulink sample time to wait until the next call to stepImpl or outputImpl/updateImpl. Specify this number as a positive integer scalar less than intmax('uint64').

The number of sample time ticks to wait until the next hit is persistent. If you don’t update this number, Simulink uses the previously set value of number of ticks to wait.

Introduced in R2018a