Nick
Nick

Reputation: 2980

Variable transport delay using time after threshold has been reached in Simulink

In Simulink how can I delay the transport block to the exact time of when a certain threshold has been reached?

Basically I have an S-function which switches to an alternate input source, a sine wave, after a certain value has been reached. As soon as the switch occurs I want to start the sine wave. For that I need to delay the wave generation until the switch occurs.

How can I send that time to the Variable transport delay block?

Upvotes: 1

Views: 1061

Answers (1)

Mikhail_Sam
Mikhail_Sam

Reputation: 11218

Maybe you can try this way: enter image description here you need Variable Integer Delay for example. It changes delay to what you need. Calculate needed value of delay you can in User Defined Function, route to it your threshold value and current time and all other values you need.

Hope i understood your question correctly!

Upvotes: 1

Related Questions