Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

power cycle device at the top of every hour


Shanks.J Oct 7, 2021 11:55 PM

I am dealing with weather station that requires a power cycle to  assist qith its function ( i am talking to the supplier to resolve this)
previously a power cycle every 24 hours worked well. but i now want to do this at the top of every hour. 
can you assis with this.
below is my code using and Else IF function for the SW-2. this works fine for a power cycle once every 24 hours. 
how can i extend this to once every 60 minutes.

thanks

  'Main Scan  Scan(1,Min,1,0) 'Scan once every minute     

Battery(Batt_volt())'Read the supply and lithium voltages   

PanelTemp(PTemp_degC,50) 'Read CR6 internal temp
 

'Weather station switch   

If TimeIsBetween (720,725,1440,Min)
Then 'between 1200noon and 1205       
SW12(2,0)'turn off SW2 ()
     
Else
     
SW12(2,1)'turn on SW2 ()
   
EndIf
 

'Weather station code
'WindDir', 'WindSpd', 'AirTemp','RelHumidity', 'AirPressure', 'wtxRain', and 'Hail_cm2'  SDI12Recorder(WXT(),C3,"3","M!",1,0)'WXT520 Weather Transmitter measurements     CallTable Table1  'Call Data Table and Store Data


JDavis Oct 8, 2021 04:00 PM

You should just have to adjust the parameters of the TimeIsBetween() instruction.

This example would have the power off for for minutes every hour.

If TimeIsBetween (55,59,60,Min) Then 

  SW12(2,0)'turn off SW2 ()     
Else
     
  SW12(2,1)'turn on SW2 ()
   
EndIf
 

Log in or register to post/reply in the forum.