05-15-2012 08:13 AM
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
Solved! Go to Solution.
05-15-2012 08:18 AM
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.
05-16-2012 10:25 AM
Hi,
Thats a good workaround - thanks for the suggestion.
Dave
05-17-2012 09:47 AM