Hi Erich,
Sorry for the long delay in replying.
I tested what you suggested and this is working, turning the led on and off.
When I changed it to run only five times, it acted the same, but at the end it left the led turned on.
This is how I define the BitIO:

and my main is:

Thanks,
Avner