LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with show differents vi in the same main vi...

Hi guys,

I used the viewer.vi example on lv7.1, and i use this vi called from main vi, to show 3 differents vis... I have the problem, i put the default 0, then it should always show the first vi, but it only run in the first try...
I execute the main vi, then push the bottom and open the viewer subvi and start with the first vi, i can play with the 3 options and the problems is when i close the subvi showing the first vi, since if i try open again the subvi viewer, it appears without any vi!!, i dont know why... then i can select the other 2 options, and put again the first option to get the first vi in the screen... curiostly when i close the subvi showing the option 2 or 3, when i re-entry in the bottom to execute the subvi.. it show well the first option....

Any advise or possible solution??. I want when close the subvi, if i want open again the subvi, appear the first option perfectly!!.

I put the files...
Regards,Fonsi
0 Kudos
Message 1 of 11
(3,491 Views)
TRY THESE WIRING CHANGES.
Message 2 of 11
(3,483 Views)
Hi Parker,


Thanks, but i have the same problem.... Run same than old fitted.

When open the first option vi, and close the window, when open again, the screen apeear empty...

Any solution?.
Thanks.
0 Kudos
Message 3 of 11
(3,464 Views)
I think your problem is occurring because you are stopping outside of your sub VI. I think I got the same symptoms by hitting the program stop button on the main program. Setting viewer_test.vi to modal (file>>vi properties>>window appearance>>customize>>window behavior "modal")will prevent this form happening. If you are looking at viewer_test.vi stand alone (running outside of main) then the vi will not be displayed while the VI is not running.
Message 4 of 11
(3,455 Views)
Hi Parker,

I tested modal at viewer_test.vi and it doesnt run...

I have my main vi, from this vi, i open differents screen vis, the viewer is one bottom in my main... the rest go perfect.... i put here, only one example with virtual main, then i open the viewer.vi (like subvi), and this subvi, open 3 vis in the screen.

Then, i dont close the vi from the main. i close the viewer.vi from his own stop bottom. The main only call the subvi, but the problem is when i close. Since if i test only from the viewer(without use main vi), the program runs perfectly, since when i close the vi, when i start it starts from the initial execute program or put in memory...
My problem is when i close the viewer.vi, when i try open again from the main, never show the last vi showed in viewer, it seems the vi is put in memory and not show it.

I dont know why... i tried different shape of execution or custom fitted... but go bad.

I dont know what to do...

Any advise?.

REgards,Fonsi
0 Kudos
Message 5 of 11
(3,456 Views)
Hey Fonsi
0 Kudos
Message 6 of 11
(3,438 Views)
Hey Fonsi:

The problem is with the abort vi method in viewer_test.vi. Place trace on and you will see that this method generates an error with both the initial pass (when the blank vi reference is passed to it error code 1026) and whenever the graph function is selected (error code 1000). This is because the execution of this VI cannot be aborted. You can easily regenerate these errors by setting time between points to maximum and stopping the VI before it completes. You may also prevent these errors by allowing graph function to fully execute prior to stopping or changing to the tank or limit functions. Code wise this delay can be accomplished by changing the your false constant in load and runs.vi to a control with a false default value, wiring it to the connector pane and passing a equals zero evaluation of the select a vi line into this input. What this will do is allow the vi to fully execute when the graph function is selected but allow the program to continue when the tank or limit functions are selected. What it also does is generate a blank screen while generating the graph. I'll try and pass on some screen shots tomorrow at work when I have access to LV 7.1

Parker
Message 7 of 11
(3,437 Views)
Hi Parker,

OK, i wait your screen shots.
Thanks.
0 Kudos
Message 8 of 11
(3,427 Views)
Message 9 of 11
(3,422 Views)
Hi Parker,

I tested the example, but it doesnt run very good... Its very slow, even my vi to open are bigger and it cans open them... even in the example sometimes goes bad.

I think the key is ABORT the vi when i close the subvi. So when i load again the vi will be open good...

What do you think?.

Regards, Fonsi.
0 Kudos
Message 10 of 11
(3,403 Views)