LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
cancel
Showing results for 
Search instead for 
Did you mean: 

We need a way to clear the contents of uninitialized shift registers

Status: New

Unless the programmers is pretty familiar with LabVIEW, debugging can be confusing, for example if uninitialized shift registers and feedback nodes retain data. Suddenly the results are different between different runs with the same setting.

 

One might innocently expect that if I do "menu...edit...reinitialize values to defaults", I start again with a clean slate, which is of course not true if there are USRs. There is hidden extra data lurking beneath the surface.

 

I remember that this confused me when I first started with LabVIEW 4.0 many years ago. There is currently no direct way to "reset" a VI to the way it was right after loading (all controls at the defauls, all USRs cleared, etc). The only way to clear USRs is with a "file...revert", which has the unwelcome side effect that we lose all edits, meaning we need to constantly save versions to keep up.

 

I would prefer if there was a menu to clear all internal data structures from a VI without having to save the VI first. Alternatively, maybe this action should be included automatically if we reinitialize a Vi to defaults.

Message Edited by altenbach on 06-11-2009 01:23 PM

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
4 Comments
Active Participant

You dont have to save the VI, just disconnect and reconnect a wire somewhere and your shift register is flushed (I know that this is not a great solution either, but you can use undo to reset this change with no need to revert).


 


altenbach wrote:

The only way to clear USRs is with a "file...revert", which has the unwelcome side effect that we lose all edits, meaning we need to constantly save versions to keep up.


 

This is why you need to use the undo redo more often 😛

 

 

An alternate method, CTRL Click on Run Arrow, then click run arrow again (not undoable though)

 

Note: both method put the VI in an unsaved (*) state.

 



  


vipm.io | jki.net

Knight of NI

Could they provide properties to the shift register object, where you could set or rest a value to the shift register..  Hummm....  there might be nasty consequences (abusive) to that...

Maybe create a new breed of shift registers.

 

R

______________________________________________________________________
Member

Can someone please point us to the official list of things the "control click on the run button" is supposed to do?  I just looked through the help file for LabVIEW, and it mentions clicking, but not control-clicking.  I just did a LabVIEW forums search, and didn't pull up anything either.  I would like to know what this is doing, so I can know whether to do it or not.  I guess it clears the shift registers, as evidenced by a quick test vi, but I am not sure what else is going on.

Knight of NI Knight of NI
Knight of NI

Ctrl+run forces the VI to recompile its code (i.e. regenerate the machine code from the BD), which has the side effect of clearing the SR values. This is useful because LabVIEW has some cases where the incremental compile loses something and you get a VI which doesn't work right, or not at all, or causes the build to fail, etc.

 

Ctrl+Shift+run forces all VIs in memory to compile. You should note that this takes time and affects vi.lib VIs as well, so you should only do this if you have a reason to, because otherwise you won't know which VIs to save when you close the hierarchy.


___________________
Try to take over the world!