I got answer from matlab support and I share it here.
In fact the code was in the parameter callback.
But the code shall be place under intitialize callback instead.
After doning that, block works without problem.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!