It looks like a problem with sample time.
Enable the sample time colors from the Format menu. This will help you to view at which rate you blocks run and configure them to behave as you expect.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!