jives Posted August 30, 2008 Report Share Posted August 30, 2008 Hi everyone! Is there a way to completely disable the front panel in an application? The idea here is to create a lightweight and robust VI server program which can easily run as a service routine. For all interactions with the user, a client application will log in to the server and displays the current status, recorded data and provide means to control the server VI using data sockets (or something like it). So far I have found some ideas all over the internet, but most of them are some kind of workaround like setting the transparency of the front panel to 100%, or loading a reference to the front panel into memory and close it afterwards. Since we are trying to build very robust and lightweight applications, we are kind of suspicious regarding these methods. Any input is very appreciated Quote Link to comment
PaulL Posted August 30, 2008 Report Share Posted August 30, 2008 If you are using VI Server then you have a reference to the VI. You can connect the VI Reference to a property node. There is a property Exec.ShowFPOnCall that you can set to False. There is also a FP.Open property you can use to control visibility moment to moment. Paul Quote Link to comment
crelf Posted August 30, 2008 Report Share Posted August 30, 2008 QUOTE (jives @ Aug 29 2008, 11:29 AM) Is there a way to completely disable the front panel in an application? To clarfiy: you don't actually want to disable the front panel, but you don't want it shown - is that right? Quote Link to comment
PaulL Posted August 30, 2008 Report Share Posted August 30, 2008 I created a simple example (see attached) of what I was describing. Paul Quote Link to comment
Mikrobi Posted August 30, 2008 Report Share Posted August 30, 2008 QUOTE (jives @ Aug 29 2008, 10:29 AM) The idea here is to create a lightweight and robust VI server program which can easily run as a service routine.For all interactions with the user, a client application will log in to the server and displays the current status, recorded data and provide means to control the server VI using data sockets (or something like it). So far I have found some ideas all over the internet, but most of them are some kind of workaround like setting the transparency of the front panel to 100%, or loading a reference to the front panel into memory and close it afterwards. Since we are trying to build very robust and lightweight applications, we are kind of suspicious regarding these methods. You can just using property noodes set minimal size of FP for example 1x1, and move them to any faaar location - let's say coordinates (30000,30000). Quote Link to comment
LAVA 1.0 Content Posted August 30, 2008 Report Share Posted August 30, 2008 How about... Invoke node >>> FP.Open and wire a "hidden" constant to the "State" input? Ben Quote Link to comment
Yair Posted August 31, 2008 Report Share Posted August 31, 2008 You need to have at least one front panel in your application, or it will be shut down automatically, but as Ben suggested, you can set its state to Hidden, which accomplishes the same goal. Additionally, if you're running Windows, you can convert the executable to a Windows service (which does not have a window) and it will run even if you don't log into the machine. You should be able to find the details on NI's site. Quote Link to comment
jives Posted September 3, 2008 Author Report Share Posted September 3, 2008 Thanks for all your replies! QUOTE (crelf @ Aug 29 2008, 06:33 PM) To clarfiy: you don't actually want to disable the front panel, but you don't want it shown - is that right? I'm not sure what the difference is - since the application does not need any user input and does no presentation of data, I don't really "need" a Front Panel QUOTE (Yair @ Aug 30 2008, 07:58 PM) You need to have at least one front panel in your application, or it will be shut down automatically, but as Ben suggested, you can set its state to Hidden, which accomplishes the same goal. Additionally, if you're running Windows, you can convert the executable to a Windows service (which does not have a window) and it will run even if you don't log into the machine. You should be able to find the details on NI's site. Thanks for the tip, I'll see what I can find. Only to check if I understood that correctly: If I convert my application to a service, the FP will automatically be disabled/hidden? Quote Link to comment
giopper Posted September 3, 2008 Report Share Posted September 3, 2008 QUOTE (Paul_at_Lowell @ Aug 29 2008, 06:41 PM) I created a simple example (see attached) of what I was describing.Paul Paul, could you downconvert to LV 8.2 (version I´m using)? Tnx G Quote Link to comment
Norm Kirchner Posted September 3, 2008 Report Share Posted September 3, 2008 QUOTE (jives @ Sep 2 2008, 07:34 AM) I don't really "need" a Front Panel If you're programming LV you ..... It's a point of specificity, but everything in LV has a front panel. Every piece of code, whether it's shown or not. That's part of what makes LabVIEW, LabVIEW. But more to the point, those front panels never need be shown, but they will exist as every .vi has both FP an BD QUOTE (jives @ Sep 2 2008, 07:34 AM) Thanks for the tip, I'll see what I can find. Only to check if I understood that correctly: If I convert my application to a service, the FP will automatically be disabled/hidden? And making somethign a service is not necessarily the easiest thing, and if you don't need it to run while the PC is on but logged off, you may want to investigate just putting the exe into the registry as a "Run" option that starts as the user logs in. not exactly a service but close.... and eaiser. If you do want something to run as a service you can investigate "FireDaemon" as an eaiser way to make this happen than making the LV exe a service by yourself. ....hmmm... sounds like a good thread to startup "the right and wrong and the other way to make a LV exe a service" Quote Link to comment
Yair Posted September 3, 2008 Report Share Posted September 3, 2008 QUOTE (Norm Kirchner @ Sep 2 2008, 05:38 PM) those front panels never need be shown, but they will exist as every .vi has both FP an BD Actually, when you build the application into an executable, both the FP and the BD are removed by default on all VIs, and are only retained under certain conditions. Even in the IDE, a VI can be saved without a BD (although not without an FP). QUOTE (jives @ Sep 2 2008, 03:34 PM) If I convert my application to a service, the FP will automatically be disabled/hidden? I don't remember, but the tutorial I mentioned on NI's site is quite details and should probably help Norm as well. Quote Link to comment
PaulL Posted September 3, 2008 Report Share Posted September 3, 2008 QUOTE (giopper @ Sep 2 2008, 05:34 AM) Paul, could you downconvertto LV 8.2 (version I´m using)? Tnx G Attached. Paul Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.