LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution Order

Solved!
Go to solution

Hi can i want to know the execution order of functions  in the bellow diagram . though all functions recieve data at the same time why functions executing from bottom to top when i see in highlight execution?

 

 

execution.png

0 Kudos
Message 1 of 10
(4,715 Views)

Execution Highlighting is a debugging option - and thus allows you to see the nodes execute in a sequential manner. That's a nice feature in LabVIEW.

Without Execution Highlighting, LabVIEW will do the best to execute that piece of code as fast as possible.  You won't be interested in the execution order in this case, either.

 

With regard to your question


@kotresha wrote:

Hi can i want to know the execution order of functions  in the bellow diagram . though all functions recieve data at the same time why functions executing from bottom to top when i see in highlight execution?

 


Best answer:  Yes, you might want to know it.  Actually no one cares Smiley Very Happy

0 Kudos
Message 2 of 10
(4,701 Views)

Thanks for your valuable answer. But is there any other way to confirm that all the functions execute at a time?

0 Kudos
Message 3 of 10
(4,683 Views)
Solution
Accepted by topic author kotresha

The answer to your question is that the Execution Order is "unknown", or "variable", or "unpredictable".  If you impose another system on it (like whatever LabVIEW uses to "highlight execution"), another set of "unknown rules" may also come into play.

 

The principle of Data Flow says that examples such as yours execute in parallel to the best of the system's ability -- on a multicore multi-threaded CPU, they might actually execute in parallel on separate cores.

 

When teaching LabVIEW, I use an example where I create a parallel structure, and ask the students to predict the order of execution.  I ran the identical code several times, and invariably the execution order of the parallel lines varied.

Message 4 of 10
(4,682 Views)

Thanks for your answer. It was helpful .

 

0 Kudos
Message 5 of 10
(4,672 Views)

Just to elaborate on Bob's answer.  Execution highlight forces the code into a single thread.  This is not normal.  LabVIEW does have some rules about which code may execute first when running single threaded (All subject to change when compiler optomizations are applied.  So, take this all with a grain of salt since, it does not matter anyway.)  Your example likely executes top to bottom because you built it that way,  If you take the bottom function and move-to-back it may execute first.  Z-Order Back-to-Front, seems to be a good guide to predict execution order with highlight execution on.


"Should be" isn't "Is" -Jay
Message 6 of 10
(4,624 Views)

Thanks for your answer.It was more clear explanation for my question.

 

0 Kudos
Message 7 of 10
(4,553 Views)

LabVIEW does have some rules about which code may execute first when running single threaded

 

 

One of those rules seem to be: Whatever you want to look at, runs LAST.

 

Smiley Tongue

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 10
(4,214 Views)

@CoastalMaineBird wrote:

LabVIEW does have some rules about which code may execute first when running single threaded

 

 

One of those rules seem to be: Whatever you want to look at, runs LAST.

 

Smiley Tongue


Select what you want to see execute Ctrl+Shift+J  try itSmiley Wink

 

Elsewise create a sub-vi of the "Interesting" portion and set it to suspend when called and Ctrl+arrow as desired


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 10
(4,154 Views)

This looks like an exam question.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 10
(4,123 Views)