Controlling power to the RV50(X)

The RV50 uses considerably more power than the data logger. Therefore, it may be necessary to use the data logger to control power to the RV50. The following program examples show how to control power to the RV50 using the switched 12V (SW12V) terminal on the data logger.

This example shows how to control power to the RV50 by using the CRBasic TimeIsBetween() instruction to turn on SW12 for 15 minutes every 60 minutes between 9:00 a.m. and 5:00 p.m.

NOTE:

TimeIsBetween() requires operating system version 28.00 or greater in the CR1000, CR3000, or CR800. It is supported in all CR1000X, CR6, and CR300 operating systems.

Turn RV50(X) ON and OFF under data logger control

'Declare Variables and Units

Public BattV

Public PTemp_C

Public ModuleState As Boolean

 

Units BattV=Volts

Units PTemp_C=Deg C

 

'Define Data Tables

DataTable(Daily,True,-1)

DataInterval(0,1440,Min,10)

Minimum(1,BattV,FP2,False,False)

EndTable

 

'Main Program

BeginProg

'Main Scan

Scan(5,Sec,1,0)

'Default Data Logger Battery Voltage measurement 'BattV'

Battery(BattV)

'Default Wiring Panel Temperature measurement 'PTemp_C'

PanelTemp(PTemp_C,60)

'Between the hours of 9:00 and 17:00, turn the RV50(X)

'on for 15 minutes at the start of every hour

If TimeIsBetween(9,17,24,Hr) AND TimeIsBetween(0,15,60,Min) Then

  ModuleState=True

  PPPOpen

  SW12(1)

Else

  ModuleState=False

  PPPClose

  SW12(0)

EndIf

'Always turn OFF RV50(X) if battery drops below 11.5 volts

If BattV<11.5 Then

  'Set RV50(X) power to the state of 'ModuleState' variable

  SW12(0)

EndIf

'Call Data Tables and Store Data

CallTable Daily

 NextScan

EndProg