LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A Question about Debugging....

Solved!
Go to solution

Hi All,

 

I have a query about debugging - specifically probes. Is there a way to link and record the values on a wire (from a probe) which is a loop to the loop counter (or even to a secondary value)?

 

When I am debugging code from a state-machine I often find it easier to wire up the state and the value I am interested in into a cluster and then use 'build array' and a shift register to add this element at every loop. I might also do this by just indexing out of the loop too.

 

Once execution is complete etc I can look at the array (either using an indicator or a proble) to see what happened to the value at each state/loop. And I often see exactly where my code went wrong.

 

My question is: is there a way  I do this using regular probes without having to build an array? So for example I probe a numeric wire and get an array of answers instead of just the last value on the wire?

 

Thanks,

Dave

 

 

0 Kudos
Message 1 of 4
(2,731 Views)

Create a subVI that has an uninitialized shift register in a while loop.  The loop has a True constant on the stop terminal so it only runs once.  Build the new value you get from the terminal into an array you store in the shift register.  I'd go one step further and log the data to a file inside the subVI.

Message 2 of 4
(2,727 Views)

Hi,

 

Thats a good workaround - thanks for the suggestion.

 

Dave

0 Kudos
Message 3 of 4
(2,691 Views)
Solution
Accepted by topic author DeltaJ

I found this nugget which does exactly what I want - its a custom probe developed by Darren.

 

This post on the idea exchange suggests that it should be atleast included with the LV package or else integrated into the dev environment! Well worth voting for!

 

 

Message 4 of 4
(2,662 Views)