Check out our General Code Repository Files. Also, before posting here, check to see if your post doesn't fit into another subforum by category.
Tags |
(This content has not been tagged yet)
|
![]() |
Aug 29 2008, 03:29 PM
Post
#1
|
|||
|
Enough LAVA to be dangerous Member Posts: 4 Joined: 22-September 06 From: Vienna Member No.: 6245 Using LabVIEW Since:2002 LV:8.6 ,8.5.1 ,7.1
|
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 This post has been edited by jives: Aug 29 2008, 03:37 PM
|
||
|
|
|||
| Ad |
Aug 29 2008, 03:29 PM
Post
#
|
||
|
|
|
||
|
|
|||
Aug 29 2008, 04:26 PM
Post
#2
|
|||
![]() Very Active Member Posts: 90 Joined: 27-November 06 From: Flagstaff, AZ Member No.: 6989 Using LabVIEW Since:1997 LV:8.5 ,. ,.
|
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
|
||
|
|
|||
Aug 29 2008, 04:33 PM
Post
#3
|
|||
![]() I'm a LAVA, not a fighter. V I Engineering, Inc. ![]() Posts: 3749 Joined: 13-October 03 From: Michigan, USA Member No.: 181 Using LabVIEW Since:1993 LV:8.5 ,. ,.
My Blog
|
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? -------------------- ![]()
|
||
|
|
|||
Aug 29 2008, 04:41 PM
Post
#4
|
|||
![]() Very Active Member Posts: 90 Joined: 27-November 06 From: Flagstaff, AZ Member No.: 6989 Using LabVIEW Since:1997 LV:8.5 ,. ,.
|
I created a simple example (see attached) of what I was describing.
Paul
Attached File(s)
|
||
|
|
|||
Aug 29 2008, 05:43 PM
Post
#5
|
|||
![]() Very Active Member Posts: 61 Joined: 11-February 03 From: Krakow, POLAND Member No.: 62 Using LabVIEW Since:1999 LV:5.0 ,8.0.1 ,8.20
|
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).
|
||
|
|
|||
Aug 29 2008, 06:50 PM
Post
#6
|
|||
|
Certified Kool-Aid Kid Premium Member ![]() Posts: 1156 Joined: 6-December 02 From: Pittsburgh PA USA Member No.: 29 Using LabVIEW Since:1998 LV:7.1 ,. ,.
|
How about...
Invoke node >>> FP.Open and wire a "hidden" constant to the "State" input? Ben
|
||
|
|
|||
Aug 30 2008, 05:58 PM
Post
#7
|
|||
![]() Extwemely Active Premium Member ![]() Posts: 1632 Joined: 23-January 05 From: Here Member No.: 1431 Using LabVIEW Since:2003 LV:8.6 ,7.0 ,.
|
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. -------------------- More than meets the eye...
|
||
|
|
|||
Sep 2 2008, 12:34 PM
Post
#8
|
|||
|
Active Member Posts: 15 Joined: 12-October 05 Member No.: 3209 Using LabVIEW Since:1997 LV:8.20 ,8.0 ,7.1
|
I created a simple example (see attached) of what I was describing. Paul Paul, could you downconvert to LabVIEW 8.2 (version I´m using)? Tnx G
|
||
|
|
|||
Sep 2 2008, 12:34 PM
Post
#9
|
|||
|
Enough LAVA to be dangerous Member Posts: 4 Joined: 22-September 06 From: Vienna Member No.: 6245 Using LabVIEW Since:2002 LV:8.6 ,8.5.1 ,7.1
|
Thanks for all your replies!
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 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?
|
||
|
|
|||
Sep 2 2008, 02:38 PM
Post
#10
|
|||
![]() Extremely Active Premium Member ![]() Posts: 595 Joined: 8-December 03 From: Dallas, Texas Member No.: 208 Using LabVIEW Since:2000 LV:8.6 ,8.2.1 ,7.1.1
My Gallery
|
I don't really "need" a Front Panel If you're programming LabVIEW you ..... It's a point of specificity, but everything in LabVIEW 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 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 LabVIEW exe a service by yourself. ....hmmm... sounds like a good thread to startup "the right and wrong and the other way to make a LabVIEW exe a service" -------------------- Norman J. Kirchner Jr.
Automation Software Engineer ~,~ The Captain Was Here Premium Blend ![]()
|
||
|
|
|||
Sep 2 2008, 04:37 PM
Post
#11
|
|||
![]() Extwemely Active Premium Member ![]() Posts: 1632 Joined: 23-January 05 From: Here Member No.: 1431 Using LabVIEW Since:2003 LV:8.6 ,7.0 ,.
|
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). 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. -------------------- More than meets the eye...
|
||
|
|
|||
Sep 2 2008, 04:38 PM
Post
#12
|
|||
![]() Very Active Member Posts: 90 Joined: 27-November 06 From: Flagstaff, AZ Member No.: 6989 Using LabVIEW Since:1997 LV:8.5 ,. ,.
|
Paul, could you downconvert to LabVIEW 8.2 (version I´m using)? Tnx G Attached. Paul
Attached File(s)
|
||
|
|
|||
![]() ![]() |
| Time is now: 1st December 2008 - 10:07 PM |