LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution priority..

Hallo,
 
 
After Simulate signal VI sends out sine wave to both Tone measurements.vi  and Filter .vi.,why Does Filter .vi runs first and then the Tone measurements above it..
 
How can i change the priority of execution, for E.g. once the signal ís received by Tone measurements, let it first display the amplitude and frequency of a signal without filter and then come down to Filter Vi and tone measurements for filter..
 
I mean how can i change the priority of execution?
 
Cheers,
Abhi
 
0 Kudos
Message 1 of 6
(3,977 Views)
That's how dataflow works. A function will execute as soon as all of its inputs are satisfied with data. The Tone and Filter Express VIs are wired in parallel, so they can both execute at the same time. To force a data dependency you need to wire an output of one VI into the input of another so the second VI waits until the first one is finished since that's when the first VI puts data on that connecting wire. In the example you linked to this can be accomplished by wiring the error in/out clusters from Tone to Filter.
Message 2 of 6
(3,974 Views)

SM,

Does this mean that when we want to force any dataflow for LV, we can use error connections to VI so that they are dependent on previous execution. I faced this problem at the start, however I used the flat sequence, which I know is not the best of options. You advice will surely simplify some of the issues.

Thanks

0 Kudos
Message 3 of 6
(3,972 Views)
Using the error in/error out clusters is a very simple way to force execution order, and it has the added benefit of letting you eliminate sequence structures in about 99% of cases.
0 Kudos
Message 4 of 6
(3,965 Views)
Thanks a lot. That will surely help me modify some of my spaghetti code Smiley Happy
0 Kudos
Message 5 of 6
(3,962 Views)

yes. thank's for the tip. i didn't know that before.

Now i know a realy benefit of the error in/out link.

0 Kudos
Message 6 of 6
(3,494 Views)