title: Increment a variable by Simulink
body: <p>I have a problem in Simulink, I have a variable "k" as constant Block (start Value k =1 ) and i want to increment "k" after each time I click on "the simulation button" untill "k" is 4 then it will be reset to 1 again. </p>
  
  <p>i already try this (see atached Image 1), but in this case k it wil be so long inkremented until the Simulation time is finished (see atached Image 2) and that is not what i want.</p>
  
  <p><a href="http://i.stack.imgur.com/rbGTC.png" rel="nofollow">enter image description here</a>
  <a href="http://i.stack.imgur.com/wzWy7.png" rel="nofollow">enter image description here</a></p>
  
  <p>i will apreciate any Help many thanks Jay</p>