From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reset "first call?"

Dear all,

is it somehow possible to reset "first call?" without stopping Main Vi.
Main Vi just do a loop to ask user if he want to start from the beginning.
I don't want to use globals or inputs to the sub-vi.
Otherwise User have to stopp program and start it again, not an elegant solution.

Best Hepman
0 Kudos
Message 1 of 12
(7,940 Views)
Hi Hepman,
an input to the sub-vi would be the elegant and more appropriate solution. Why don't you want to do this?
If you could reset the First call? node, it would not be First Call? anymore, but another function.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 12
(7,924 Views)

Hepman,

no you cant reset the "first call". a workaround is to create a notifier with boolean data - and check notifier status. At initiation of your program you send a "true" ( comparable to "first call"), as well as every time you would like to reset the case structure to true.

note: do not use the "wait on notification", as the program will stall. rather use the "get notifier status".

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 3 of 12
(7,923 Views)
Hepman,

Instead of the First Call function, your can use a simple subVI with an uninitialized shift register, sometimes also called a Functional Global. The reset input should have a default value of "FALSE" so that the VI will work just like the First Call function if unwired.



But I am not shure about the architecture of your application:

1.
If you want to process the user input and reset the "First Call" state at the same place where you evaluate the current state, you can make this subVI reentrant. You must then us a single instance of this VI at exactly that place of your application.

2.
It is much more likely, that user input and the following evaluation are two separate tasks. In this case you must NOT set the VI to reentrant execution. You can then reset or evaluate the current state anywhere in your application. All calls to this subVI will share their data space and a reset in one part of your program can then be evaluted anywhere else in the application. In fact this subVI will work much like a global variable.

Happy wiring ...

Anke

Message Edited by AnkeS on 09-25-2007 07:24 AM

Message 4 of 12
(7,903 Views)

Anke's reply is right on the money.

If you want to learn more about using Functional Globals or Action Engines check out this link.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 12
(7,890 Views)
you right Anke i didnt tought about this solution (it has to do with me being in love with notifiers...  Smiley Very Happy ).
 
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 6 of 12
(7,868 Views)

Hello. 

please I'd like to ask what this simple ??

simple.PNG

0 Kudos
Message 7 of 12
(5,627 Views)

It immediatly stops the loop, making it only run once. In this case it's set to Continue if true. The point is to only update the shift registers, which holds the value and then exit.

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 12
(5,623 Views)

many thanks for your reply ..

 

I'm asking about this

simple.PNG 

0 Kudos
Message 9 of 12
(5,621 Views)

It appears that you high-jacked a close to 10 years old thread to ask your question....

However, the image you post shows the (old) boolean constant set to FALSE.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 10 of 12
(5,617 Views)