LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to re-run a program?

Hi
I have written a program and would like to implement a button which allows the users to restart this program without quitting the program itself. By clicking the button, the program is "restarted". There is a built in function to quit LabView, but no one to restart a program. Can you help me?
Thanks
Guillaume

PS: I am using LabView 8.2.1, and I disabled the menu bar and the toolbar for the users.
0 Kudos
Message 1 of 8
(4,216 Views)
Hi Guillaume,
why do you want to restart your program? What make your program? You can program it in this way, that the user can start the function you want ever and ever. For example by using an event structure.
Mike
0 Kudos
Message 2 of 8
(4,212 Views)
My program performs measurements during surgical operation. At the end of the measurement, I want that the program asks the user if he wants to perform a new measurement or quit the program. And the second reason is that I want to be able to restart the program, if for example the surgeon decides to abort the measurement.

I am using flat sequences within the program. Now, if the user press the stop button I programmed, the program goes to the last frame and reset every GUI elements and close all tasks. Isn't it possible to make a "Goto to frame 1" or something like that? I could try an event structure...
0 Kudos
Message 3 of 8
(4,205 Views)

Hi Guillaume,

instead of using "Go to frame 1" (which as far as i know is not possible) you can use a state mashine. Make for every frame which you have now a state in the state mashine and then you can "jump" to the state you want.

Mike

0 Kudos
Message 4 of 8
(4,202 Views)
Hi,

first of all you will need a (while) loop around your existing structures. This will provide the possibility to re-run the whole sequence.
Then you may transform your flat sequence into a state machine and make one state asking the user to re-run or quit...

Look at the LV examples for state machines or search here in the forum!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(4,193 Views)
Hi,
 
If you need full restart of the application, then you need "the helper" application for doing that.
So, when you press button "Restart", then you should start "helper" application. Now, when helper started, you can quit your application. The helper should wait until main application will be closed, and then will start your application again programmatically.
 
best regards,
 
Andrey.
 
0 Kudos
Message 6 of 8
(4,182 Views)

i did not undestand the meaning of helper

 

i wan to restart my apllication after some time

 

what should i do

0 Kudos
Message 7 of 8
(3,819 Views)
I would investigate the use of state machines - there should be no need to exit the software and restart as you can include, for example a reinitialise state. A state machine would let you programatically control the sequence
David
www.controlsoftwaresolutions.com
0 Kudos
Message 8 of 8
(3,814 Views)