My application is to collect data after initializing.
All user interface were treated by simple "event structure".
When the user push the GO button, the application goes to long sequencial loop.
--- Initialize(time out event) ---
1. Open initial parameter file and treat it
2. Hardware initialize
3. Periodic hardware monitoring(transfering single data) periodically
--- Treat user interface (change value event in each button)---
1. Various resoponses(hardware connection & file name setting)
--- Go measurement ----
1. Prepare message for message box in various conditions
2. Check the elased time (while loop): 1 sec period
3. single measurement
4. step 2 & 3 will be repeated inside (while loop)
5. save the collected data
6. go to timeout event step 3.
>>> Go measurement is very complex using several sequence and while loops as you can see in the attachment.
Therefore the overall LV code was very complex in "GO" event.
My application will be update more in near future.
I believe this is not effective coding for next work.
During my taking in NI regular course (Basic and Intermediate),
I got to know some considerations for the good programming.
But the application was coded before the course.
I would like to remove the multi-staged sequence loop in GO event structure.
But I think It will be very heavy work. Therefore I want to ask you prior to start to modify.
Would you please reccommend me which structure(event, user event, state machine, queue, producer/consumer) will be suitable to my case?
Any comment will be welcomed.
메시지가 08-25-2007 02:41 AM에 labmaster에 의해 편집되었음