11-12-2009 10:27 PM
Hi,I'm quite new in LV [more or less one week :)]
I'm developing a front panel for moving a Newport device. More or less is already programed. I choose the kind of movement [absolut or relative, horizontal or vertical] with an event structurewhere each case is activated with his own button.
In front panel there are two controls for chosing the distance. I want that when the user changes the number on one of this control my program refresh the variable.
I have tried what you can see in the image below but the problems is that the variable value "stops" just at the exit of the while and doesn't arrives at event structure. If I make it without the while loop the following occurs: when I run, controls send the variable valueat the event structure entrance ant then, if you change this value it doesn't refresh it until the next global while iteration, so you have to move it always twice [it's like you are always one iteration defased]
I hope you understand my bad english and the situation.
Maybe it's a simple problem by I don't see it.
Thank you very much in advance for each eventual response.
11-12-2009 11:19 PM
tinocasals:
You posted this question to the LabWindows forum. You'll get a better response if you post it to the LabView forum.
That being said...
Part of the dataflow and data-dependency model of LabView is that a structure (like your inner While loop) won't provide any outputs until everything within the structure is complete. For your inner while loop, that means no outputs will be generated until the Stop button is pressed. (In the same way, a structure won't start executing until it has all of its inputs.)
Part of the challenge of designing loops is to make sure that they are responsive enough for the application. If it takes too long to execute one iteration of the loop, your program won't be responsive enough. You do need to remove your inner while loop.
What else can you do to speed up the iterations of you outer loop? You may need to attach you VI (not just a screen shot) in another post to the LabView forum to get more answers.
11-12-2009 11:26 PM
Thank you very much.
I am posting it it LV forum.