LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1000 vi is not in a state compatible

Solved!
Go to solution

There is quite a lot of info on this but I can't seem to find the solution to my specific problem.

 

I am calling 4 different vi's into subpanels. All 4 are set up the exact same way in properties. When I open and run the vis by reference method in the top-level vi everything works fine. However, when I exit the top level application then try to restart it I get the "Error 1000 ... vi is not in a compatible state ..." messages for 2 of the 4 subvis because they still run in the background. I have to use a "third party" abort vi to get the 2 to stop then I can run the app again without errors. This is driving me crazy. They are all set up the same in properties. Is there something I'm missing? Thanks in advance.

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 1 of 7
(8,013 Views)
Solution
Accepted by PaulG.

All the subpanels that you called do not stop when you exit the top level application.  Some are still running in the background even though they no longer appear on your top level application subpanels. When you open the subpanels' VIs, after exiting, you will see they are still running. When you re-run the main application, it is trying to run the subpanels, which some are running already and that is why it displays the message. You need to link the exit on the top level application to the other subpanel VIs. You can use a simple boolean global or shared variable to terminate the subpanels.

Message 2 of 7
(8,007 Views)

***Duplicate Reply***

0 Kudos
Message 3 of 7
(8,007 Views)

SumTumWong is exactly right.  

 

A VI's RUNNING status and its SHOWING IN A SUBPANEL status are two different things.

 

Just because you stop a panel containing subVIs, doesn't mean the subVIs stop running.

 

It's up to YOU to make them stop, by some sort of signal.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 7
(8,000 Views)

I have used subpanels before and don't remember them giving me so much grief. For a sanity check I went back to some of my reuse examples and came across the attached I got here somewhere. There are 5 subvi/subpanels. I press the top-level stop switch and they all stop. I restart and they all restart with no errors. No globals, no shared variable "stop" needed. This is the way I expected subpanels to work.

 

I corrected my current problem using a Stop shared variable. My original problem/complaint: I have 4 subvis/subpanels. All are set up the same way in properties. All should behave or misbehave the same way. Two behaved and two didn't. I don't like it.

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 5 of 7
(7,959 Views)

I think you misunderstand what's happening.

 

In that example, the subVIs stop because there is NOTHING ELSE RUNNING (their parents died, so to speak).

 

Take a look at This JING:  (you need audio ON)

 

--- I changed VI1 to beep every 2 seconds, so you could tell it's running.

 

--- I changed MAIN vi to open window on call and close afterwards.

 

--- I made a "master" VI, which calls your MAIN VI, but then KEEPS RUNNING after MAIN quits.

 

Notice that the beeping still continues after your MAIN has quit and the subpanels have closed - the VIs are NOT stopped.

 

The beeping stops after I quit the "master" VI.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 7
(7,948 Views)

Back to your original problem:

However, when I exit the top level application then try to restart it I get the "Error 1000

 

Are you SURE you don't have something else hanging around running?

 

Do you have any dependencies between one subPanel VI and another?

 

Put a DISABLE structure around each of the four RUN VI calls.  Does it still hang?

 

Enable ONE of them.  Does it still hang?

 

Disable that one and enable ANOTHER. DOes it still hang?

 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 7 of 7
(7,940 Views)