LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide a vi when it is running

Hi All
 
I have an application to send mails automatically ,every hour fetching the previous hours data from the database.
 
The VI is working properly and i have added the exe to the task scheduler(in control panel) giving 1 hr delay and its also working.
 
But now every hour its popping up the VI for 1-2 mts(during the execution in each hour,after the execution i have set the vi to quit).
So i want a way to keep my vi running each hr invisibly(something like v can achieve in visual basic using form.hide).That is i want to hide the VI when it is running.
For this,I have set the VI references FP.open=false.If i am running the exe directly its ok.That is its disappering and sending the mail.
 
But if i add the exe to task sheduler its invoking this vi and making it disappear as coded but not sending the mail.
I havent closed the VI reference and at the ternibal step i have used the control to quit labview.I ca not find where iam going wrong.Can anybody help me?
 
Thanks in advance
 
0 Kudos
Message 1 of 8
(3,443 Views)
hm, i havent heared from this before.
As i understand it, the FP.Open works correctly if you start the exe by double clicking on it in the explorer.
But when the exe gets called by the scheduler, it doesnt work?

To work around this issue, it is maybe enough for you to set the "window position" of your main-VI to "minimized"?

hope this helps,
Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 8
(3,440 Views)
Thank you for the timely advice sir.
 
I can minimise the vi as suggested by u,but i think it will be better to hide it rather than minimising.
 
I doubt my problem is related to the path.Will it be?
In the open VI reference i have given the vi path by using  current vi's path(from File I/O functions) .Will it be the reason for the problem?
When i am adding it to scheduler will the path create problem?
 
Thanks once again
0 Kudos
Message 3 of 8
(3,430 Views)
Hm, i suspect from your answer that i have understood the issue correctly. So there has to be a difference between "simple double-click" and the way the scheduler starts the application.
I tried to figure out what the scheduler does and found something which might help you. This is what i am talking about...
Sadly, i didnt find out how this property can be set in XP....

hope this helps,
Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 8
(3,424 Views)

Have you tried the Front Panel Close Method?  This seems to close the front panel but the vi still executes.

Craig

LabVIEW 2012
0 Kudos
Message 5 of 8
(3,420 Views)

Thanks for ur reply.

My labview version is 8.0.So i could not open the vi that is sent by u.

Can u pls save it for me in the older version?

0 Kudos
Message 6 of 8
(3,409 Views)


@craigc wrote:

Have you tried the Front Panel Close Method?  This seems to close the front panel but the vi still executes.

Craig



Be warned,

if you close all FrontPanels your executable will be ended!
Better, us the Open.Method with a 'hidden' constant feeding the stat property.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 7 of 8
(3,393 Views)
Hi Thanks Ton,
 
Never seen those options there before and works better than my implementation.  So here you go, as Ton's suggestion and hopefully saved in version 8.0
Craig
LabVIEW 2012
0 Kudos
Message 8 of 8
(3,380 Views)