LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reinitialize my program with bottom!

I would like to reinitialize my program with a bottom, the same way like i abort the vi and run the vi other more...
I want only push the bottom and re start the vi.
Is it possible?.
Thanks, i would like a example file.
Regards.
0 Kudos
Message 1 of 15
(3,871 Views)
Just place you initialize code in the True case of a Case structure and create a button to run that case when needed.

Very simple example is attached.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 15
(3,871 Views)
You could make a main vi that calls your vi. See the examples attached. Run the main, it closes its own front panel, calls your vi (sub-vi). In the sub-vi, you can click restart to start the sub-vi over again, or you can click stop to stop the sub-vi and the main-vi.
- tbob

Inventor of the WORM Global
Download All
0 Kudos
Message 3 of 15
(3,871 Views)
Hi Fonsi.

I wrote this VI @ LabVIEW 7.0. If you have any probles opening it, tell me and I'll Send you at the currect version.

If you have any Questions, ASK ...

Hope it Helps...
Message 4 of 15
(3,871 Views)
Hi, its interesting example, but i cant open these files, i have lb7. they are 7.1. Can you tranform to my version?.

The problem is i have while-loop and 4 or 5 case structure inside. Then in the begining i have several bottoms enables and when i open the first case structure i cant modified the bottoms, then i would like the same case, if i abort the vi and run the vi again , all come back to the first while loop and i can adjust the bottom before open the first case structure...
This example is good, if i can open the sub vi in the own screen of main vi. Can you show me pictures if you cant transform to the other version??.
Thanks.
0 Kudos
Message 5 of 15
(3,871 Views)
Bush-Man,

Thanks, simply is great!!.
Easy and runs very good!.

Regards,Fonsi.
0 Kudos
Message 6 of 15
(3,871 Views)
Hi fonsi,

I'm happy that it halps u.

PLS, Rank my Answer...

Thanks,

The Bush-Man
0 Kudos
Message 7 of 15
(3,871 Views)
Hi Bush-man,

I used this method in several vi, and worked great.
But in this vi i didnt get to reinitialize the table.

Can you help me?, Why it doenst run?.

I attached the vi and example file.
Download All
0 Kudos
Message 8 of 15
(3,871 Views)
If you have uninitialized shift registers, they won't get cleared by resetting to defaults. You need to e.g. initialize the shift register as in the attached example.
It is not clear at all why you need a shift register, because you never e.g. append data to it or reuse it in another case. You thus can also get rid of the shift register and place the table inside the "true" case.
(Also notice that I got rid if these extra local variables, they are not needed and only complicate the diagram. Please also put a small delay in the false case. It is not necessary to check the "add file" button millions of times a second and using up 100% of the CPU doing so.)

It would be even better to use an event structure (see example 2).

Let me know if
you have questions.
Download All
Message 9 of 15
(3,760 Views)
Hi fonsi,
I see that you didn't rank my answer, but still....

I attached your VI with my a little fix. I Entered the TABLE Indicator into the case.

That's all ...

Enjoy, and Good Luck.

Hope it Helps...
0 Kudos
Message 10 of 15
(3,871 Views)