08-30-2016 05:06 AM
Hi,
I am trying to develop an application using Labview version 9. the application is to aquire an lightening impulse waveform from a tektronix 2012B scope on to a PC and generate a report with the waveform parameters such as the rise time, tail time and the Peak of the wave.
I have been able to aquire the wave and generate with all the parameters.
However when I built a EXE file of the program, and ran it on a laptop it has a delay for report generation (approx 3-4mins) to pop up the menu for report generation. And Also I find the code not very user friendly. Please guide me so that I could optimize the code for faster output.
Any suggestions and information to improve my code would be useful.
Thanks in advance....
Solved! Go to Solution.
08-30-2016 05:25 AM
Use State machine Architecture.
Avoid using Multiple loops when you actually dont need
You can Exit the Loop by using event structure in State machine rather than handling separate Loop to Kill labVIEW Apllication which is not advisable.
You dont require a separate Loop to update to indicator from Globals.
http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/catnav:tu/q/state%20machine/
08-30-2016 11:02 PM
Thank you Mr Palanivel.. I shall try out the same
08-31-2016 01:16 AM
Three of your loops are trying to use 100% of the CPU, each spinning as fast as the computer allows, millions of times per second. This causes a lof of contention and slowdown of the more important processes.
What is the reason for the 5000ms and 10000ms waits. Only the longer one matters.
The mechanical action of the exit button should be latch action, but it is not recommended to run the emergency brake like that during acquisition. Use proper shutdown code instead.
Two loops overall should be enough, one for the UI and one for the measurements. Learn about evet structures.