Hi There, May I know if it ispossible to start the program at a specific time each day, such as 3 PM? I would like the measurement and output to occur at 3 PM, 9 PM, 3 AM, 9 AM, and so on, with a 6-hour scanning interval.
DataInterval(0,6,Hr,10)
Scan(6,Hr,1,0)
Thanks a lot!
Patrick
Hi Patrick,
Actually don't understand what's your intention is. Your instruction of Scan(6,Hr,1,0) will do the job with 6 hr interval and inbetween the logger will be idle and consume very little amount of powers.
Yes, it's possible to run a program at a specific time, but you need two programs to do the job. One to just check the time and the other to do the measurements. Runing these two programs alternatively, you may achienve your goal of starting a specific program at a specific time. But please bare in mind that switching programs may lose your data, so please ensure that you've got all your data before switching the programs. There may be other ways too, but this is what I know. Here are the two programs that need to be stored and run in your logger. First run DoNothing.CR1X then when the time is rigth your main program will run automatically. (File extension may need to change according to your logger). Here are the prrgrams:
'DoNothing.CR1X BeginProg Scan (5,Min,0,0) If TimeIntoInterval (355,360,Min) Then FileManage ("CPU:SixHr.CR1X",6) NextScan EndProg
'SixHr.CR1X Public PTemp, Batt DataTable(SixHr,1,-1) DataInterval(0,6,Hr,10) Sample(1,Batt,FP2) Sample(1,PTemp,FP2) 'Add your measuremts EndTable BeginProg Scan (5,Min,0,0) If TimeIntoInterval(0,360,Min) Then PanelTemp(PTemp,15000) Battery(Batt) 'Add your measuremts CallTable SixHr EndIf 'Add your instructions here to send datatable to where ever you need 'You've got 5 minute to send before this program stop If TimeIntoInterval(5,360,Min) Then FileManage("CPU:DoNothing.CR1X",6) NextScan EndProg
Hope this works for you. Haven't tested it out these programs, pls test it by yourself. Best of luck.
Rgds,
Thein