LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change pages

Hi to all,
I'm developing a project which is made of many different pages (now there are 30 pages, but I'm planning to add some other);
I created a different VI for every page, and a Main VI to launch the correct page (see attached).
When I reload a page, I need to find the same situation there was when I left it (values of controls / indicators / ...)
 
Do you think is a good solution?
Or I'm completely wrong?
In this way all the vi's are loaded in memory at the beginning, and stay there forever; is it correct?
 
I read many posts about exchanging data between different VI (using globals / LV2 locals / shift reg / queues / ...),
and I tried to improve my project in this direction, but I haven't been able to find a general solution to "jump" (forward and backward) from a page to another.
 
It can be helpful also some links...
 
Thanks in advance
 
Using LV 6.1 on Win XP & Linux Fedora Core 3
 
 

Message Edited by vix on 09-30-2005 08:49 AM

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 3
(2,549 Views)

Hi Vix

I think the idea is not bad. If you know you may add pages once in a while and you have a "big" amount of pages, why not. If you have 30 pages I think it's far too much for a tab-control.

To completly say a solution is good or bad I think is not possible. If it solves the problem, the main job is done. Each solution will have its advantages and disadvantages. So I'd say you can go this way. If you don't want to have your vis stay in memory, I think VI server could be helpful.

As you already said - to exchange data there are various ways. I would use globals, accessing them with separate vis to avoid race conditions. For me they are an easy going solution (although there are lots of users in the forums that blame global variables). I would say that you use what is most convenient for you.

But all this is my opinion. Maybe there are others.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 2 of 3
(2,542 Views)
Hi Vix

I would use a state machine- that way you can have a idle state so that you can determine which page to load. All page would of course refer back to default(idle ) state.
Check the help examples , or do a search on the forum for state machines. I would not use a tab control for so many pages.

As becktho said a solution is not good or bad if it solves the problem. With experience we all  become better wireworkersSmiley Happy

Go for it

xseadog
0 Kudos
Message 3 of 3
(2,512 Views)