Disable TransportDelay warning when time delay is set to 0
6 views (last 30 days)
I found this question being asked before a couple of times but always without an answer, so thought I might as well just give it another try :)
The problem is simple. Put a TransportDelay block in any system and set its delay time to zero and you will receive this warning:
When delay time is set to zero, the transport delay block 'PATHTOBLOCK' is automatically set to support direct feedthrough. This may cause an algebraic loop. A Memory Block can be used in place of the Transport Delay to break the loop.
I already tried fixing it by manually turning off all warnings in the model preferences but it still popped up. I also tried to suppress the warning with Simulink.suppressDiagnostic('PATHTOBLOCK','Simulink:blocks:TDelayDirectThroughAutoSet') but Matlab says:
"The message identifier Simulink:blocks:TDelayDirectThroughAutoSet cannot be suppressed."
However, in our case the TransportDelay is needed in some cases and in others it's not. So settng the delay time to 0 shouldn't be much of a deal and since we got the Diagnostic settings for algebraic loops on "error" and tested everything properly we made sure not to run into trouble with it being set to 0 in any circumstance. Its the last warning our model throws and it would be nice if someone could tell a way how to get around it.
Thanks in advance,
Fangjun Jiang on 4 Aug 2022
I understand the convenience of your using the TransportDelay block. When there is no delay, simply set the delay to be zero. But as you have tried, it seems impossible to eliminate the warning.
I would try a workaround. The simpliest way is to use a Switch block. Figure out a condition to control the Switch. One path is through the TransportDelay block. The other path is a direct feedthrough.