LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

schedule sent at an hour

Hello,
I would like to send a file of measure of temperature each day a little before midnight. The temperatures are acquired and  are put in a file which changes all days at midnight. I put a wait time of 10 min, if not there is too much measure in one day.
But I tried to test this night and as one awaits 10 min, and than I had put at 23h59 sends it email, acquisition was done at 23h55 then at 00h05 and between the two, the program is inactive so it cannot send the file. How could I do so that the checking of the hour is done all the time (and in the same i want to indicate the time of the latest measure).
I have a loop while because i want all the measures of temperature to go  in the same file if not there is only the last value in the file.
I join the VI.
0 Kudos
Message 1 of 4
(2,722 Views)
Hello jajassa,

have you tried to put the single tasks (data aquisition and writing to file, send email) into different loops?
Make two loops running in parallel and you are done!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,712 Views)
The sequence structure blocks all.  I put a sequence structure to impose the rythm of aquisition, I want an acquisition all the 10 min but in my mind i can't do that by the front panel of the task of the aquisition. i don't find an other solution.
0 Kudos
Message 3 of 4
(2,704 Views)
It seems to me that your program will send an email only if the loop happens to run at precisely 23:59:00, which is rather unlikely to actually happen. 

You could always use a shift register with the current date and time cluster, and compare the day of the year value. If that's changed from the previous loop's value, then you've crossed from one day to the next.  If it absolutely has to be slightly before midnight, add 10 minutes (or so) to the value.

If you do it with two parallel loops, the email-sending loop needs to be outside the data aquisition loop that has the sequence structure.

Message 4 of 4
(2,689 Views)