03-31-2007 12:06 PM
04-02-2007 09:03 AM
Hi Andrew,
Have you tried using event structures for your applications? According to the LabVIEW Help, “event structures have one or more subdiagrams or event cases, exactly one of which executes when the structure executes. The Event structure waits until an event happens, then executes the appropriate case to handle that event.”
I think that this may be what you are looking for. If you would like more information about
event structures and how to use them, please take a look at this.
If I have misunderstood your application and event structures are not what you are looking for, please do not hesitate to let me know by replying to this post and explaining your scenario again. I’ll be more than happy to assist in finding another solution.
Best of luck on your application, and have a great day!!
Regards,
04-02-2007 02:17 PM
Yeah it sounds like you know what i need. I have never used event structures before. I am sending an attachment of my code so you can see what i am talking about. When i run the pogram a second time i loose all my value i got after the first run. The user wants to be able to enter a new number of steps as many times as like. Each time the loop executes i need to keep the local varible for push volume and pull volume to change as well. They way i have it set up right now it jsut keeps that first value and the next time i run it this value goes back to zero.
It is a user specification that it continue to run when new steps are entered on the user interface. And the way i have it i am having problems keep the varibel up to date. I believe that and event structure should help me with this.
any help would be appreciated.
andrew
using labView 7.1
04-03-2007 07:44 PM
Hi Andrew,
The first thing I noticed is that none of the values you would like to
read constantly are being read in a loop. The way you have your code
written currently, the values are only read the first time the program is
run.
If you place all of your code in another while loop, you will be able to read
the values of those inputs as they change, but you may run into some other
issues. Please take a look at this KnowledgeBase Article for more
information on nested while loops.
If you have any further questions, please do not hesitate to reply to this
post. Best of luck on your application, and have a great day!!
Regards,
04-03-2007 09:15 PM
i dont see how my values are only being read the first time. I want a continous reading because when it executes that first loop i want it to sit there and wait until more numbers are entered in the step number control. And then use the values before and continue on with those. I dont see how this can be done?
I wnat it to keep doing this until a stop button is pressed to exit the whole thing.
I tired using event structure to chek for a change of value event at that control. This works but the value is still the same as if i ran the code for the first time.
andrew
04-04-2007 08:32 AM
04-04-2007 10:30 PM
04-04-2007 11:00 PM - edited 04-04-2007 11:00 PM
Message Edited by Ravens Fan on 04-05-2007 12:01 AM