LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset a subVi


@Yamaeda wrote:

@danielepirovano wrote:

 

The subVi is in a case structure, the subvi starts to run when I change the control of the case structure to true. The subVI runs until I change the control to false.

There are no loops and no shift register in my VI. The "reset signal" is connected to a series of logical controls of the data processor.

 


Reset the SubVI in the false case. Problem solved. 🙂

/Y


I think you are trying to answer the original thread from 2011, while we are now dicussing something quite different. There is no case structure.

0 Kudos
Message 11 of 13
(748 Views)

Hi Altenbach,

 

Thanks for all your prompt feedback and reply.The VI is poorly designed as it is a compilation of methods that work. Unfortunately I am unable to devote time to optimize my program.

 

I am currently trying to improve this VI based on your comments, but I am held up by other projects so I may take a while before I can see if the solutions work. But back to my main question, is there a way to clear the uninitialized shift register "other than the add a constant" solution; even quitting the subVI after it returns to caller is acceptable to me. Otherwise, my current solution is to quit the main VI after each run.

0 Kudos
Message 12 of 13
(698 Views)

@Oldcreek yes i was. 🙂

 

A shift register is typically reset by feeding it the reset value from the inside. If you dont have a case structure inside the while loop you can solve it with e.g. a Selector (or depending on structure by indexing out a default/reset value).

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 13 of 13
(679 Views)