Hi Alloush,
I have looked at your VI and have and I have a couple of suggestions.
Is there any reason the two while loops do not fit on screen? As a rule of thumb you want to make sure that your block diagram fits on one screen, or if it has to be bigger that you only have to scroll in one direction to view it all.
I am not entirely sure from your description what you want to do but it seems you main problem is how to architect your code so things execute when you want them. To this end have you thought about any of the formal training courses? They will discuss methods to architect your code so you can perform the sort of operations you need. go to www.ni.com/training for more information.
There are also several online documents that will go through different architectures
http://zone.ni.com/devzone/cda/epd/p/id/3717
http://zone.ni.com/devzone/cda/epd/p/id/2941
http://zone.ni.com/devzone/cda/tut/p/id/3024
The state machine architecture is one of the easiest to get started with and very flexible.
Regards
Jon B
Applications Engineer
NI UK & Ireland