LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Non-executed" values while debugging

Solved!
Go to solution

Hello,

 

I've met problem while debugging: some nets don't display theirs values.

The conditional breakepoint is set on "1" (blue circle)

Actual executing module - comparator (red circle).

As you can state, probes "3" and "4" don'st display net values, whereas "6" does (being placed after "3" and "4").

Where is a problem.

 

Thanks in advance.

 

Pavel

 

 

 

Debug_Ambiguity.jpg

0 Kudos
Message 1 of 8
(3,370 Views)

I agree it does look like an odd problem, but you've made it very hard on yourself because you have all those wires running across your diagram! A good way to compact them is to create type def clusters of your state data. This will allow you to unbundle and bundle only the data you need in each part of your state machine.

 

To create a type def cluster, you can either create a new control and use the dropdown menu to make a type def (or strict type def if it is a front panel element that you always want to look the same). The type def allows you to change something (the name of a piece of data, or add or delete pieces) and it will be updated all over your program automatically. Another way is to create a cluster constant on the block diagram. Add some stuff to it (boolean constant, numeric constant, etc) and then Right Click >> Make Type Def. You can then open type def, or it will ask you to save it when you save your project.

 

Edit: Also, how come you have a separate boolean indicator for each possible case that could be running? It might be better to have a single status indicator that tells you what the loop is doing.

0 Kudos
Message 2 of 8
(3,359 Views)

Rube Goldberg Alert!

 

Please tell me that someone else put that bit of code in your case structure and not you.

 

0 Kudos
Message 3 of 8
(3,348 Views)

In LabView, there's no guarantee of the order of execution in a multiply-parallel situation like this. What is probably happening is that the breakpoint is being hit before the code actually executes the bits where you have the probes. You have to keep stepping through it manually until it gets to those points.

0 Kudos
Message 4 of 8
(3,338 Views)
Solution
Accepted by topic author Pavel_47

But order of execution does mean that the values at 3 and 4 had to occur before the value shown in probe 6 has been calculated.

 

Now if this is a case where the breakpoint happened, then the probes were placed on the wire, or you are placing probes with highlight execution turned on, then it is possible for 3 and 4 to not show a value.  If wires 3 and 4 already executed by the time their probes were placed, and wire 6 had not by the time its probe was placed, then you could have a probe value at 6 and not 3 and 4.

 

Probes only show values that have occurred when the wire executes after the placing of the probe.  It won't show anything that occurred before the probe was dropped.

 

It's not obvious from the attached pictures or the message as to what state of execution the code is in.

Message 5 of 8
(3,330 Views)

RavensFan a écrit :

But order of execution does mean that the values at 3 and 4 had to occur before the value shown in probe 6 has been calculated.

 

Now if this is a case where the breakpoint happened, then the probes were placed on the wire, or you are placing probes with highlight execution turned on, then it is possible for 3 and 4 to not show a value.  If wires 3 and 4 already executed by the time their probes were placed, and wire 6 had not by the time its probe was placed, then you could have a probe value at 6 and not 3 and 4.

 

Probes only show values that have occurred when the wire executes after the placing of the probe.  It won't show anything that occurred before the probe was dropped.

 

It's not obvious from the attached pictures or the message as to what state of execution the code is in.


Hello RavensFan,

 

It was exactly the case - values were not highlighted and I added probes after VI execution stopped on breakpoint.

 

Thanks.

 

P.S. However I didn't understand what did you mean under "Please tell me that someone else put that bit of code in your case structure and not you."

0 Kudos
Message 6 of 8
(3,303 Views)

Hi Pavel,

 

There is a Select node where True selects a value of True, and False selects a value of False. The term Rube Goldberg has come to mean doing something in an overly complicated way, and in this case the Select node does nothing but complicate the code.

0 Kudos
Message 7 of 8
(3,298 Views)

@Pavel_47 wrote:

Hello RavensFan,

 

It was exactly the case - values were not highlighted and I added probes after VI execution stopped on breakpoint.

 

Thanks.

 

P.S. However I didn't understand what did you mean under "Please tell me that someone else put that bit of code in your case structure and not you."


I'm glad that helped.

 

Click on the link I posted.  It links to one of the very first messages in that thread.  Then go ahead and read through the entire thread.  It'll help you become a better programmer.

0 Kudos
Message 8 of 8
(3,282 Views)