Hi everybody!
I'm using:
- LV 7.1 + RealTime;
- compactFieldpoint;
I've noticed a strange behaviour, when I put a while loop inside a timed loop. Let's fix timed loop with these settings:
- 1 KHz clock
- 1 ms period (yes, I know it's short....)
- offset 0 ms
- Phase 0
-
Discard missed period (ON) and MAintain original Phase (ON);
-
Timeout: -1.
If inside this loo, I put a traditional while loop, waiting (say) for an event to occur, and if this event does not arrive, my cFP-2020 hangs! I mean, it becomes unreachable for the debugger, and, more, if I run a ping to it's address, after some cycles it becomes unreachable also from ping!
Clearly, this code statement lock the fieldPoint, because if I remove the inner while loop all works.
I know that with 1 ms period, timed loop always finishes late, but I set to discard missed period and timeout to -1.
It seems to me that sometimes Timed Loop add heavi overhead to programs, I'm turning to all while loop based tasks, even if my application has to be real-time!
Advices welcomed! Have a nice day!
graziano