LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does "Hightlight Execution" change execution sequence

Hello,
 
I have a general question regarding the "Highlight Execution" tool in LabVIEW; does the block diagram execute in a different sequence when the "Highlight Execution" tool is used versus when it is executed normally by hitting "Run"?  
I am trying to debug my vi (NI Developer Suite, LV 8.2) and am using the "Highlight Execution" tool to see how the data is transfering through the various sections of by block diagram... Can I expect the same sequence of execution when I run my vi at regular speed?
 
Thank you very much,
Karin
0 Kudos
Message 1 of 4
(2,691 Views)

I am pretty sure it is the same sequence that the code runs at full speed.  However be cautious because things all slow down, so it is tricky to de-bug timing related problems.  For that i just use loads of probes and indicators, then clean them all up when i am finished.

Craig

LabVIEW 2012
0 Kudos
Message 2 of 4
(2,684 Views)
I have never heard NI comment directly on this, but there are a couple things that would make me question the fine details of how common the execution order really is between highlighted and normal speed. To begin with, remember that the VI you are looking at may be highlighted but the subVIs aren't, so there can be differences in the relative speed of code - take loops for example.

Say you have two loops, one of which contains a single subVI and another that contains 4 or 5 low level primatives. Now let's say that when executing normally the subVI takes longer to execute than the low-level primatives. In this situation when running normally, (and assuming that the loops run the same number of times) the loop containing the primatives will finish first. Which in turn means that any further code that is waiting for the output from that loop will start executing before the other loop finishes.

However, when you turn on highlighting the loop containing the single subVI will execute quicker due to all the neat little bubbles running around showing the data flowing through the wires. Therefore the relative timing between different parts of code has shifted.

This is why you can see race conditions either become manifest, or disappear when highlighting is turned on.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 4
(2,671 Views)

I agree that some parts of your code may take a little longer with highlighting turned on, and parallel sections might finish in different amounts of time. However, the overall sequence of your code will not change. 2 loops running in parallel will run the same whether highlighting is on or not. There is no guarantee how parallel code will run. Race conditions will exist with or without highlighting, and like Mike said, they may be more apparent with highlighting on.

If you write good code and pay attention to dataflow, none of this should matter anyway. Turning highlighting on will have no effect.

0 Kudos
Message 4 of 4
(2,655 Views)