Sequence Break
F²MC-16FX Family, Emulating and Debugging with Softune and MB2198-01, Doc. No. 002-04828 Rev. *B
62
As seen in watch window, program execution is halted when variable
‘a’
,
‘b’
, and
‘c’
are equal to 2. Since after the
event at Level 1 there is a restart condition i.e.
count
= 110 and
a
= 2,
b
= 1,
c
= 10, Sequencer will restart and
wait for event at Level 1 to occur again i.e. write 0x0002 at memory location H’002530. This condition will occur
after while loop is rolled over first time. Same can be verified with the
value of variable ‘
out_count
’
which is equal
to 2 and value of variable ‘
count
’ which is equal to 1111.
To understand it better let us have a look at trace window,
The instruction
<variable>++
, is handled as read-modify-write instruction by MCU. Every time when value of
variable
‘b’
is read as 0x000B, value of variable
‘a’
is updated. Notice the value of variable ‘count’ when event at
Level 1(Event 1) is triggered.