LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

running a labview exe automatically

Thank u so much for your timely help sir.

For any doubts regarding this,i will get back to you.

Thanks once again

 

0 Kudos
Message 11 of 17
(1,000 Views)

Hai

Can i ask you one more doubt sir?

In my application i have set the event time out as 3600000 so the event will be executed each hour.

My application is for sending email automatically.Each hour mail should be sent to the recepient fetching appropriate data from database.

Each hour the application is sending previous hours data.ie,at 2' O clock its sending 1 O Clocks data

Actually the application has two options one to send manually and the other to send automatically.

Suppose the application send mail at 02:05:00 automatically then its supposed to send the next email at 03:05:00(ofcourse there will be 1 or 2 minute difference depending on the complexity of fetching).But at 02:59:00 the application is being used to send mail manually.

So instead of sending automatic mail at 03:05:00 the mail will be sent ony at 03:59:00(because of the user interaction at 02:58:00 which occured at a buttons click event) and may result even in not sending the email at a particular hr..How can i make my auto sending module unaffected from user interaction(i am aware that timeout occur only when no other specified events occur )..So how can i solve my problem?

Thanks once again

 

 

 

0 Kudos
Message 12 of 17
(974 Views)
Are you saying that your automatic send that occurs 5 minutes after the hour is not occuring because of the manual send on the hour?  I can't think of a reason this would be happening other than the the email client is also on a one hour send cycle and it is recognizing that email has already been sent 5 minutes before and is deferring the send to later.  Maybe you could post the code to see if you are doing something that could be affecting the email client.
0 Kudos
Message 13 of 17
(963 Views)
You need to use a different timing method than the long event structure timeout. As you have noted that timeout starts over after any event occurs.

Use a shift register to save the time of the next automatic send (for example 03:05:00). Set the timeout for a small amount of time such as 60000 ms (one minute). Inside the Timeout case test to see if the current time is >= the next send time. If it is, then send the email and add an hour to the next send time, else do nothing.

Lynn
Message 14 of 17
(956 Views)

Thanx for the reply sir.

I am doubtful on the scenario because of the following reasons.

In my uinderstanding,the time out will occur only if no other events occured.I have given the manual mail sending option as an event that happens in the mouse down of a button.If the button clicking event occured just 5 mts b4 the automail is supposed  to  send.Then will the timeout occur in the intended time(just after 5 mts)again ,eventhough another event occured meanwhile?.Or will it take 55 mts more for the next time out?

(The scenario i mentioned was the following.

Suppose the application send mail at 02:05:00 automatically then its supposed to send the next email at 03:05:00(ofcourse there will be 1 or 2 minute difference depending on the complexity of fetching).But at 03:00:00 the application is being used to send mail manually.               My code for sending mail is inside timeout event)

Please give me an advice regarding this.

Thanks once again

0 Kudos
Message 15 of 17
(940 Views)

Hi All,

      I don't know whether User_1 is using the Emailer.vi, but I fear there's a bug that would cause a one-loop delay after pressing "Email Enabled".  The boolean button is being checked before the event-stru, so will (i think) pass-through a FALSE, even when the False-to-True event occurs.  Smiley Surprised

It's fixed in the attached Rev_2 of Brian's Rev_1 - Smiley Wink -)

Cheers.

Message Edited by tbd on 08-30-2007 01:40 AM

Message Edited by tbd on 08-30-2007 01:51 AM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 16 of 17
(931 Views)
The way the time out occurs in the event structure is that the "timeout" case will execute after the timeout period, if no other checked for event cases have occured. If either case happens, the timeout case or an event, the timeout is restarted from 0. So in your case, having a manual email sent at 3:00 means the next time out will occure the timeout period later, i.e. 4:00. In the example suggested where you use a short timeout of 1 minute and check the actual time against the time on a shift register, it won't matter how many times someone may have manually sent email, when the desired automatic time period expires it will trigger an auto send of the email, then start checking again. Remember, the "time out" case's timeout is reset everytime any case executes, not just its own.



Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 17 of 17
(910 Views)