Hi all. I have attached two similar Simulink models for testing Simulink's Variable Time Delay module. The only difference between the two models is that I have placed the Variable Time Delay module ahead of a divide-by-four module (for one model). The other model has the same Variable Time Delay module placed before a divide-by-four module. For both Simulink models, an identical amount of delay is applied.
I was expecting that the Simulink Scope output of both Simulink models to be the same. However, one of the models appears to apply the wrong amount of delay.
In my two attached Simulink model files, one model provides the correct delay of 1E-5 seconds. While the other model provides the wrong delay of 0.5E-5 seconds (which turns out to be always one clock period less than what I wanted to apply, which means I would need to manually add an extra 0.5E-5 seconds to whatever I wanted to apply in order to achieve the correct observed delay on the Simulink Scope).
Does anyone know if there are bugs associated with Variable Time Delay? And could this behaviour shown in these attached simulink models be a bug?
I'm not excluding rookie error though! I'm just trying to figure out why one model always has a delay that is always 1 clock period short (ie. 0.5E-5 second short) of what I wanted to apply.
Also, an interesting thing about the model that I named 'incorrect_delay.slx' is that applying a time delay of 0.0 will truly provide zero delay as seen in the Scope. But applying a delay such as 0.000001 is seen to introduce of time advancement (a lead, not a lag!!) of 0.5E-5 seconds, which appears quite suspicious.
Thanks all.