LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
JackDunaway

Allow Data in Wires to be Forced During Development

Status: New

Currently, you can place a probe on a wire while developing, which is an indicator of the data on a wire. I want the ability to CONTROL the data on the wire, with a data forcing mechanism.

 

The implementation would be very simple... right click on a wire, and in the context menu the option "Force" would be right under "Probe." It would pop up a window of the forcing control, and while the VI is running and forcing is set to "Enable", the programmer can control the values that pass on the wire. If the force window were set to "Disable", the data in the wire would be completely controlled by the VI's logic.

 

DataForcing.png

 

I think the implementation by NI could be trivially simple. If you only allow a forcing control to be added during edit mode (not while the VI is running), the force could be added as an inline VI (as denoted by the green rectangle on the wire). The code inside the inline VI would be as follows, and the front panel would be "Data Force (1)" as shown above.

 

ForcingImplementation.png

 

Of course, if you could add a force to a wire during runtime like probes, props NI. But I would be PERFECTLY happy if you could only add these force controls in edit mode prior to running.

 

One level further (and this would be AMAZING, NI, AMAZING): enable and disable certain parts of the cluster that you would like to force and allow the other elements to be controlled by the VI logic. I made the example above because it would be very natural to ONLY force Sensor1 and Sensor2, and letting the output run it's course from your forced input.

32 Comments
kdnelson
Member

Boy, I'm sorry if this wasn't clear from the start.  Yes, I envision that this would always be used in conjunction with a breakpoint or single-stepping.  You arrive at your probe, with execution stopped, and if you get a wrong result, you can fix it and continue to test subsequent code without having to restart the whole program.

wiebe@CARYA
Knight of NI

If I wanted to change (for example) 5 values, pressing 'continue' 5 times, once for each breakpoint, would be a bit annoying...

 

How hard would it be if the breakpoint changed the value and then, optionally, continued automatically?

 

Technically, there would still be a triggering of the breakpoint, but as a user I wouldn't (optionally) have to press 'continue' all the time.

 

So the mechanism for the breakpoints will enable the value forcing, but the user experience would be better.