LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change Value in Debug

Hi all,

 

In debug mode, how do I change a value?  For example, if a wire has a boolean false value in it, when I am stepping through the program, can I change it to true, so that the program can respond accordingly?  Thanks!

 

Yik

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 4
(2,851 Views)

Probes are passive, you cannot inject new data into the wire.

 

What you need to do is add a bit of code to troubleshoot. For example, you could disconnect the data source of a wire and replace it with a diagram constant or FP switch, or you could inser an "invert" to see what happens down the wire if the boolean were the opposite. You just need to be a bit creative.

 

Make sure to save the VI before you start messing with it this way. 😉

Message 2 of 4
(2,831 Views)
Side-note: This would be a good suggestion to propose in the Product Suggestion Center. There have been many times when I wished I could do this, as I can with Visual Studio.
Message 3 of 4
(2,816 Views)

As was already said, you can't do this on a wire-level. But you can do this on a VI-level when stepping through your code. You can set a property on a VI called Suspend When Called. When execution reaches the subVI, it will pause before continuing. You will have a chance to see the values on your input controls attached to the connector pane and update them before continuing execution. For instance, if you had a boolean input control that had a False value, you could toggle it to True and then unpause to continue.

 

This property is in the VI Properties dialog in the Execution section.

Message Edited by Jarrod S. on 03-08-2009 12:56 PM
Jarrod S.
National Instruments
0 Kudos
Message 4 of 4
(2,812 Views)