07-31-2009 12:52 PM
I've made several posts in the past months and found this to be the most helpful resource. Ive written a program to keep the load constant by moving an indentor towards or away the test subject at various step sizes depending on the differences in load(dp). For the time being I dont know how long I want to data collect so I simply have a stop for the while loop in the creep test event. However when I went to test if I could export my data I cannot exit the loop. I do not understand why. I tried writing a simpler program - and realized as soon as I put the while inside an event case the problem arises- the stop button becomes ineffective. I just want to know why the stop button is ignored in the event instance and how I can fix this. Also I want to export my collected data- am I doing it correctly ?
Im using labview 8.5 with a pzt actuator and PI controller.
Thanks for all the help, again
07-31-2009 01:14 PM
Right-click on the event structure and click 'Edit Events Handled by this Case' and uncheck the Lock Front Panel option.
I would recommend that you use the Producer/Consumer architecture. You can check out a template by navigating to File -> New.. and look for Producer/Consumer Design Pattern (Events).
07-31-2009 01:21 PM
kingsgambit1943 wrote:... I do not understand why. I tried writing a simpler program - and realized as soon as I put the while inside an event case the problem arises- the stop button becomes ineffective. I just want to know why the stop button is ignored in the event instance and how I can fix this. Also I want to export my collected data- am I doing it correctly ?
Im using labview 8.5 with a pzt actuator and PI controller.
Thanks for all the help, again
If you watch your code execute in execution-highlighting mode (turn on the light-bulb) you will see the "data-flow" prardigm at work. The stop button will only be read if it is inside your while loop (sorry can't look at you code, old machine).
Ben
07-31-2009 01:32 PM
The real problem is that you have time consuming code inside an event case. Look at the Producer/Consumer (events) design pattern which ships with LV. Your code cannot respond to the stop button because it has not completed executing all the code inside the Creep Test case.
In general you do not want anything with loops inside an event case just to prevent the situation you are seeing.
Learn about state machines and the Producer/consumer architecture. They are ideal for jobs like yours.
Lynn
07-31-2009 06:10 PM
Thanks for the replies. I will look into the mentioned structures this weekend. Thanks again.