IAR VISUALSTATE

From emboxit
Revision as of 16:51, 11 September 2015 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

GettingStartedGuide.en.pdf

page 35

600px

page36

600px

Pressing the middle button (BTN_MID_DOWN) causes a transition from state R1to 
R2. This transition causes two entry reactions to be executed. When entering 
superstate R2, the timer action function TMR1_setis initialized to count down 50 
system ticks. As this occurs, the default substate b1is activated and its entry 
reaction LED1_ONis executed.
After 50 ticks, TMR1_settimes out and the event T_BLINKis sent. This causes 
two transitions to fire. First the internal reaction of R2is triggered, resulting in 
TMR1_setbeginning another 50-tick countdown. Second, T_BLINKtriggers the 
transition from b1to b2and the exit reaction, LED1_OFF, is executed. After the 
next 50 ticks, T_BLINKagain causes a transition from b2to b1, and the entry 
reaction LED1_ONis executed. Thus, LED1 blinks with an interval of 50 system 
tick units.
b1 and b2 have the same reaction to event, so this reaction is implemented in their super-state,