07-17-2007 08:20 AM
07-17-2007 10:41 AM - edited 07-17-2007 10:41 AM
Message Edited by altenbach on 07-17-2007 08:45 AM
07-17-2007 09:56 PM
07-18-2007 02:25 AM - edited 07-18-2007 02:25 AM
@Nandha wrote:
Data flow? is what you mean is using stacked sequence structure? to ensure the data flow.
Noooooooo.....!!!!
Ensuring execution order with dataflow is to make sure that there is data dependency between successive nodes so they cannot execute out of order.
Dataflow relies on two fundamental principles:
I have no idea about the transformations etc. you are trying to do, but here is a near literal translation of your while loop. Notice that there is data dependency from the controls all the way to the subVIs.. Since they are wired in sequence, they can no longer execute out of order. Miraculously, we also no longer need any of the local variables. And we definitely don't need any sequences, stacked or otherwise. 😉
In a typical application, it is not worth to recalculate all this 10x per second. It is sufficient to do a recalculation only ff any of the relevant inputs changes its value. Easiest is an event structure.
You can run this and your old code in execution highlighting mode and you will see that the local variables in the loop get read before they get updated values from the upper disconnected code segments. You will also notice that your single frame case structure to the left is unecessary. No matter what, these statements will exeute before the while loop because there is data dependency.
You constantly break dataflow by using local variables instead of wires to communicate between code segments. For example look at the "camera controller in the opper part. You don't have ther terminal connected to anthing, but then immediately read from a local variable of the "camera controller". Why??? Just delete the local variable and hook the terminal up directly!
You should also make it a habit to wire the error cluster.
Message Edited by altenbach on 07-18-2007 12:26 AM
Message Edited by altenbach on 07-18-2007 12:28 AM
07-18-2007 03:32 AM
Darn, you are sooo good,
that explain why you are the veteran, thanks a million for the advice.
I think i will post another thread, to show the limitation of the labview in terms of 3D picture control.
I figure it out that the function the labview gives has some limitation that we can't break. (at least that what i thought).
Anyway thanks a lot for the advice, you help me a lot.