LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Server: Check if VI is open?

Solved!
Go to solution

Hello all,

 

Below is my little VI.  Is there a way to check if Tester (Host).vi is running?

Because what I want to do is, instead of always getting values  from Tester(Host).vi, check to see if Tester(Host).vi is running.  If it is runinng, take the values from that VI.  If not, it uses the values of some control inside this vi.

Thanks.

 

0 Kudos
Message 1 of 6
(3,938 Views)
Solution
Accepted by topic author Bladhart

Found it.  Have been looking in the wrong place

 

Property Node, Execution State

0 Kudos
Message 2 of 6
(3,931 Views)

I tried to register asynchronously called VIs to catch their KeyDown events, but I got error that the VI is not open, upon attempt to register it, despite the VI state was already "Running".

Turned out the solution is to poll for VI's front panel state going to standard (VI property FP.State = Standard).

Message 3 of 6
(3,447 Views)

UI events like KeyDown are only possible when the front panel is open.

A vi can be open and running while the front panel is (temporarily or permanently) hidden. Hence, the error you got.

Same for other functions also related to UI, for example mouse pointer manipulation functions.

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 6
(3,438 Views)

Yeah, that's what I thought, thus I found the solution. I'm sharing my experience just in case someone stumbles upon the same problem and finds this thread, just like I did.

0 Kudos
Message 5 of 6
(3,436 Views)

Sure, you are not wrong and deserve a kudo for sharing. I only added a little bit of more explanation and info.

That's the way this forum works.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 6
(3,434 Views)