11-11-2013 06:52 PM
I'm wondering if there is a way for an RT VI to detect when its front-panel is open, both when run interactively from within a project and also when accessed remotely as an embedded window within a browser?
Solved! Go to Solution.
11-11-2013 07:03 PM
There's a VI Server property that tells you how many clients are connected. It's an application property, Remote Panel:Connections to Clients. Another possibility is to execute a property node and see if it returns an error. If it doesn't, then there's an open front panel.
11-11-2013 07:55 PM
I know about the "Remote Panel:Connections to Clients" property and I'm already using that to tell whether a remote connection is active (as opposed to running the VI within the development environment). It cannot however tell if the front panel is open within the development environment.
As for the property-node returning an error, that does not appear to work here (perhaps I have selected the wrong property, I'm using the get-reference-to-front-panel property). I suspect that since the VI is setup to work with a remote front panel, the VI thinks that a front panel does exist even when a remote connection does not. I suspect this error check would work if the VI had not been setup for use with a remote connection because then the front panel would be stripped out as the VI was built or perhaps deployed to the RT system.
11-11-2013 08:16 PM
Well, maybe I'm wrong, but try an implicit property node for something simple like Value, and see if that returns an error when no front panel is available. I think it will.
11-11-2013 08:45 PM
Yep, you are right. Using the error status output from a VALUE property for a front-panel Boolean, the VI can tell if the front panel is open or not for both the remote access case and the development environment case.
Thank you!